/* DataWorks → the chat's sign-in page (wave 45).
 *
 * WHAT THIS FILE IS, AND WHY IT IS NOT PART OF theme.css. That file is a *mapping* — one console token per
 * LibreChat variable — and `SPEC-chat-theme.md` §8 refuses a component selector in it, which is the refusal that
 * keeps it reviewable. These rules are not a mapping: they are the sign-in page's own layout, and they name
 * LibreChat's DOM to move two things Sriga reported on 2026-10-04, in his words: *"the login page for the chat
 * looks ugly in the light mode … Also move it to top left corner. The welcome back lable and signin with dataworks
 * button are not aligned and looks out of whack."* Reasoning: `specs/SPEC-chat-branding.md` §2.3 and §2.4. Guards:
 * `tests/test_chat_branding.py`.
 *
 * IT DECLARES NO COLOUR, AND THAT IS A PROPERTY RATHER THAN A COINCIDENCE. Colours are `theme.css`'s job, every
 * one of them is a console token, and a colour in this file would be a second place for a rebrand to hide.
 *
 * THE SELECTOR LINE, WHICH IS THE PART WORTH READING TWICE. These rules have to reach a page LibreChat renders
 * from its own compiled bundle, and `SPEC-chat-theme.md` §8 refuses "a selector guess against a minified React
 * app". So exactly two forms are allowed here, and a guard enforces it:
 *
 *   1. **our own asset's filename**, in an attribute selector — `img[src$="logo.svg"]`. That path is the one the
 *      image's `COPY` replaces, so if LibreChat moves it our replacement has already broken and the branding
 *      spec's own Dockerfile guard says so.
 *   2. **a `data-testid` LibreChat ships**, and only one that the committed render contains
 *      (`tests/fixtures/signin-dom-v0.8.8.html`). A test hook is not a generated class name; it is a deliberate,
 *      stable hook, and the render is what makes it a fact rather than a wish.
 *
 * REFUSED, and each for the reason the theme gives: a Tailwind utility class (`w-authPageWidth`, `mt-6`) or a
 * hashed bundle class is the selector guess; `!important` means a selector fight has been lost; `@import` is a
 * second thing to fetch and cache; and re-aligning `h1` instead of the button would move every heading in the
 * signed-in app, because this file is loaded on every page.
 *
 * HOW IT SHIPS. `deploy/librechat/Dockerfile` copies this in, names it by its own content hash
 * (`dataworks-signin.<hash>.css`), and injects its `<link>` beside the theme's, immediately before `</head>` —
 * the same mechanism, for the same two-day-cache reason `theme.css` carries one.
 */

/* 1. The mark goes to the corner the console's own front door uses.
 *
 * MEASURED BEFORE IT WAS WRITTEN. The sign-in page puts the mark in a box that is `w-full h-10` with
 * `object-contain`, and `object-contain` centres what it holds — so the mark was centred on a 1280px window at x
 * ≈ 640, and no rule of ours could move it by changing the asset. `object-position` is the property that says
 * where inside that box the content sits, and it is why this is a stylesheet problem rather than a redraw.
 *
 * AND THE MARK IS NOT REDRAWN TO SUIT: `logo.svg` keeps its own proportions and is height-constrained at 40px, so
 * a typical window paints it about 170px wide in the corner. The inset is the console's own (`--sp-7` `30px`,
 * which is the distance its hero mark sits from the panel edge), and `padding-left` rather than `margin-left`
 * because the box is `w-full`: padding shrinks the *content* box, so the mark moves and nothing else on the page
 * does. */
img[src$="logo.svg"] {
    object-position: left center;
    padding-left: 30px; /* --sp-7 */
}

/* 2. The button's label sits on the heading's axis.
 *
 * MEASURED BEFORE IT WAS WRITTEN. The heading above it is `text-center` — LibreChat's own rule, in the compiled
 * bundle, and not ours to move — while the button is `w-full` with its content left-aligned and a 12px gap between
 * the icon and the label. At 1280px the button spans 480–800px and its content 510–696px, so the label's centre
 * sat at 613px against the heading's 640px: about 18px of drift, which is what "out of whack" was measuring.
 *
 * WHY CENTRING RATHER THAN LEFT-ALIGNING THE HEADING. The console's own sign-in button centres its label
 * (screenshot, 2026-10-04), so this is the console's pattern; and the heading is a string in a bundle we cannot
 * restyle without moving every `h1` in the product. */
[data-testid="openid"] {
    justify-content: center;
}
