Lanzador en columna de puertas anchas, login migrado del 991.98 a la tablet del contrato, toasts a lo ancho, panel con el 1199 fusionado en la tablet y densidad de mano en teléfono, sucursales/catálogo/matriz/ mi perfil/clientes con su bloque móvil al final de su SCSS y dentro de su raíz (ADR-027), pisos táctiles con $beyond-panel-tactil donde el token resuelve y 48px con nota donde no. Prueba nueva: el humo de anchos a 375×812, en archivo propio. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
452 lines
15 KiB
SCSS
452 lines
15 KiB
SCSS
// =============================================================================
|
||
// Beyond — login v1
|
||
//
|
||
// Faithful translation of the signed-off "Iniciar sesión" (login_v1.html).
|
||
// Every colour, radius, size, gap, duration and font weight below is copied
|
||
// from that file, unrounded; the rules that have no counterpart there are
|
||
// marked ENGINEERING and say what they protect against — the design only
|
||
// covers the nominal case, and this one sits on top of Odoo's real login form.
|
||
//
|
||
// SCOPE — everything is nested under .beyond_login / .beyond_login_body. This
|
||
// file rides web.assets_frontend, which every public page loads (the employee
|
||
// portal of beyond_attendance_qr among them), so not one rule may escape the
|
||
// login screen. The QR kiosk is a standalone <html> template that calls no
|
||
// bundle at all and is out of reach by construction.
|
||
//
|
||
// PALETTE — the surfaces and the ink are the identity's own tokens; the design
|
||
// reuses them exactly. The black is NOT: the design paints the controls
|
||
// #191613 instead of the brand green, deliberately, so the pre-session screen
|
||
// reads as the product's cover rather than as another green ERP form. Per the
|
||
// rule written in scss/beyond_variables.scss ("a colour graduates to a token
|
||
// when a SECOND screen needs it") that black, the field white, the placeholder
|
||
// grey and the eye's hover stay local variables here. So does the error
|
||
// orange, even though it is byte-for-byte the launcher's "Panel General":
|
||
// same hex, unrelated meaning.
|
||
// =============================================================================
|
||
|
||
// The control black of the login and its hover/pressed states.
|
||
$beyond-login-ink: #191613;
|
||
$beyond-login-ink-hover: #33302B;
|
||
$beyond-login-ink-active: #000000;
|
||
|
||
// The brand panel behind the logo — flat black, not the ink above.
|
||
$beyond-login-brand-bg: #000000;
|
||
|
||
// Fields
|
||
$beyond-login-field-bg: #FFFFFF;
|
||
$beyond-login-placeholder: #B3ADA3;
|
||
$beyond-login-eye-hover: #F0EEE8;
|
||
|
||
// The focus ring the design draws around a field in focus.
|
||
$beyond-login-ring: rgba(25, 22, 19, 0.10);
|
||
|
||
// Error text. Same hex as $beyond-launcher-panel and unrelated to it.
|
||
$beyond-login-error: #C55A22;
|
||
|
||
// -----------------------------------------------------------------------------
|
||
// Page
|
||
//
|
||
// ENGINEERING — the class replaces Odoo's `bg-100` on <body> rather than
|
||
// joining it (see views/login_templates.xml): the utility paints the body with
|
||
// !important and there is no point in an override war on a page we own whole.
|
||
// -----------------------------------------------------------------------------
|
||
.beyond_login_body {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: $beyond-surface;
|
||
color: $beyond-ink;
|
||
font-family: $beyond-font-family;
|
||
-webkit-font-smoothing: antialiased;
|
||
overflow: hidden; // the design is 100vh with no scroll
|
||
}
|
||
|
||
.beyond_login {
|
||
height: 100vh;
|
||
display: flex;
|
||
background: $beyond-surface;
|
||
color: $beyond-ink;
|
||
overflow: hidden;
|
||
|
||
// ---------------------------------------------------------------------
|
||
// Left: the brand panel
|
||
// ---------------------------------------------------------------------
|
||
.beyond_login_brand {
|
||
flex: 1 1 46%;
|
||
min-width: 0;
|
||
background: $beyond-login-brand-bg;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 56px;
|
||
}
|
||
|
||
.beyond_login_logo {
|
||
display: block;
|
||
// The design says `width: min(360px, 72%)`. Written as a pair because
|
||
// Sass evaluates a bare min() itself and refuses to compare px with %;
|
||
// the used width is identical.
|
||
width: 72%;
|
||
max-width: 360px;
|
||
height: auto;
|
||
}
|
||
|
||
// ---------------------------------------------------------------------
|
||
// Right: the form
|
||
// ---------------------------------------------------------------------
|
||
.beyond_login_panel {
|
||
flex: 1 1 54%;
|
||
min-width: 0;
|
||
display: flex;
|
||
justify-content: center;
|
||
padding: 40px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.beyond_login_stack {
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
max-width: 440px;
|
||
margin: auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 26px;
|
||
}
|
||
|
||
// ENGINEERING — web.login ships two empty `oe_structure` drop zones around
|
||
// the form. Empty flex children still eat a 26px gap each, so they are
|
||
// hidden while empty and left alone the moment anything is dropped in.
|
||
.oe_structure:empty {
|
||
display: none;
|
||
}
|
||
|
||
.beyond_login_title {
|
||
font-size: 34px;
|
||
font-weight: 800;
|
||
letter-spacing: -0.03em;
|
||
color: $beyond-ink;
|
||
}
|
||
|
||
// The form is a column on the same 26px rhythm as the stack around it, so
|
||
// title / user / password / CTA / error / signature read as one list.
|
||
.beyond_login_form {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 26px;
|
||
}
|
||
|
||
// ENGINEERING — the database picker is core's, shown only when the server
|
||
// serves more than one database. It keeps its Bootstrap look (a developer
|
||
// sees it, an employee never does); all it needs is to stop fighting the
|
||
// column's own rhythm with a utility margin.
|
||
.beyond_login_form > .mb-3 {
|
||
margin-bottom: 0 !important;
|
||
}
|
||
|
||
// ---------------------------------------------------------------------
|
||
// Fields
|
||
// ---------------------------------------------------------------------
|
||
.beyond_login_field {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
|
||
.beyond_login_field_head {
|
||
display: flex;
|
||
align-items: baseline;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
}
|
||
|
||
.beyond_login_label {
|
||
margin: 0; // ENGINEERING — Bootstrap's reboot puts a margin on <label>
|
||
font-size: 13px;
|
||
font-weight: 800;
|
||
letter-spacing: 0.02em;
|
||
color: $beyond-ink-soft;
|
||
}
|
||
|
||
.beyond_login_forgot {
|
||
font-size: 13px;
|
||
font-weight: 700;
|
||
color: $beyond-ink-softer;
|
||
text-decoration: none;
|
||
|
||
// ENGINEERING — the design's global rule is `a { #191613 }` with
|
||
// `a:hover { #7A736A }`, and this link is already painted the hover
|
||
// colour, which would leave it with no feedback at all. It uses the
|
||
// same two colours, the other way round.
|
||
&:hover {
|
||
color: $beyond-login-ink;
|
||
}
|
||
}
|
||
|
||
.beyond_login_input {
|
||
all: unset;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
padding: 16px 18px;
|
||
border-radius: 16px;
|
||
background: $beyond-login-field-bg;
|
||
border: 1.5px solid $beyond-line;
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
color: $beyond-ink;
|
||
transition: border-color 140ms ease, box-shadow 140ms ease;
|
||
|
||
// Keyboard only, per the project rule — but a text field in focus
|
||
// always matches :focus-visible, click or Tab, because it is about to
|
||
// take keystrokes. The design's focus state survives intact.
|
||
&:focus-visible {
|
||
border-color: $beyond-login-ink;
|
||
box-shadow: 0 0 0 4px $beyond-login-ring;
|
||
}
|
||
}
|
||
|
||
// The password field is a bare input inside a pill that carries the frame,
|
||
// so that the eye button can live on the same border.
|
||
.beyond_login_pw {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
padding: 4px 6px 4px 18px;
|
||
border-radius: 16px;
|
||
background: $beyond-login-field-bg;
|
||
border: 1.5px solid $beyond-line;
|
||
transition: border-color 140ms ease, box-shadow 140ms ease;
|
||
|
||
// The design's rule is :focus-within; :has(:focus-visible) is the same
|
||
// thing restricted to keyboard focus, so the eye button being clicked
|
||
// does not light the whole pill.
|
||
&:has(:focus-visible) {
|
||
border-color: $beyond-login-ink;
|
||
box-shadow: 0 0 0 4px $beyond-login-ring;
|
||
}
|
||
}
|
||
|
||
.beyond_login_input_pw {
|
||
all: unset;
|
||
flex: 1;
|
||
min-width: 0;
|
||
padding: 12px 0;
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
color: $beyond-ink;
|
||
}
|
||
|
||
.beyond_login_input,
|
||
.beyond_login_input_pw {
|
||
&::placeholder {
|
||
color: $beyond-login-placeholder;
|
||
}
|
||
}
|
||
|
||
.beyond_login_eye {
|
||
all: unset;
|
||
position: relative; // ENGINEERING — anchors the touch target below
|
||
flex: none; // ENGINEERING — the pill must not squeeze it
|
||
cursor: pointer;
|
||
width: 44px;
|
||
height: 44px;
|
||
border-radius: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: $beyond-ink-softer; // the icon strokes currentColor
|
||
transition: background 140ms ease, color 140ms ease;
|
||
|
||
&:hover {
|
||
background: $beyond-login-eye-hover;
|
||
}
|
||
|
||
// ENGINEERING — the design paints a 44x44 box; the project floor for a
|
||
// touch target is 48 (CLAUDE.md, "Norte de diseño"). The painted box
|
||
// stays 44 and an invisible 48x48 sits centred on it, inside the room
|
||
// the pill's own padding leaves. Nothing moves, the finger gets 48.
|
||
&::after {
|
||
content: "";
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 48px;
|
||
height: 48px;
|
||
}
|
||
|
||
// ENGINEERING — the password is on screen; say so with more than the
|
||
// characters themselves. Pairs with aria-pressed on the button.
|
||
&[aria-pressed="true"] {
|
||
color: $beyond-ink;
|
||
}
|
||
|
||
svg {
|
||
display: block;
|
||
}
|
||
}
|
||
|
||
// ---------------------------------------------------------------------
|
||
// Call to action
|
||
// ---------------------------------------------------------------------
|
||
// ENGINEERING — core wraps the CTA and everything auth_signup bolts onto
|
||
// it in one `oe_login_buttons` div. That div has to survive (it is the
|
||
// xpath anchor) but it must not be a box, or its contents cannot be
|
||
// interleaved with the server's messages. `display: contents` dissolves
|
||
// it: the CTA becomes an item of the form's own column, on its 26px
|
||
// rhythm, and `order` below can place the message under it, where the
|
||
// design puts it.
|
||
.beyond_login_actions {
|
||
display: contents;
|
||
}
|
||
|
||
.beyond_login_submit {
|
||
all: unset;
|
||
cursor: pointer;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
padding: 18px;
|
||
border-radius: 16px;
|
||
background: $beyond-login-ink;
|
||
color: #FFFFFF;
|
||
text-align: center;
|
||
font-size: 17px;
|
||
font-weight: 800;
|
||
letter-spacing: 0.01em;
|
||
transition: background 140ms ease, transform 120ms ease;
|
||
|
||
&:hover {
|
||
background: $beyond-login-ink-hover;
|
||
}
|
||
|
||
&:active {
|
||
background: $beyond-login-ink-active;
|
||
transform: translateY(1px);
|
||
}
|
||
}
|
||
|
||
// ENGINEERING — `all: unset` strips the browser's own focus ring off every
|
||
// control on this screen, so the keyboard ring has to be put back by hand.
|
||
// :focus-visible only, so a click leaves no outline. The text fields are
|
||
// excluded: they light up through the design's own focus state above.
|
||
.beyond_login_submit,
|
||
.beyond_login_eye,
|
||
.beyond_login_forgot {
|
||
&:focus-visible {
|
||
outline: 3px solid $beyond-login-ink;
|
||
outline-offset: 3px;
|
||
}
|
||
}
|
||
|
||
// ---------------------------------------------------------------------
|
||
// Server messages
|
||
//
|
||
// Odoo writes these after the POST — "Wrong login/password", the reset
|
||
// mail confirmation, an access notice. There is no client-side validation
|
||
// on this screen and no invented copy: whatever the server says, in the
|
||
// design's voice.
|
||
//
|
||
// ENGINEERING — `order` because the design puts the message under the CTA
|
||
// while web.login emits it above. Visual order follows the design, source
|
||
// order stays the accessible one (a screen reader meets the error before
|
||
// the button that produced it).
|
||
// ---------------------------------------------------------------------
|
||
.beyond_login_error,
|
||
.beyond_login_message,
|
||
.o_caps_lock_warning_text {
|
||
order: 1;
|
||
margin: 0;
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.beyond_login_error,
|
||
.o_caps_lock_warning_text {
|
||
color: $beyond-login-error;
|
||
}
|
||
|
||
// Success is the brand green — the only place on this screen it appears.
|
||
.beyond_login_message {
|
||
color: $beyond-primary;
|
||
}
|
||
|
||
.o_caps_lock_warning_text {
|
||
display: block;
|
||
}
|
||
|
||
// ---------------------------------------------------------------------
|
||
// The signature, at the foot
|
||
// ---------------------------------------------------------------------
|
||
.beyond_login_sign {
|
||
text-align: center;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.04em;
|
||
color: $beyond-ink-muted;
|
||
}
|
||
}
|
||
|
||
// -----------------------------------------------------------------------------
|
||
// Narrow
|
||
//
|
||
// ENGINEERING — the design is one desktop artboard. Below the tablet
|
||
// breakpoint the 46% black column would leave the form a strip too thin to
|
||
// fill, so the panel collapses into a short band above the form and the form
|
||
// takes the whole width. Checked at 768px and at 390px.
|
||
// -----------------------------------------------------------------------------
|
||
// Migrado del 991.98px histórico al breakpoint del contrato móvil
|
||
// (Pieza A, 17-sep-2026): tablet = 1023px, sin excepción. La franja
|
||
// 992–1023 gana el apilado; el diseño ya estaba comprobado a 768 y 390.
|
||
.beyond_login_body {
|
||
@include beyond-tablet {
|
||
overflow: auto; // stacked, the page is allowed to be taller than the viewport
|
||
}
|
||
}
|
||
|
||
.beyond_login {
|
||
@include beyond-tablet {
|
||
height: auto;
|
||
min-height: 100vh;
|
||
flex-direction: column;
|
||
overflow: visible;
|
||
|
||
.beyond_login_brand {
|
||
flex: 0 0 auto;
|
||
padding: 28px 24px;
|
||
}
|
||
|
||
.beyond_login_logo {
|
||
width: 60%;
|
||
max-width: 240px;
|
||
}
|
||
|
||
.beyond_login_panel {
|
||
flex: 1 1 auto;
|
||
padding: 32px 24px 40px;
|
||
overflow: visible;
|
||
}
|
||
|
||
// A phone on its side, or a short window: the band would take the
|
||
// screen the form needs, so the logo goes and the form gets
|
||
// everything. (Las queries anidadas se combinan con AND: el CSS
|
||
// resultante es el mismo que el par 1023 + max-height de antes.)
|
||
@media (max-height: 520px) {
|
||
.beyond_login_brand {
|
||
display: none;
|
||
}
|
||
}
|
||
}
|
||
|
||
// Táctil por capacidad: campos y botón al piso de dedo. 48px =
|
||
// $beyond-panel-tactil; el token vive en el bundle del panel y el
|
||
// login compila en assets_frontend, donde no resuelve — mismo piso,
|
||
// sin declarar otro token (contrato de Pieza A).
|
||
@include beyond-tactil {
|
||
.beyond_login_input,
|
||
.beyond_login_input_pw,
|
||
.beyond_login_submit {
|
||
min-height: 48px;
|
||
}
|
||
}
|
||
}
|