From bb71c9107cb01300c01039e1c7a90f386678bb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorem=20Ju=C3=A1rez?= Date: Tue, 1 Sep 2026 17:46:40 -0600 Subject: [PATCH] Acota los estilos de Inventario a su pantalla MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `beyond_cifra`, `beyond_tabla` y compañía estaban en la raíz del archivo, así que aplicaban en toda la aplicación. El punto de venta llama `beyond_cifra` a su tarjeta de métrica y le caía encima el círculo de 44px en azul de inventario: seis tarjetas colapsadas y con la cifra en azul marino, en tres pantallas. No dio error, el SCSS compiló y las 839 pruebas siguieron verdes, porque el punto de venta tenía prueba de datos y ninguna de navegador. Lo vio el cliente. ADR-027 fija la regla: una regla de estilo cuelga de la pantalla a la que pertenece, y una pantalla dice el ancho y el color de sus piezas aunque el valor parezca redundante. Co-Authored-By: Claude Opus 5 (1M context) --- .../static/src/inventario/inventario.scss | 1861 +++++++++-------- ...R-027-cada-pantalla-manda-en-sus-clases.md | 65 + 2 files changed, 999 insertions(+), 927 deletions(-) create mode 100644 docs/adr/ADR-027-cada-pantalla-manda-en-sus-clases.md diff --git a/addons/beyond_inventory/static/src/inventario/inventario.scss b/addons/beyond_inventory/static/src/inventario/inventario.scss index 4317073..aae50ee 100644 --- a/addons/beyond_inventory/static/src/inventario/inventario.scss +++ b/addons/beyond_inventory/static/src/inventario/inventario.scss @@ -94,96 +94,809 @@ $inv-cols: 1.5fr 1fr 0.8fr 0.5fr 0.9fr 180px; color: $beyond-ink-muted; } -// ── Indicadores. Tres preguntas sobre el mismo conjunto, NO tres montones: -// un artículo con 1 de 4 está por agotarse y también tiene existencia. -// Por eso no suman y por eso no son filtros ni botones. ───────────────── -.beyond_inventario_indicadores { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - gap: 14px; -} +// Todo lo de abajo vive DENTRO de la pantalla de inventario: nombres como +// `beyond_cifra` o `beyond_tabla` los usan también otras pantallas —el +// punto de venta, sin ir más lejos— y sueltos en la raíz se las pisaban: +// sus tarjetas de métricas salían como el círculo de 44px de aquí, con +// la cifra en el azul de inventario. +.o_beyond_inventario { + // ── Indicadores. Tres preguntas sobre el mismo conjunto, NO tres montones: + // un artículo con 1 de 4 está por agotarse y también tiene existencia. + // Por eso no suman y por eso no son filtros ni botones. ───────────────── + .beyond_inventario_indicadores { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 14px; + } -.beyond_indicador { - display: flex; - align-items: center; - gap: 15px; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 16px 20px; -} + .beyond_indicador { + display: flex; + align-items: center; + gap: 15px; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 16px 20px; + } -.beyond_cifra { - flex: none; - width: 44px; - height: 44px; - border-radius: 15px; - display: flex; - align-items: center; - justify-content: center; - font-size: 19px; - font-weight: 800; - font-variant-numeric: tabular-nums; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; -} + .beyond_cifra { + flex: none; + width: 44px; + height: 44px; + border-radius: 15px; + display: flex; + align-items: center; + justify-content: center; + font-size: 19px; + font-weight: 800; + font-variant-numeric: tabular-nums; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + } -.beyond_negativa .beyond_cifra { - background: $beyond-panel-rojo-suave; - color: $beyond-panel-rojo; -} + .beyond_negativa .beyond_cifra { + background: $beyond-panel-rojo-suave; + color: $beyond-panel-rojo; + } -.beyond_alerta .beyond_cifra { - background: $inv-ambar-tinte; - color: $inv-ambar; -} + .beyond_alerta .beyond_cifra { + background: $inv-ambar-tinte; + color: $inv-ambar; + } -.beyond_indicador_texto { - display: flex; - flex-direction: column; - gap: 2px; - min-width: 0; -} + .beyond_indicador_texto { + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; + } -.beyond_indicador_titulo { - font-size: 14.5px; - font-weight: 800; - letter-spacing: -.01em; -} + .beyond_indicador_titulo { + font-size: 14.5px; + font-weight: 800; + letter-spacing: -.01em; + } -.beyond_indicador_pie { - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; -} + .beyond_indicador_pie { + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + } -// ── Controles ─────────────────────────────────────────────────────────── -.beyond_inventario_controles { - display: flex; - align-items: center; - gap: 12px; - flex-wrap: wrap; -} + // ── Controles ─────────────────────────────────────────────────────────── + .beyond_inventario_controles { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; + } -.beyond_inventario_uso { - display: flex; - align-items: center; - gap: 4px; - background: $beyond-surface-hover; - border-radius: 999px; - padding: 4px; + .beyond_inventario_uso { + display: flex; + align-items: center; + gap: 4px; + background: $beyond-surface-hover; + border-radius: 999px; + padding: 4px; - button { + button { + all: unset; + cursor: pointer; + white-space: nowrap; + padding: 8px 17px; + border-radius: 999px; + font-size: 13.5px; + font-weight: 800; + color: $beyond-ink-soft; + transition: background 140ms ease, color 140ms ease; + + &.beyond_activo { + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + } + + &:focus-visible { + outline: 2px solid $beyond-panel-azul-inventario; + outline-offset: 2px; + } + } + } + + .beyond_buscador { + display: flex; + align-items: center; + gap: 10px; + flex: 1 1 300px; + min-width: 240px; + max-width: 480px; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 999px; + padding: 11px 20px; + color: $beyond-ink-muted; + transition: border-color 140ms ease, box-shadow 140ms ease; + + &:focus-within { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + + input { + flex: 1; + min-width: 0; + border: 0; + outline: none; + background: transparent; + font-size: 14px; + font-weight: 600; + color: $beyond-ink; + + &::placeholder { color: $beyond-ink-muted; font-weight: 600; } + } + } + + .beyond_inventario_recibir { all: unset; cursor: pointer; - white-space: nowrap; - padding: 8px 17px; + margin-left: auto; + display: inline-flex; + align-items: center; + gap: 9px; + padding: 12px 22px; border-radius: 999px; + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + font-size: 14px; + font-weight: 800; + transition: background 140ms ease; + + &:hover { background: $beyond-panel-azul-inventario-hover; } + + &:focus-visible { + outline: 2px solid $beyond-ink; + outline-offset: 2px; + } + } + + // ── Tabla ─────────────────────────────────────────────────────────────── + .beyond_tabla { + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 6px 12px 8px; + } + + .beyond_tabla_eje { + display: grid; + grid-template-columns: $inv-cols; + gap: 16px; + padding: 15px 14px 12px; + + span { + font-size: 11px; + font-weight: 800; + letter-spacing: .09em; + text-transform: uppercase; + color: $beyond-ink-muted; + } + + .beyond_eje_derecha { text-align: right; } + } + + .beyond_tabla_fila { + display: grid; + grid-template-columns: $inv-cols; + gap: 16px; + align-items: center; + padding: 13px 14px; + border-top: 1px solid $inv-linea; + border-radius: 14px; + transition: background 140ms ease; + + &:hover { background: $inv-campo; } + } + + .beyond_tabla_nombre { + font-size: 14.5px; + font-weight: 800; + letter-spacing: -.01em; + } + + .beyond_tabla_codigo { + font-size: 12.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + + .beyond_uso_etiqueta { + justify-self: start; + font-size: 12px; + font-weight: 800; + border-radius: 999px; + padding: 4px 12px; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + + // Lo que se usa prestando servicios no se vende: no lleva el azul, que + // aquí significa «mercancía que sale por caja». + &.beyond_insumo { + background: $beyond-surface-hover; + color: $beyond-ink-softer; + } + } + + .beyond_tabla_existencia { + text-align: right; + display: flex; + flex-direction: column; + gap: 1px; + } + + .beyond_tabla_cantidad { + font-size: 19px; + font-weight: 800; + letter-spacing: -.02em; + font-variant-numeric: tabular-nums; + } + + .beyond_tabla_estado { + font-size: 11.5px; + font-weight: 800; + } + + // El estado colorea SU renglón de texto, no la fila entera: el rojo y el + // ámbar son señal y pierden fuerza si tiñen media pantalla. + .beyond_estado_negativa .beyond_tabla_cantidad, + .beyond_estado_negativa .beyond_tabla_estado { color: $beyond-panel-rojo; } + .beyond_estado_agotarse .beyond_tabla_cantidad, + .beyond_estado_agotarse .beyond_tabla_estado { color: $inv-ambar; } + .beyond_estado_suficiente .beyond_tabla_estado { color: $inv-verde; } + .beyond_estado_sin .beyond_tabla_cantidad, + .beyond_estado_sin .beyond_tabla_estado { color: $beyond-ink-muted; } + + .beyond_tabla_minimo { + text-align: right; + font-size: 14px; + font-weight: 700; + color: $beyond-ink-softer; + } + + .beyond_tabla_entrada { + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-softer; + } + + .beyond_tabla_acciones { + display: flex; + align-items: center; + gap: 8px; + justify-self: end; + + button { + all: unset; + cursor: pointer; + padding: 9px 17px; + border-radius: 999px; + font-size: 13px; + font-weight: 800; + background: $beyond-surface-hover; + color: $beyond-ink-soft; + transition: background 140ms ease; + + &:hover { background: $beyond-surface-active; } + + &:focus-visible { + outline: 2px solid $beyond-panel-azul-inventario; + outline-offset: 2px; + } + } + + // «Ajustar» en el tinte del azul: es la acción de inventario del + // renglón. Anidado bajo las acciones para no pisar la pantalla de + // ajuste, que usa la misma clase en su tarjeta. + .beyond_ajuste { + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + + &:hover { background: #D6E3EC; } + } + } + + .beyond_inventario_vacio { + padding: 48px 16px; + text-align: center; + font-size: 14px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // La existencia negativa es SEÑAL, no decoración: se vendió algo que nunca + // se registró como recibido. + .beyond_aviso { + display: block; + font-size: 13px; + font-weight: 600; + color: $beyond-ink-muted; + padding: 4px 14px 8px; + text-wrap: pretty; + } + + + // ══ Migas de las pantallas de dentro ════════════════════════════════════ + .beyond_migas { + padding-bottom: 4px; + + .beyond_migas_texto { + display: flex; + flex-direction: column; + gap: 1px; + } + + .beyond_inventario_titulo { font-size: 21px; } + } + + // ══ Recibir mercancía ═══════════════════════════════════════════════════ + // Dos columnas: de dónde sale la mercancía y lo que ya se lleva contado. + .beyond_recibir_hoja { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 14px; + align-items: start; + + // Antes de romperse, se apilan: con la caja en la mano no se trabaja en + // dos columnas de 300px. + @media (max-width: 1100px) { grid-template-columns: 1fr; } + } + + .beyond_recibir_col { + display: flex; + flex-direction: column; + gap: 14px; + min-width: 0; + } + + // El mockup llama a esta tarjeta `.beyond_panel`, pero ese nombre YA está + // tomado: es la clase que lleva el cuando se enciende la piel del + // Panel General. Con la regla suelta, el panel entero se pintaba de blanco + // con 18px de relleno y las pestañas acababan encima del título. + .beyond_inventario_panel { + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 18px 20px; + } + + .beyond_inventario_panel_cabeza { + display: flex; + align-items: baseline; + gap: 10px; + padding-bottom: 4px; + } + + .beyond_inventario_panel_titulo { + font-size: 11px; + font-weight: 800; + letter-spacing: .09em; + text-transform: uppercase; + color: $beyond-ink-muted; + } + + .beyond_inventario_panel_pie { + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + padding-top: 10px; + text-wrap: pretty; + } + + .beyond_inventario_panel_enlace { + all: unset; + cursor: pointer; + margin-left: auto; + font-size: 13px; + font-weight: 800; + color: $beyond-panel-azul-tinta; + + &:hover { text-decoration: underline; } + } + + .beyond_escaneo { + display: flex; + align-items: center; + gap: 10px; + + input { + flex: 1; + min-width: 0; + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 14px; + padding: 13px 16px 13px 44px; + outline: none; + font-size: 14.5px; + font-weight: 700; + color: $beyond-ink; + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 15px center; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + } + + .beyond_escaneo_camara { + all: unset; + cursor: pointer; + flex: none; + width: 46px; + height: 46px; + border-radius: 14px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-soft; + background: $beyond-surface-hover; + transition: background 140ms ease; + + &:hover { background: $beyond-surface-active; } + } + + // Un código que no está en el catálogo no es un error de quien escanea: se + // le dice qué hacer, y el texto lo escribe el servidor. + .beyond_escaneo_aviso { + display: flex; + align-items: flex-start; + gap: 10px; + margin-top: 12px; + background: $inv-ambar-tinte; + color: $inv-ambar; + border-radius: 14px; + padding: 12px 16px; + font-size: 13.5px; + font-weight: 700; + text-wrap: pretty; + + .fa { margin-top: 2px; } + } + + .beyond_catalogo_fila { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 4px; + border-top: 1px solid $inv-linea; + + .beyond_tabla_nombre { flex: none; } + } + + .beyond_catalogo_tiene { + margin-left: auto; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-softer; + white-space: nowrap; + } + + .beyond_catalogo_mas { + all: unset; + cursor: pointer; + flex: none; + width: 32px; + height: 32px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + font-size: 18px; + font-weight: 800; + line-height: 1; + transition: background 140ms ease; + + &:hover { background: #D6E3EC; } + } + + .beyond_entrada_eje, + .beyond_entrada_fila { + display: grid; + grid-template-columns: 1.6fr 0.6fr 0.7fr 0.7fr auto; + gap: 12px; + align-items: center; + } + + .beyond_entrada_eje { + padding: 2px 4px 12px; + + span:not(:first-child) { text-align: right; } + } + + .beyond_entrada_fila { + padding: 11px 4px; + border-top: 1px solid $inv-linea; + } + + .beyond_entrada_num { + text-align: right; + font-size: 14px; + font-weight: 700; + } + + // Lo que quedará es la cifra que se compara con la caja física: pesa más + // que las otras dos. + .beyond_entrada_quedara { + font-size: 15px; + font-weight: 800; + color: $beyond-panel-azul-tinta; + } + + .beyond_entrada_rescate { + font-size: 12.5px; + font-weight: 700; + color: $beyond-panel-rojo; + } + + // La cantidad se escribe: una caja trae doce, no doce toques. + .beyond_entrada_cantidad { + width: 100%; + text-align: right; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 10px; + padding: 7px 10px; + outline: none; + font-size: 14px; + font-weight: 800; + color: $beyond-ink; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + + .beyond_entrada_quitar { + all: unset; + cursor: pointer; + width: 26px; + height: 26px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-muted; + font-size: 15px; + font-weight: 800; + + &:hover { background: $beyond-surface-hover; color: $beyond-panel-rojo; } + } + + .beyond_entrada_vacio { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + padding: 46px 16px; + + .fa { font-size: 26px; color: $beyond-surface-active; } + b { font-size: 14.5px; font-weight: 800; } + span { font-size: 13px; font-weight: 600; color: $beyond-ink-muted; } + } + + .beyond_nota input { + width: 100%; + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 14px; + padding: 12px 16px; + outline: none; + font-size: 14px; + font-weight: 600; + color: $beyond-ink; + margin-top: 10px; + } + + .beyond_pie_acciones { + display: flex; + align-items: center; + gap: 14px; + flex-wrap: wrap; + padding-top: 14px; + } + + .beyond_boton_azul { + all: unset; + cursor: pointer; + padding: 12px 24px; + border-radius: 999px; + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + font-size: 14px; + font-weight: 800; + transition: background 140ms ease; + + &:hover { background: $beyond-panel-azul-inventario-hover; } + + &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } + + // Apagado CON su razón al lado, que va en el marcado. + &[disabled] { + background: $beyond-surface-hover; + color: $beyond-ink-muted; + cursor: default; + } + } + + .beyond_boton_llano { + all: unset; + cursor: pointer; + padding: 12px 22px; + border-radius: 999px; + background: $beyond-surface-hover; + color: $beyond-ink-soft; + font-size: 14px; + font-weight: 800; + + &:hover { background: $beyond-surface-active; } + + &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } + } + + .beyond_razon { + font-size: 13px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // ══ Ajustar existencia ══════════════════════════════════════════════════ + .beyond_ajustar_hoja { + max-width: 820px; + margin: 0 auto; + width: 100%; + } + + .beyond_inventario_panel.beyond_ajustar_panel { padding: 24px 26px 22px; } + + .beyond_ajustar_cabeza { + display: flex; + align-items: center; + gap: 12px; + padding-bottom: 18px; + + .beyond_tabla_nombre { font-size: 21px; } + } + + .beyond_ajustar_paso { + display: grid; + grid-template-columns: 1fr auto 1fr; + gap: 14px; + align-items: center; + + @media (max-width: 620px) { grid-template-columns: 1fr; } + } + + .beyond_ajustar_caja { + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 18px; + padding: 14px 18px 16px; + display: flex; + flex-direction: column; + gap: 4px; + + &.beyond_destino { + background: $beyond-panel-azul-tinte; + border-color: #CDDDE8; + + .beyond_inventario_panel_titulo { color: $beyond-panel-azul-tinta; } + } + } + + .beyond_ajustar_valor { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + font-size: 27px; + font-weight: 800; + letter-spacing: -.02em; + } + + .beyond_ajustar_paso1 { + all: unset; + cursor: pointer; + width: 36px; + height: 36px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + font-size: 19px; + font-weight: 800; + line-height: 1; + + &:hover { background: $beyond-surface-hover; } + } + + // Escribible: de −3 a 40 con el botón + son cuarenta y tres toques. + .beyond_ajustar_campo { + width: 92px; + text-align: center; + background: $beyond-panel-tarjeta; + border: 1px solid #CDDDE8; + border-radius: 12px; + padding: 4px 6px; + outline: none; + font-size: 27px; + font-weight: 800; + letter-spacing: -.02em; + color: $beyond-ink; + font-family: inherit; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + + .beyond_ajustar_flecha { + color: $beyond-ink-muted; + font-size: 19px; + font-weight: 800; + text-align: center; + } + + // La diferencia, dicha: «bajan 4» se entiende sin haber aprendido qué + // significa el ámbar. + .beyond_ajustar_diferencia { + display: flex; + align-items: center; + gap: 10px; + margin: 16px 0 20px; + background: $beyond-surface-hover; + border-radius: 16px; + padding: 13px 17px; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-soft; + + &.beyond_sube { + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + } + + &.beyond_baja { background: $inv-ambar-tinte; color: $inv-ambar; } + } + + .beyond_motivos { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin: 10px 0 20px; + } + + // El elegido tiene que verse a un metro: dos chips que se distinguen por un + // gris casi igual es lo mismo que ninguno elegido — el tropiezo que ya tuvo + // «Nivel de acceso» en la ficha de personal. + .beyond_motivo { + all: unset; + cursor: pointer; + padding: 10px 18px; + border-radius: 999px; + background: $beyond-surface; + color: $beyond-ink-soft; font-size: 13.5px; font-weight: 800; - color: $beyond-ink-soft; transition: background 140ms ease, color 140ms ease; + &:hover { background: $beyond-surface-hover; } + &.beyond_activo { background: $beyond-panel-azul-inventario; color: #FFFFFF; @@ -194,873 +907,167 @@ $inv-cols: 1.5fr 1fr 0.8fr 0.5fr 0.9fr 180px; outline-offset: 2px; } } -} -.beyond_buscador { - display: flex; - align-items: center; - gap: 10px; - flex: 1 1 300px; - min-width: 240px; - max-width: 480px; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 999px; - padding: 11px 20px; - color: $beyond-ink-muted; - transition: border-color 140ms ease, box-shadow 140ms ease; - - &:focus-within { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } - - input { - flex: 1; - min-width: 0; - border: 0; - outline: none; - background: transparent; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - - &::placeholder { color: $beyond-ink-muted; font-weight: 600; } - } -} - -.beyond_inventario_recibir { - all: unset; - cursor: pointer; - margin-left: auto; - display: inline-flex; - align-items: center; - gap: 9px; - padding: 12px 22px; - border-radius: 999px; - background: $beyond-panel-azul-inventario; - color: #FFFFFF; - font-size: 14px; - font-weight: 800; - transition: background 140ms ease; - - &:hover { background: $beyond-panel-azul-inventario-hover; } - - &:focus-visible { - outline: 2px solid $beyond-ink; - outline-offset: 2px; - } -} - -// ── Tabla ─────────────────────────────────────────────────────────────── -.beyond_tabla { - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 6px 12px 8px; -} - -.beyond_tabla_eje { - display: grid; - grid-template-columns: $inv-cols; - gap: 16px; - padding: 15px 14px 12px; - - span { - font-size: 11px; - font-weight: 800; - letter-spacing: .09em; - text-transform: uppercase; - color: $beyond-ink-muted; - } - - .beyond_eje_derecha { text-align: right; } -} - -.beyond_tabla_fila { - display: grid; - grid-template-columns: $inv-cols; - gap: 16px; - align-items: center; - padding: 13px 14px; - border-top: 1px solid $inv-linea; - border-radius: 14px; - transition: background 140ms ease; - - &:hover { background: $inv-campo; } -} - -.beyond_tabla_nombre { - font-size: 14.5px; - font-weight: 800; - letter-spacing: -.01em; -} - -.beyond_tabla_codigo { - font-size: 12.5px; - font-weight: 700; - color: $beyond-ink-muted; -} - -.beyond_uso_etiqueta { - justify-self: start; - font-size: 12px; - font-weight: 800; - border-radius: 999px; - padding: 4px 12px; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - - // Lo que se usa prestando servicios no se vende: no lleva el azul, que - // aquí significa «mercancía que sale por caja». - &.beyond_insumo { - background: $beyond-surface-hover; - color: $beyond-ink-softer; - } -} - -.beyond_tabla_existencia { - text-align: right; - display: flex; - flex-direction: column; - gap: 1px; -} - -.beyond_tabla_cantidad { - font-size: 19px; - font-weight: 800; - letter-spacing: -.02em; - font-variant-numeric: tabular-nums; -} - -.beyond_tabla_estado { - font-size: 11.5px; - font-weight: 800; -} - -// El estado colorea SU renglón de texto, no la fila entera: el rojo y el -// ámbar son señal y pierden fuerza si tiñen media pantalla. -.beyond_estado_negativa .beyond_tabla_cantidad, -.beyond_estado_negativa .beyond_tabla_estado { color: $beyond-panel-rojo; } -.beyond_estado_agotarse .beyond_tabla_cantidad, -.beyond_estado_agotarse .beyond_tabla_estado { color: $inv-ambar; } -.beyond_estado_suficiente .beyond_tabla_estado { color: $inv-verde; } -.beyond_estado_sin .beyond_tabla_cantidad, -.beyond_estado_sin .beyond_tabla_estado { color: $beyond-ink-muted; } - -.beyond_tabla_minimo { - text-align: right; - font-size: 14px; - font-weight: 700; - color: $beyond-ink-softer; -} - -.beyond_tabla_entrada { - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-softer; -} - -.beyond_tabla_acciones { - display: flex; - align-items: center; - gap: 8px; - justify-self: end; - - button { - all: unset; - cursor: pointer; - padding: 9px 17px; - border-radius: 999px; - font-size: 13px; - font-weight: 800; - background: $beyond-surface-hover; - color: $beyond-ink-soft; - transition: background 140ms ease; - - &:hover { background: $beyond-surface-active; } - - &:focus-visible { - outline: 2px solid $beyond-panel-azul-inventario; - outline-offset: 2px; - } - } - - // «Ajustar» en el tinte del azul: es la acción de inventario del - // renglón. Anidado bajo las acciones para no pisar la pantalla de - // ajuste, que usa la misma clase en su tarjeta. - .beyond_ajuste { - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - - &:hover { background: #D6E3EC; } - } -} - -.beyond_inventario_vacio { - padding: 48px 16px; - text-align: center; - font-size: 14px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// La existencia negativa es SEÑAL, no decoración: se vendió algo que nunca -// se registró como recibido. -.beyond_aviso { - display: block; - font-size: 13px; - font-weight: 600; - color: $beyond-ink-muted; - padding: 4px 14px 8px; - text-wrap: pretty; -} - - -// ══ Migas de las pantallas de dentro ════════════════════════════════════ -.beyond_migas { - padding-bottom: 4px; - - .beyond_migas_texto { - display: flex; - flex-direction: column; - gap: 1px; - } - - .beyond_inventario_titulo { font-size: 21px; } -} - -// ══ Recibir mercancía ═══════════════════════════════════════════════════ -// Dos columnas: de dónde sale la mercancía y lo que ya se lleva contado. -.beyond_recibir_hoja { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 14px; - align-items: start; - - // Antes de romperse, se apilan: con la caja en la mano no se trabaja en - // dos columnas de 300px. - @media (max-width: 1100px) { grid-template-columns: 1fr; } -} - -.beyond_recibir_col { - display: flex; - flex-direction: column; - gap: 14px; - min-width: 0; -} - -// El mockup llama a esta tarjeta `.beyond_panel`, pero ese nombre YA está -// tomado: es la clase que lleva el cuando se enciende la piel del -// Panel General. Con la regla suelta, el panel entero se pintaba de blanco -// con 18px de relleno y las pestañas acababan encima del título. -.beyond_inventario_panel { - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 18px 20px; -} - -.beyond_inventario_panel_cabeza { - display: flex; - align-items: baseline; - gap: 10px; - padding-bottom: 4px; -} - -.beyond_inventario_panel_titulo { - font-size: 11px; - font-weight: 800; - letter-spacing: .09em; - text-transform: uppercase; - color: $beyond-ink-muted; -} - -.beyond_inventario_panel_pie { - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; - padding-top: 10px; - text-wrap: pretty; -} - -.beyond_inventario_panel_enlace { - all: unset; - cursor: pointer; - margin-left: auto; - font-size: 13px; - font-weight: 800; - color: $beyond-panel-azul-tinta; - - &:hover { text-decoration: underline; } -} - -.beyond_escaneo { - display: flex; - align-items: center; - gap: 10px; - - input { - flex: 1; - min-width: 0; + .beyond_comentario input { + width: 100%; background: $inv-campo; border: 1px solid $beyond-surface-active; border-radius: 14px; - padding: 13px 16px 13px 44px; + padding: 12px 16px; outline: none; - font-size: 14.5px; - font-weight: 700; + font-size: 14px; + font-weight: 600; color: $beyond-ink; - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 15px center; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } + margin-top: 10px; } -} -.beyond_escaneo_camara { - all: unset; - cursor: pointer; - flex: none; - width: 46px; - height: 46px; - border-radius: 14px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-soft; - background: $beyond-surface-hover; - transition: background 140ms ease; - - &:hover { background: $beyond-surface-active; } -} - -// Un código que no está en el catálogo no es un error de quien escanea: se -// le dice qué hacer, y el texto lo escribe el servidor. -.beyond_escaneo_aviso { - display: flex; - align-items: flex-start; - gap: 10px; - margin-top: 12px; - background: $inv-ambar-tinte; - color: $inv-ambar; - border-radius: 14px; - padding: 12px 16px; - font-size: 13.5px; - font-weight: 700; - text-wrap: pretty; - - .fa { margin-top: 2px; } -} - -.beyond_catalogo_fila { - display: flex; - align-items: center; - gap: 12px; - padding: 12px 4px; - border-top: 1px solid $inv-linea; - - .beyond_tabla_nombre { flex: none; } -} - -.beyond_catalogo_tiene { - margin-left: auto; - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-softer; - white-space: nowrap; -} - -.beyond_catalogo_mas { - all: unset; - cursor: pointer; - flex: none; - width: 32px; - height: 32px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - font-size: 18px; - font-weight: 800; - line-height: 1; - transition: background 140ms ease; - - &:hover { background: #D6E3EC; } -} - -.beyond_entrada_eje, -.beyond_entrada_fila { - display: grid; - grid-template-columns: 1.6fr 0.6fr 0.7fr 0.7fr auto; - gap: 12px; - align-items: center; -} - -.beyond_entrada_eje { - padding: 2px 4px 12px; - - span:not(:first-child) { text-align: right; } -} - -.beyond_entrada_fila { - padding: 11px 4px; - border-top: 1px solid $inv-linea; -} - -.beyond_entrada_num { - text-align: right; - font-size: 14px; - font-weight: 700; -} - -// Lo que quedará es la cifra que se compara con la caja física: pesa más -// que las otras dos. -.beyond_entrada_quedara { - font-size: 15px; - font-weight: 800; - color: $beyond-panel-azul-tinta; -} - -.beyond_entrada_rescate { - font-size: 12.5px; - font-weight: 700; - color: $beyond-panel-rojo; -} - -// La cantidad se escribe: una caja trae doce, no doce toques. -.beyond_entrada_cantidad { - width: 100%; - text-align: right; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 10px; - padding: 7px 10px; - outline: none; - font-size: 14px; - font-weight: 800; - color: $beyond-ink; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } -} - -.beyond_entrada_quitar { - all: unset; - cursor: pointer; - width: 26px; - height: 26px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-muted; - font-size: 15px; - font-weight: 800; - - &:hover { background: $beyond-surface-hover; color: $beyond-panel-rojo; } -} - -.beyond_entrada_vacio { - display: flex; - flex-direction: column; - align-items: center; - gap: 8px; - padding: 46px 16px; - - .fa { font-size: 26px; color: $beyond-surface-active; } - b { font-size: 14.5px; font-weight: 800; } - span { font-size: 13px; font-weight: 600; color: $beyond-ink-muted; } -} - -.beyond_nota input { - width: 100%; - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 14px; - padding: 12px 16px; - outline: none; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - margin-top: 10px; -} - -.beyond_pie_acciones { - display: flex; - align-items: center; - gap: 14px; - flex-wrap: wrap; - padding-top: 14px; -} - -.beyond_boton_azul { - all: unset; - cursor: pointer; - padding: 12px 24px; - border-radius: 999px; - background: $beyond-panel-azul-inventario; - color: #FFFFFF; - font-size: 14px; - font-weight: 800; - transition: background 140ms ease; - - &:hover { background: $beyond-panel-azul-inventario-hover; } - - &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } - - // Apagado CON su razón al lado, que va en el marcado. - &[disabled] { - background: $beyond-surface-hover; - color: $beyond-ink-muted; - cursor: default; - } -} - -.beyond_boton_llano { - all: unset; - cursor: pointer; - padding: 12px 22px; - border-radius: 999px; - background: $beyond-surface-hover; - color: $beyond-ink-soft; - font-size: 14px; - font-weight: 800; - - &:hover { background: $beyond-surface-active; } - - &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } -} - -.beyond_razon { - font-size: 13px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// ══ Ajustar existencia ══════════════════════════════════════════════════ -.beyond_ajustar_hoja { - max-width: 820px; - margin: 0 auto; - width: 100%; -} - -.beyond_inventario_panel.beyond_ajustar_panel { padding: 24px 26px 22px; } - -.beyond_ajustar_cabeza { - display: flex; - align-items: center; - gap: 12px; - padding-bottom: 18px; - - .beyond_tabla_nombre { font-size: 21px; } -} - -.beyond_ajustar_paso { - display: grid; - grid-template-columns: 1fr auto 1fr; - gap: 14px; - align-items: center; - - @media (max-width: 620px) { grid-template-columns: 1fr; } -} - -.beyond_ajustar_caja { - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 18px; - padding: 14px 18px 16px; - display: flex; - flex-direction: column; - gap: 4px; - - &.beyond_destino { - background: $beyond-panel-azul-tinte; - border-color: #CDDDE8; - - .beyond_inventario_panel_titulo { color: $beyond-panel-azul-tinta; } - } -} - -.beyond_ajustar_valor { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - font-size: 27px; - font-weight: 800; - letter-spacing: -.02em; -} - -.beyond_ajustar_paso1 { - all: unset; - cursor: pointer; - width: 36px; - height: 36px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - font-size: 19px; - font-weight: 800; - line-height: 1; - - &:hover { background: $beyond-surface-hover; } -} - -// Escribible: de −3 a 40 con el botón + son cuarenta y tres toques. -.beyond_ajustar_campo { - width: 92px; - text-align: center; - background: $beyond-panel-tarjeta; - border: 1px solid #CDDDE8; - border-radius: 12px; - padding: 4px 6px; - outline: none; - font-size: 27px; - font-weight: 800; - letter-spacing: -.02em; - color: $beyond-ink; - font-family: inherit; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } -} - -.beyond_ajustar_flecha { - color: $beyond-ink-muted; - font-size: 19px; - font-weight: 800; - text-align: center; -} - -// La diferencia, dicha: «bajan 4» se entiende sin haber aprendido qué -// significa el ámbar. -.beyond_ajustar_diferencia { - display: flex; - align-items: center; - gap: 10px; - margin: 16px 0 20px; - background: $beyond-surface-hover; - border-radius: 16px; - padding: 13px 17px; - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-soft; - - &.beyond_sube { + .beyond_ajustar_aviso { + display: flex; + align-items: center; + gap: 11px; + margin: 20px 0 4px; background: $beyond-panel-azul-tinte; color: $beyond-panel-azul-tinta; + border-radius: 16px; + padding: 13px 17px; + font-size: 13.5px; + font-weight: 700; + text-wrap: pretty; } - &.beyond_baja { background: $inv-ambar-tinte; color: $inv-ambar; } -} - -.beyond_motivos { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin: 10px 0 20px; -} - -// El elegido tiene que verse a un metro: dos chips que se distinguen por un -// gris casi igual es lo mismo que ninguno elegido — el tropiezo que ya tuvo -// «Nivel de acceso» en la ficha de personal. -.beyond_motivo { - all: unset; - cursor: pointer; - padding: 10px 18px; - border-radius: 999px; - background: $beyond-surface; - color: $beyond-ink-soft; - font-size: 13.5px; - font-weight: 800; - transition: background 140ms ease, color 140ms ease; - - &:hover { background: $beyond-surface-hover; } - - &.beyond_activo { - background: $beyond-panel-azul-inventario; - color: #FFFFFF; + // ══ Historial · cajón lateral ═══════════════════════════════════════════ + .beyond_cajon_fondo { + position: fixed; + inset: 0; + background: rgba(35, 32, 29, .34); + z-index: 1050; } - &:focus-visible { - outline: 2px solid $beyond-panel-azul-inventario; - outline-offset: 2px; + .beyond_cajon { + position: fixed; + top: 0; + right: 0; + bottom: 0; + // Nada de `min()`: Sass intenta resolverlo en tiempo de compilación, + // con unidades mezcladas revienta y se lleva el archivo entero por + // delante —sin una sola línea de estilo, y sin error visible—. + width: 440px; + max-width: 92vw; + z-index: 1051; + background: $beyond-panel-tarjeta; + border-left: 1px solid $beyond-surface-active; + display: flex; + flex-direction: column; + overflow-y: auto; + padding: 22px 24px 32px; + } + + .beyond_cajon_cabeza { + display: flex; + align-items: flex-start; + gap: 12px; + padding-bottom: 16px; + } + + .beyond_cajon_identidad { + display: flex; + flex-direction: column; + gap: 3px; + min-width: 0; + } + + .beyond_cajon_titulo { + font-size: 19px; + font-weight: 800; + letter-spacing: -.01em; + } + + .beyond_cajon_pie { + font-size: 13px; + font-weight: 700; + color: $beyond-ink-muted; + } + + .beyond_cajon_cerrar { + all: unset; + cursor: pointer; + margin-left: auto; + flex: none; + width: 32px; + height: 32px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-muted; + font-size: 17px; + font-weight: 800; + + &:hover { background: $beyond-surface-hover; color: $beyond-ink; } + } + + .beyond_cajon_filtros { + display: flex; + flex-wrap: wrap; + gap: 8px; + padding-bottom: 8px; + + .beyond_inventario_uso button { padding: 6px 13px; font-size: 12.5px; } + } + + .beyond_movimiento { + display: flex; + flex-direction: column; + gap: 3px; + padding: 14px 2px; + border-top: 1px solid $inv-linea; + } + + .beyond_movimiento_alto { + display: flex; + align-items: baseline; + gap: 10px; + } + + .beyond_movimiento_tipo { + font-size: 14px; + font-weight: 800; + } + + .beyond_movimiento_cantidad { + margin-left: auto; + font-size: 14.5px; + font-weight: 800; + + &.beyond_entra { color: $beyond-panel-azul-tinta; } + &.beyond_sale { color: $inv-ambar; } + } + + .beyond_movimiento_detalle { + font-size: 13px; + font-weight: 600; + color: $beyond-ink-softer; + text-wrap: pretty; + } + + .beyond_movimiento_quien { + font-size: 12.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // En cuánto quedó: es lo que deja seguir la cuenta hacia atrás. + .beyond_movimiento_resultante { + font-size: 12.5px; + font-weight: 800; + color: $beyond-ink-muted; + } + + .beyond_cajon_nota { + margin: 16px 0 0; + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + text-wrap: pretty; } } - -.beyond_comentario input { - width: 100%; - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 14px; - padding: 12px 16px; - outline: none; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - margin-top: 10px; -} - -.beyond_ajustar_aviso { - display: flex; - align-items: center; - gap: 11px; - margin: 20px 0 4px; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - border-radius: 16px; - padding: 13px 17px; - font-size: 13.5px; - font-weight: 700; - text-wrap: pretty; -} - -// ══ Historial · cajón lateral ═══════════════════════════════════════════ -.beyond_cajon_fondo { - position: fixed; - inset: 0; - background: rgba(35, 32, 29, .34); - z-index: 1050; -} - -.beyond_cajon { - position: fixed; - top: 0; - right: 0; - bottom: 0; - // Nada de `min()`: Sass intenta resolverlo en tiempo de compilación, - // con unidades mezcladas revienta y se lleva el archivo entero por - // delante —sin una sola línea de estilo, y sin error visible—. - width: 440px; - max-width: 92vw; - z-index: 1051; - background: $beyond-panel-tarjeta; - border-left: 1px solid $beyond-surface-active; - display: flex; - flex-direction: column; - overflow-y: auto; - padding: 22px 24px 32px; -} - -.beyond_cajon_cabeza { - display: flex; - align-items: flex-start; - gap: 12px; - padding-bottom: 16px; -} - -.beyond_cajon_identidad { - display: flex; - flex-direction: column; - gap: 3px; - min-width: 0; -} - -.beyond_cajon_titulo { - font-size: 19px; - font-weight: 800; - letter-spacing: -.01em; -} - -.beyond_cajon_pie { - font-size: 13px; - font-weight: 700; - color: $beyond-ink-muted; -} - -.beyond_cajon_cerrar { - all: unset; - cursor: pointer; - margin-left: auto; - flex: none; - width: 32px; - height: 32px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-muted; - font-size: 17px; - font-weight: 800; - - &:hover { background: $beyond-surface-hover; color: $beyond-ink; } -} - -.beyond_cajon_filtros { - display: flex; - flex-wrap: wrap; - gap: 8px; - padding-bottom: 8px; - - .beyond_inventario_uso button { padding: 6px 13px; font-size: 12.5px; } -} - -.beyond_movimiento { - display: flex; - flex-direction: column; - gap: 3px; - padding: 14px 2px; - border-top: 1px solid $inv-linea; -} - -.beyond_movimiento_alto { - display: flex; - align-items: baseline; - gap: 10px; -} - -.beyond_movimiento_tipo { - font-size: 14px; - font-weight: 800; -} - -.beyond_movimiento_cantidad { - margin-left: auto; - font-size: 14.5px; - font-weight: 800; - - &.beyond_entra { color: $beyond-panel-azul-tinta; } - &.beyond_sale { color: $inv-ambar; } -} - -.beyond_movimiento_detalle { - font-size: 13px; - font-weight: 600; - color: $beyond-ink-softer; - text-wrap: pretty; -} - -.beyond_movimiento_quien { - font-size: 12.5px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// En cuánto quedó: es lo que deja seguir la cuenta hacia atrás. -.beyond_movimiento_resultante { - font-size: 12.5px; - font-weight: 800; - color: $beyond-ink-muted; -} - -.beyond_cajon_nota { - margin: 16px 0 0; - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; - text-wrap: pretty; -} diff --git a/docs/adr/ADR-027-cada-pantalla-manda-en-sus-clases.md b/docs/adr/ADR-027-cada-pantalla-manda-en-sus-clases.md new file mode 100644 index 0000000..0a3d687 --- /dev/null +++ b/docs/adr/ADR-027-cada-pantalla-manda-en-sus-clases.md @@ -0,0 +1,65 @@ +# ADR-027: Cada pantalla manda en sus clases, y no en las del vecino + +- **Fecha:** 2026-09-01 +- **Estado:** Aceptada +- **Relacionada con:** ADR-013 (la piel del panel) · ADR-022 (la frontera con Odoo) + +## Contexto + +Las pantallas de Beyond comparten vocabulario a propósito: `beyond_cifra`, +`beyond_tabla`, `beyond_punto`, `beyond_suave` significan lo mismo en todas +—una métrica, una lista, un estado, una acción que no compite— y esa es la +razón de que la casa se vea de una pieza. + +El problema no es el nombre compartido: es **dónde se escribe la regla**. Los +archivos de estilo de Inventario y de Tableros definían buena parte de sus +reglas en la raíz, sin colgar de la pantalla a la que pertenecen. Una regla en +la raíz aplica en toda la aplicación, y entonces el nombre deja de ser +vocabulario común y pasa a ser una decisión de otro que llega sin avisar. + +Se cobró en el punto de venta. Inventario dibuja su `beyond_cifra` como un +círculo de 44px con la cifra centrada y en el azul de inventario. El punto de +venta llama `beyond_cifra` a su tarjeta de métrica —KPI de 32px sobre fondo +blanco— y define ancho, alto y color... salvo que **no** definía `width` ni +`color` directo, porque no le hacían falta. Resultado en las tres pantallas: +seis tarjetas —«vendido hoy», «tickets», «efectivo en caja», «órdenes», +«ventas», «cobrado»— colapsadas a un cuadro de 44px con el texto desbordado y +el número en azul marino. + +Nada dio error. El SCSS compiló, la suite pasó —839 pruebas— y las pruebas de +datos del punto de venta siguieron verdes, porque el servidor devolvía lo +correcto. Lo vio el cliente. + +## Decisión + +**Una regla de estilo cuelga de la pantalla a la que pertenece.** El archivo de +una pantalla empieza por su raíz —`.o_beyond_pos`, `.o_beyond_inventario`, +`.o_beyond_tablero`— y todo lo demás va dentro. + +Se salvan tres casos, y solo tres: + +1. Los **tokens** (`$beyond-primary`, los azules del panel): son variables, no + reglas, y no pintan nada por sí solas. +2. La **piel del panel** (`body.beyond_panel` y sus acentos): es del cuerpo por + definición, y de ahí viene su peso. +3. Lo que se pinta **fuera de la raíz** de la pantalla: un diálogo o un menú + que Odoo monta en otro sitio del DOM. Se dice en un comentario por qué. + +Y una consecuencia práctica: **una pantalla dice el ancho y el color de sus +piezas aunque el valor parezca redundante**. `width: auto` en una tarjeta que +ya sería `auto` no es ruido: es la frase que impide que la escriba otro. + +## Consecuencias + +- Inventario quedó acotado a `.o_beyond_inventario` (este cambio). +- El punto de venta se defiende además con `!important` en el tamaño de sus + botones, porque `.beyond_suave` de Tableros lleva uno. Es un parche con + fecha de caducidad. +- **Deuda anotada:** `beyond_reports/tablero.scss` sigue con seis reglas en la + raíz —`beyond_vacio`, `beyond_filtros`, `beyond_leyenda`, `beyond_grafica`, + `beyond_suave`, `beyond_punto`—. Acotarlo a `.o_beyond_tablero` cierra el + agujero y permite quitar los `!important` del punto de venta. No se hizo en + el mismo paso para no mezclar el arreglo de una pantalla con el de otra. +- Lo que se ve **se comprueba viéndolo**: el punto de venta tenía prueba de + datos y ninguna de navegador, y esa mitad sin red es exactamente donde se + rompió. Se añadió `test_pos_navegador.py`.