/*!
 * -------------------------------------------------------------------------
 * Fb Industry Automation branding plugin for GLPI — design layer
 * -------------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of the Fb Industry Automation branding plugin.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 * -------------------------------------------------------------------------
 */

/* =========================================================================
 * CONTRACT — read this before adding a rule.
 * =========================================================================
 *
 * THE ONE RULE
 * ------------
 * Rebrand by redefining GLPI's design tokens. Do not restyle GLPI's
 * components.
 *
 * GLPI 11 is built on Tabler and drives every colour, radius and font through
 * custom properties declared on `:root` in `css/includes/_base.scss`. A
 * branding plugin that redefines those properties inherits every component
 * GLPI has now and every component it grows later, and survives an upgrade
 * because it never named a class. A branding plugin that writes
 * `.btn-primary { background: green }` inherits nothing, breaks the first time
 * Tabler renames a class, and is exactly the "fragile override" the brief
 * prohibits.
 *
 * So: section 2 is the plugin. Sections 3 onward exist only for the handful of
 * things a token genuinely cannot express — a logo's aspect ratio, a focus
 * ring's shape, the login card's composition. Every selector in those sections
 * is quoted from the GLPI 11.0.8 source with a file reference, and every one of
 * them is a liability at upgrade time. Adding a rule there is a decision to
 * defend, not a default.
 *
 * WHAT VERIFIED AGAINST WHAT
 * --------------------------
 * All core references below were read out of GLPI 11.0.8:
 *   css/includes/_base.scss                     :root light tokens, .glpi-logo
 *   css/includes/_palette_dark.scss             :root[data-glpi-theme-dark="1"]
 *   css/includes/_highcontrast.scss             :root[data-high-contrast="1"]
 *   css/includes/components/_global-menu.scss   .sidebar, body.navbar-collapsed
 *   templates/layout/parts/head.html.twig       writes those root attributes
 *   templates/layout/page_card_notlogged.html.twig  the anonymous/login layout
 *   public/lib/tabler.css                       Tabler's own token defaults
 *
 * COLOUR IS NOT CHOSEN HERE
 * -------------------------
 * Every hex in section 1 is either quoted from the Design Guide or computed
 * from a guide colour by `tools/check-contrast.py`, which is also the test that
 * fails if one of them drifts below its WCAG floor. `docs/corporate-identity.md`
 * carries the derivations. Do not add a hex anywhere below section 1.
 *
 * WHAT THIS FILE DOES NOT SET
 * ---------------------------
 * Per-entity values — the six logo URLs, and any colour an administrator has
 * overridden. Those arrive from `/plugins/fbbranding/theme.css`, which is
 * loaded after this file and overrides these defaults. Keeping the defaults
 * here and only the differences there is what lets this large file be cached
 * immutably per plugin version while the small one varies per entity.
 * ========================================================================= */


/* =========================================================================
 * 1. BRAND TOKENS
 * =========================================================================
 * The identity, in one place, in the plugin's own namespace. Nothing outside
 * this section may contain a colour literal.
 *
 * Contrast figures are measured with the WCAG 2.1 relative-luminance formula
 * and re-checked by `tools/check-contrast.py`. AA body text needs 4.5:1; large
 * text and UI boundaries need 3:1.
 * ========================================================================= */

:root {
    /* ---- Design Guide p.2 "HAUPTFARBEN", exactly as printed --------------
     * These are the guide's values, NOT the values measured out of the logo
     * artwork (#43AD48 / #0D3623). The two differ visibly and the customer
     * ruled for the guide on 2026-09-01. The sibling `assetprotocols` plugin
     * carries the older ruling and therefore paints a different green on
     * purpose — see docs/corporate-identity.md §1. Do not reconcile them. */
    --fb-green: #1ec95b;            /* Vibrant Green — Primary. FILL ONLY.   */
    --fb-deep: #043623;             /* Racing Green  — Primary               */
    --fb-red: #fa4646;              /* Rec Red       — Accent, not a status  */
    --fb-grey: #f3f3f3;             /* Bright Identity                       */
    --fb-white: #fff;               /* Bright Identity                       */

    /* ---- Interaction states for the Vibrant Green fill -------------------
     * Black-mixed. The ceiling is hard: at 15% black the fill drops to 4.48:1
     * against its own Racing Green label and fails AA. 6% and 12% are chosen
     * to leave headroom under a 14% cliff, not picked for looks. */
    --fb-green-hover: #1cbd56;      /* 6% black  — 5.43:1 vs --fb-deep       */
    --fb-green-active: #1ab150;     /* 12% black — 4.78:1 vs --fb-deep       */

    /* ---- Text-safe derivations ------------------------------------------
     * Hue and saturation preserved; lightness lowered only as far as AA
     * requires on BOTH light grounds (#fff and #f3f3f3). Vibrant Green itself
     * measures 2.20:1 on white — it is a fill colour and never text on a light
     * ground. Anything that reads as green *text* uses these. */
    --fb-green-text: #13803a;       /* 5.03:1 on #fff · 4.53:1 on #f3f3f3    */
    --fb-green-text-hover: #0f662e; /* 7.09:1 on #fff · 6.39:1 on #f3f3f3    */
    --fb-red-text: #e00606;         /* 5.00:1 on #fff · 4.51:1 on #f3f3f3    */

    /* ---- Neutral ramp ---------------------------------------------------
     * White mixed toward Racing Green, so the greys carry a trace of the
     * identity instead of being the blue-grey Tabler ships. The percentage is
     * in the name's comment so a future value can be recomputed, not guessed. */
    --fb-n-50: #f5f7f6;             /*  4% */
    --fb-n-100: #ebefed;            /*  8% */
    --fb-n-200: #dce3e0;            /* 14% — default border                  */
    --fb-n-300: #c3cfca;            /* 24% — strong border                   */
    --fb-n-500: #91a79e;            /* 44% — disabled / decorative only      */
    --fb-n-600: #597a6e;            /* 66% — 4.74:1 on white, AA muted text  */
    --fb-n-800: #275242;            /* 86% */

    /* Named for its role rather than given a ramp number, because its value is
     * set by a requirement rather than by the ramp: WCAG 1.4.11 asks 3:1 of
     * "visual information required to identify user interface components", and
     * the border is the whole of what identifies an empty text input.
     *
     * White mixed 54% toward Racing Green — 3.36:1 on white, 3.03:1 on the page
     * ground, the lightest step that clears the floor on both. It is used ONLY
     * on interactive controls. `--tblr-border-color` stays at the light
     * `--fb-n-200` for tables, cards and dividers, which are decoration and are
     * not covered by 1.4.11; darkening those would buy nothing and would cost
     * the quiet, data-dense look the brief asks for.
     *
     * For reference, Tabler's stock border is #e5e7eb, which measures 1.24:1 —
     * so this is a fix for something inherited, not something introduced. */
    --fb-border-control: #779288;   /* 3.36:1 on #fff · 3.03:1 on #f3f3f3 */

    /* ---- Sidebar, on the Racing Green ground ---------------------------- */
    --fb-menu-fg-muted: #8fa49c;    /* 5.11:1 on --fb-deep                   */
    --fb-menu-active-bg: #224e3d;   /* Racing Green + 12% white              */
    --fb-menu-hover-bg: #164432;    /* Racing Green +  7% white              */

    /* ---- Typography -----------------------------------------------------
     * Roles are the guide's (p.9); see fbbranding-fonts.css.
     *
     * The fallback stack is not decorative. `font-display: swap` means these
     * faces render first, so they are chosen to be metrically close to
     * Montserrat — a geometric sans — to keep the swap reflow small. */
    --fb-font-body: "Fb Montserrat", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", arial, sans-serif;
    --fb-font-spec: "Fb Rajdhani", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", arial, sans-serif;

    /* ---- Shape ----------------------------------------------------------
     * Derived from the guide's own two shape languages: the layout blocks on
     * p.3/p.4 are hard rectangles, while the logo is built entirely from
     * rounded stroke terminals and circular counters. So surfaces stay nearly
     * square and only the small data chips go fully round. Tabler's default is
     * 6px throughout; 4px reads as more precise without becoming a hard edge.
     * Nothing here is a "rounded card" in the sense the brief warns against. */
    --fb-radius: 4px;
    --fb-radius-lg: 6px;
    --fb-radius-pill: 999px;

    /* ---- Spacing --------------------------------------------------------
     * A 4px base scale. Used by this plugin's own surfaces; GLPI's spacing is
     * left alone, because rescaling a data-dense application's rhythm is not
     * branding and would cost far more than it returns. */
    --fb-space-1: 4px;
    --fb-space-2: 8px;
    --fb-space-3: 12px;
    --fb-space-4: 16px;
    --fb-space-5: 20px;
    --fb-space-6: 24px;
    --fb-space-8: 32px;
    --fb-space-10: 40px;
    --fb-space-12: 48px;
    --fb-space-16: 64px;

    /* ---- Motion ---------------------------------------------------------
     * One duration and one easing. GLPI's own `--animate-duration` is left
     * alone; this is for the few transitions this plugin adds. */
    --fb-motion-fast: 120ms;
    --fb-motion: 200ms;
    --fb-ease: cubic-bezier(0.2, 0, 0.2, 1);

    /* ---- Elevation ------------------------------------------------------
     * There is deliberately no shadow scale.
     *
     * An earlier revision shipped three tinted shadow tokens and
     * tools/check-tokens.php reported all three as declared and never used —
     * because as each surface was designed properly, nothing wanted one. The
     * login card was the last holdout and it stopped being a card at all.
     *
     * That is worth stating rather than quietly deleting: this identity
     * separates surfaces with flat colour and real space, the way the guide's
     * own layout pages do (p.3/p.4), not with depth. If a future component
     * genuinely needs elevation, add the token *and* its first consumer in the
     * same change, so it cannot rot back into an unused scale. */

    /* ---- Form-control marks ---------------------------------------------
     * The tick inside a checked checkbox, the dot inside a radio, the dash of
     * an indeterminate checkbox, and the knob of an "on" switch.
     *
     * These are images, not colours, because Tabler ships them as data-URI
     * SVGs with the colour baked in — `stroke='#ffffff'` and `fill='#e5e7eb'`
     * — and paints them on `--tblr-primary`. That is fine for Tabler's dark
     * blue default and wrong for a light one: on Vibrant Green a white tick
     * measures 2.20:1, under the 3:1 that WCAG 1.4.11 requires of a graphic
     * needed to identify a control's state. Left alone, every checkbox in the
     * product would have become an unreadable one the moment the primary
     * colour changed. Found on the login page's "stay signed in" box.
     *
     * They are declared as tokens rather than written into the rules in §7 so
     * that `theme.css` can restate them for a customised palette, where the
     * right colour is whatever the contrast guard chose as the label on that
     * fill. A `var()` cannot be interpolated inside a `url()`, so the whole
     * image has to be the variable. */
    --fb-check-tick: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23043623' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8.5l2.5 2.5l5.5 -5.5'/%3e%3c/svg%3e");
    --fb-check-dot: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle r='3' fill='%23043623' cx='8' cy='8'/%3e%3c/svg%3e");
    --fb-check-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23043623' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
    --fb-switch-knob: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23043623'/%3e%3c/svg%3e");

    /* ---- Logo assets ----------------------------------------------------
     * DELIBERATELY NOT DECLARED HERE. The six `--fb-logo-*` tokens are emitted
     * by `/plugins/fbbranding/theme.css`, which is loaded straight after this
     * file, and they are absolute URLs.
     *
     * The obvious thing — `--fb-logo: url("../img/logo.svg")` right here —
     * looks correct and does not work. A relative URL inside a *custom
     * property* is not resolved against the stylesheet that declared it; the
     * value is stored as an unresolved token stream and the URL is resolved
     * where it is finally substituted, against the document's base URL. So on
     * an installation at `/glpi`, `../img/logo.svg` resolved to `/img/logo.svg`
     * and every page requested a logo that does not exist. Observed as a pair
     * of 404s per page load, on 2026-09-01, before this comment existed.
     *
     * (A relative URL in an ordinary declaration — `background-image:
     * url("../img/x.svg")` — *is* resolved against the stylesheet, and is used
     * that way further down. The difference is real and it is only custom
     * properties that behave this way.)
     *
     * The controller knows `$CFG_GLPI['root_doc']` and this file cannot, which
     * is why the defaults live there rather than here. */
}


/* =========================================================================
 * 2. MAPPING ONTO GLPI'S TOKENS
 * =========================================================================
 * This section is the branding. Everything below it is exception handling.
 *
 * The whole of GLPI — every button, table, badge, modal, dropdown and tab, in
 * core and in any other plugin that behaves — reads these properties. Rewriting
 * them here rebrands all of it at once, with no selector to break.
 * ========================================================================= */

:root {
    /* ---- Type ----------------------------------------------------------- */
    --tblr-font-sans-serif: var(--fb-font-body);
    --tblr-body-font-family: var(--fb-font-body);

    /* Montserrat has no Medium. Tabler's `medium` weight would silently render
     * as Regular, so it is mapped to Regular explicitly rather than left to
     * look like a weight that exists. */
    --tblr-font-weight-normal: 400;
    --tblr-font-weight-medium: 400;
    --tblr-font-weight-bold: 700;
    --tblr-font-weight-black: 900;
    --tblr-font-weight-headings: 700;

    /* ---- Primary --------------------------------------------------------
     * GLPI's stock primary is a light yellow (#fec95c) carrying dark text
     * (--tblr-primary-fg: #1e293b). That is the same shape as our identity —
     * a light fill with a dark label — which is why Vibrant Green drops in
     * without any component needing to change: Tabler already never puts white
     * on primary. White on Vibrant Green measures 2.20:1 and must never
     * appear; Racing Green on it measures 6.14:1. */
    --tblr-primary-rgb: 30, 201, 91;
    --tblr-primary: var(--fb-green);
    --tblr-primary-fg: var(--fb-deep);

    /* Tabler derives `--tblr-primary-darken` as primary + 10% black. That
     * lands on #1bb552, which still clears AA (5.00:1) against the Racing
     * Green label, so it is left to derive itself. Verified, not assumed. */

    /* ---- Links ----------------------------------------------------------
     * Overriding link-hover is NOT optional. Tabler defines it as
     *   color-mix(in srgb, var(--tblr-primary), black 20%)
     * which, once primary is Vibrant Green, resolves to #18a149 — 3.37:1 on
     * white. Every link in GLPI would fail AA on hover. Both ends are pinned
     * to the text-safe ramp instead. */
    --tblr-link-color-rgb: 19, 128, 58;
    --tblr-link-color: var(--fb-green-text);
    --tblr-link-hover-color: var(--fb-green-text-hover);
    --tblr-link-hover-color-rgb: 15, 102, 46;

    /* ---- Shape ----------------------------------------------------------
     * Radius is not a light/dark concern, so it stays here. Surfaces are not,
     * and are declared in the light-only block below. */
    --tblr-border-radius: var(--fb-radius);
    --tblr-border-radius-sm: var(--fb-radius);
    --tblr-border-radius-md: var(--fb-radius);
    --tblr-border-radius-lg: var(--fb-radius-lg);

    /* ---- Semantic colours: deliberately NOT rebranded --------------------
     * Success/warning/danger/info keep GLPI's values. Three reasons:
     *
     * 1. The guide calls Rec Red an *Accent*, not a status colour. Promoting
     *    it to "danger" would be inventing a role the brand does not define.
     * 2. Rec Red carries white at 3.48:1 — large text only. GLPI's danger
     *    buttons are small text on a fill, so the brand red would fail there.
     * 3. Status meaning is learned. Repainting it for identity is precisely
     *    the case where the brief says brand must yield to accessibility.
     *
     * `--tblr-success` (#2fb344) is also a green and sits near the primary.
     * They are not confusable in practice because Tabler renders them
     * differently — primary as a solid fill with a dark label, success as a
     * tonal badge with dark green text — so the distinction is carried by
     * form, not only hue, which is what the brief asks for.
     * ------------------------------------------------------------------- */

    /* ---- GLPI-specific tokens ------------------------------------------- */

    /* The sidebar is the largest continuous brand surface in the product.
     * Racing Green is the guide's own "Dark Identity" ground (p.4) and the
     * negative logo exists precisely for it (p.7). Note this does not make the
     * UI darker: GLPI's stock sidebar is already a dark navy (#2f3f64). */
    --glpi-mainmenu-bg: var(--fb-deep);
    --glpi-mainmenu-fg: var(--fb-grey);
    --glpi-mainmenu-fg-muted: var(--fb-menu-fg-muted);
    --glpi-mainmenu-active-bg: var(--fb-menu-active-bg);

    /* Form section headers. GLPI's own is a blue (#055cad) and derives its
     * background and border from itself by colour-mix, so setting the
     * foreground rebrands all three. */
    --glpi-form-header-fg: var(--fb-green-text);

    --glpi-badge-bg: var(--fb-n-100);
    --glpi-badge-fg: var(--fb-green-text);

    --glpi-search-bg: var(--fb-white);
    --glpi-search-border-color: var(--fb-n-200);

    --glpi-tabs-bg: var(--fb-n-50);
    --glpi-tabs-active-bg: var(--fb-white);
    --glpi-tabs-border-color: var(--fb-n-200);

    --glpi-hover-bg: rgb(30 201 91 / 7%);

    /* The helpdesk portal header derives from the main menu colour by hue
     * rotation; letting it derive keeps the portal consistent for free. */

    /* Illustration tokens ship with @glpi-project/illustrations. Pointing them
     * at the brand keeps the empty states and the helpdesk artwork on-palette
     * instead of leaving GLPI's blue floating inside a green product. */
    --glpi-illustrations-primary: var(--fb-green);
    --glpi-illustrations-header-dark: var(--fb-deep);

    /* ---- Logos ----------------------------------------------------------
     * Six variables and no markup. GLPI renders `<span class="glpi-logo">` in
     * three places (page_header, page_header_empty, page_card_notlogged) and
     * paints all of them from these properties (_base.scss:65-72), so this is
     * the whole of logo rebranding.
     *
     * `-reduced` is the collapsed sidebar; `-login` is the anonymous pages.
     * The light/dark pairs are which logo to use on a dark/light *chrome*, not
     * which theme is active — hence the negative variant against the Racing
     * Green sidebar and the full-colour one on the white login card.
     *
     * THE CHROME CARRIES THE MONOGRAM, THE LOGIN PAGE CARRIES THE LOCKUP
     * -----------------------------------------------------------------
     * Decided 2026-09-01. The navigation used the full lockup, which meant its
     * two lines of type set the minimum size of the brand block: below a 72px
     * box "AUTOMATION" stops resolving into letters. Wanting a smaller block
     * than that is a legitimate ask, and shrinking the lockup to meet it is
     * not — a wordmark rendered as a grey smear is worse than one that is
     * deliberately absent.
     *
     * So the sidebar and top bar now use the "Fb" monogram alone. Guide p.5
     * sanctions exactly this: the monogram "ersetzen nicht das gesamte Logo
     * ... können aber als Gestaltungselement eingesetzt werden". It is a design
     * element in the chrome, not a replacement for the logo.
     *
     * The full lockup is therefore *not* gone from the product — it holds the
     * place where the company actually has to be named, the login page, which
     * is the first thing an unauthenticated visitor sees and has room for it.
     * That split is the point: full name where it is read, monogram where it is
     * recognised.
     *
     * Consequence for sizing: the monogram is 1.595 wide-to-tall where the
     * lockup was 0.989, so the boxes in §5 change shape as well as size. */
    --glpi-logo-light: var(--fb-logo-mark-negative);
    --glpi-logo-light-reduced: var(--fb-logo-mark-negative);
    --glpi-logo-dark: var(--fb-logo-mark);
    --glpi-logo-dark-reduced: var(--fb-logo-mark);
    --glpi-logo-dark-login: var(--fb-logo);
    --glpi-logo-light-login: var(--fb-logo-negative);
    --glpi-logo: var(--glpi-logo-light);
    --glpi-logo-reduced: var(--glpi-logo-light-reduced);
}


/* -------------------------------------------------------------------------
 * Surfaces — LIGHT PALETTES ONLY
 * -------------------------------------------------------------------------
 * This is "Bright Identity" (guide p.3) applied literally: the page ground is
 * the guide's #f3f3f3, raised surfaces its #ffffff. GLPI's stock body
 * background is a blue-tinted #f5f7fb, and swapping it is the single change
 * that makes the whole application read as this brand rather than as default
 * GLPI.
 *
 * THE SELECTOR IS THE POINT. These cannot be declared on a bare `:root` and
 * then undone in the dark block, which is what this file did first and which
 * produced a black page under every dark palette.
 *
 * The reason is a genuine trap. `--tblr-body-bg: initial` on a *custom
 * property* does not restore an earlier value — it sets the property to the
 * guaranteed-invalid value, so `background-color: var(--tblr-body-bg)` becomes
 * invalid at computed-value time and falls back to `transparent`. `revert` does
 * not help either: it reverts to a previous cascade *origin*, and GLPI's dark
 * palette is an author stylesheet just like this one. Since this file loads
 * after core, an equal-specificity rule here wins, and there is no keyword that
 * hands the value back.
 *
 * So the branding simply never claims these tokens on a dark palette. GLPI
 * writes `data-glpi-theme-dark="1"` onto <html> (head.html.twig) from
 * `theme.isDarkTheme()`, and that attribute is the whole guard.
 * ------------------------------------------------------------------------- */

:root:not([data-glpi-theme-dark="1"]) {
    --tblr-body-bg: var(--fb-grey);
    --tblr-bg-surface: var(--fb-white);
    --tblr-bg-surface-secondary: var(--fb-n-50);
    --tblr-bg-surface-tertiary: var(--fb-n-100);

    --tblr-border-color: var(--fb-n-200);
    --tblr-border-color-translucent: rgb(4 54 35 / 10%);

    /* Tabler's secondary is a blue-grey (#606f91) that clashes with a green
     * identity everywhere muted text meets brand text. Replaced with the
     * Racing-Green-tinted neutral at the lightest step that still measures AA
     * as body text (4.74:1 on white). White on it measures the same 4.74:1, so
     * `--tblr-secondary-fg` — which Tabler derives from the body background —
     * still holds. */
    --tblr-secondary: var(--fb-n-600);
    --tblr-tertiary: var(--fb-n-500);
    --tblr-muted: var(--fb-n-600);
}


/* =========================================================================
 * 3. TYPOGRAPHY
 * =========================================================================
 * Section 2 already switched the family. What is left is the part a token
 * cannot express: the hierarchy, and one prohibition.
 * ========================================================================= */

/* No italic ships, and no engine may fake one.
 *
 * The released Rajdhani family contains no italic; a synthesised one is a
 * sheared upright, which is the same distortion the guide forbids for the logo
 * (p.8). `font-synthesis` is the only way to stop a browser doing it silently.
 * This is a global prohibition, so it is set globally. */
body {
    font-synthesis: none;
}

/* Headings carry Racing Green.
 *
 * Body text deliberately does not: the guide assigns Racing Green to headings,
 * and tinting running text would wash the whole application green for no
 * legibility gain. GLPI's body colour is left exactly as it is. */
h1, h2, h3, h4, h5, h6,
.card-title,
.page-title {
    color: var(--fb-deep);
    letter-spacing: -0.01em;
}

/* Rajdhani is the "Spezifikationen" face and it is applied by opt-in only.
 *
 * It is a condensed display face, wrong for prose, and its subset omits six
 * Latin Extended-A characters, so a name like "Kraśniewski" would change face
 * mid-word. Broad selectors that catch a table cell "because it usually holds
 * a number" are exactly how that happens. `.fb-spec` is therefore applied by
 * this plugin's own templates and by nothing else; `font-variant-numeric`
 * gives the tabular alignment that is the actual reason to want it. */
.fb-spec {
    font-family: var(--fb-font-spec);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* Montserrat Black is display-only per the guide. It is offered as a utility
 * rather than bound to any heading level, because no GLPI screen is a display
 * surface — only this plugin's own login and configuration headers are. */
.fb-display {
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: uppercase;
}

/* The guide's one recurring typographic device: an uppercase Montserrat Black
 * headline closed by a Rec Red full stop. It appears on nearly every page of
 * the guide ("DESIGN GUIDE.", "HAUPTFARBEN.", "LOGO.", "TYPOGRAPHY.") and it is
 * the most recognisable thing the identity owns after the logo itself.
 *
 * It is used on this plugin's own surfaces only. Appending a red dot to every
 * heading in an ITSM would be noise, and the brief is explicit that decoration
 * without function is out. The dot is `aria-hidden` by construction: generated
 * content is not exposed as text by any screen reader that matters, and the
 * heading reads correctly without it. */
.fb-display::after {
    content: ".";
    color: var(--fb-red);
}


/* =========================================================================
 * 4. FOCUS
 * =========================================================================
 * A focus ring may never be invisible. Tabler's default ring is derived from
 * the primary colour, and Vibrant Green measures 2.20:1 on white — below the
 * 3:1 a UI boundary needs. Left alone, making the brand green the primary
 * would have quietly degraded keyboard navigation across the whole product.
 *
 * The ring therefore uses the text-safe green (5.03:1 on white), and is drawn
 * with `outline` plus an inner white `box-shadow` so that it stays visible on
 * a dark ground as well as a light one.
 * ========================================================================= */

:root {
    --tblr-focus-ring-color: rgb(19 128 58 / 35%);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--fb-green-text);
    outline-offset: 2px;
    border-radius: var(--fb-radius);
}

/* On the Racing Green sidebar the dark ring would disappear, so it inverts. */
.sidebar :where(a, button, [tabindex]):focus-visible,
.topbar :where(a, button, [tabindex]):focus-visible {
    outline-color: var(--fb-green);
}


/* =========================================================================
 * 5. SIDEBAR
 * =========================================================================
 * Section 2 already painted it Racing Green and swapped the logo. Three things
 * remain that a token cannot say.
 *
 * Verified against css/includes/components/_global-menu.scss. `.sidebar` and
 * `body.navbar-collapsed` are GLPI's own class names, not Tabler's, which
 * makes them the more stable of the two — but they are still names, so this
 * section is the part of the file most likely to need attention at upgrade.
 * ========================================================================= */

/* (a) The logo must not be stretched.
 *
 * This is a correctness fix, not a preference. `_base.scss:167` sets
 * `.page .glpi-logo { background: var(--glpi-logo) no-repeat; height: 55px;
 * width: 100px }` with no `background-size`. GLPI's own logo is a raster whose
 * intrinsic size fits that box; ours is an SVG, which has no intrinsic size and
 * would be stretched to 100x55 — a 1.82 aspect imposed on a 0.99 lockup. The
 * guide's first prohibition (p.8) is that the logo is never distorted, so
 * `contain` is mandatory here.
 *
 * The box is also resized, and its *shape* matters as much as its size.
 *
 * The chrome carries the "Fb" monogram (see the logo mapping in §2), which is
 * 1.595 wide-to-tall. GLPI's 100x55 box is 1.82 — close, but not close enough
 * to leave to `contain`, which would letterbox it and waste the width.
 * 88x55 is 1.600, within a rounding error of the artwork.
 *
 * 55px tall is a deliberate trade. The previous full lockup at 80px rendered
 * its monogram 50px wide inside a 80px-tall block; the monogram alone at 55px
 * is 88px wide — visibly *larger* as a mark, in a block a third shorter. That
 * is the whole reason for the switch: the wordmark was setting the minimum
 * height, and it is now on the login page where it can be read properly.
 *
 * There is no legibility floor here any more, because there is no type in the
 * artwork — the monogram is a shape, and it survives down to favicon sizes.
 * Anything from about 40px up is defensible; below that use the collapsed
 * rail's 40px box, which already exists. */
.page .glpi-logo,
.navbar-brand .glpi-logo {
    width: 88px;
    height: 55px;
    background-position: center;
    background-size: contain;
}

/* (a2) The expanded admin sidebar, 1.2.2 (2026-09-28).
 *
 * At 88x55 the monogram's ® was a 6px ring drawn with a 0.4px line and read as
 * a smudge. The ® must stay, so the mark is shown larger here (same 1.6
 * aspect, still well inside the 240px sidebar) and the chrome marks carry a
 * heavier ® drawn for small sizes. Desktop only: below `lg` the sidebar is a
 * top bar (§12), and the self-service top bar is sized by Fb Helpdesk. The
 * collapsed rail's rule (b) is more specific and keeps its 40px box. */
@media (min-width: 992px) {
    .sidebar .navbar-brand .glpi-logo {
        width: 110px;
        height: 69px;
    }
}

/* (b) The collapsed rail.
 *
 * GLPI already swaps to `--glpi-logo-reduced` at 40x40 with `contain` under
 * `body.navbar-collapsed` (_global-menu.scss:203), so the compact mark needs no
 * help — only the expanded override above has to be undone, because it would
 * otherwise win on specificity and keep the 80px box in a 70px rail. */
body.navbar-collapsed .navbar-brand .glpi-logo {
    width: 40px;
    height: 40px;
}

/* (c) The active item.
 *
 * GLPI draws a 3px transparent left border on every nav link and colours it for
 * the active one (_global-menu.scss). Vibrant Green measures 6.14:1 against the
 * Racing Green ground, which is the strongest signal the palette can make and
 * the one place the pure brand colour can be used at full strength without an
 * accessibility cost. Colour is not the only cue — GLPI also raises the
 * background and the label's opacity. */
.sidebar #navbar-menu .nav-item.active > .nav-link,
.sidebar #navbar-menu .nav-item .nav-link.active {
    border-left-color: var(--fb-green);
    background-color: var(--fb-menu-active-bg);
    color: var(--fb-grey);
}

.sidebar #navbar-menu .nav-item > .nav-link:hover {
    background-color: var(--fb-menu-hover-bg);
}

/* The brand block gets air. The guide devotes a page to Freiraum (p.6) and
 * "Hauptanwendung auf genügend Weißraum" (p.7); on a coloured ground that
 * clear space is the least we can honour of it. */
.sidebar .navbar-brand {
    padding-block: var(--fb-space-5);
}


/* =========================================================================
 * 6. LOGIN
 * =========================================================================
 * The first and most-seen brand surface, and the only one an unauthenticated
 * visitor sees at all. Loaded through ADD_CSS_ANONYMOUS_PAGE — the ordinary
 * ADD_CSS hook never reaches this page.
 *
 * Structure, from templates/layout/page_card_notlogged.html.twig:
 *   body.welcome-anonymous > main.page-anonymous
 *     > .container-tight > .text-center > .col-md > span.glpi-logo
 *     > .card.card-md.main-content-card > .card-header (empty) + .card-body
 *
 * THE COMPOSITION IS QUOTED, NOT INVENTED
 * ---------------------------------------
 * The screen is a two-field split: a Racing Green brand panel on one side, the
 * Bright Identity ground carrying the form on the other. Both fields, and the
 * device inside the green one, come straight off the design guide's "Bright
 * Identity" and "Dark Identity" spreads (p.3 and p.4) — the only two pages in
 * the guide that describe a *layout* rather than an asset.
 *
 * Those pages are a full-bleed colour field with a band of hard rectangles
 * across the lower part and one Rec Red circle. Measured out of the PDF
 * (960x540pt), the band divides as:
 *
 *   0      -> 16.3%   the ground shows through — the asymmetry is the point
 *   16.3%  -> 22.8%   the opposite green (Vibrant Green on the dark page)
 *   22.8%  -> 48.2%   #F3F3F3
 *   48.2%  -> 100%    #FFFFFF
 *   circle  centre 86.1% across, 69.9% down the band, diameter 3.9% of width
 *
 * Every one of those numbers is reproduced below, and the horizontal divisions
 * are an exact quote. The band's *height* is the single adaptation, and it is
 * stated rather than hidden: the guide's page is 16:9 landscape and this panel
 * is portrait, so a literal 44.8%-of-height band would swallow it. The height
 * is tied to the panel's width at 25.5% instead — the width of the grey block —
 * so the blocks keep the proportions they have in the guide even though the
 * frame around them changed.
 *
 * WHY THIS AND NOT SOMETHING SHOWIER
 * ----------------------------------
 * The brief's priority order for this screen is Brand, then Trust, then
 * Clarity, then Authentication, and it rules out gradients, glassmorphism,
 * blur and decoration without function. That is not a licence for a dull page;
 * it is a licence to spend the effort on composition and type instead of
 * effects. So there is no gradient here that is not a flat colour block, no
 * shadow, no blur and no motion. What carries the screen is a large unbroken
 * field of the brand's own dark green, a lockup with real clear space around
 * it, and a device nobody else has because it belongs to this guide.
 *
 * A login screen that looks expensive looks like a phishing page. One that
 * looks composed looks like infrastructure.
 * ========================================================================= */

/* The panel's width is a token because four other things derive from it — the
 * band height, the circle's diameter, the content offset, and how far the form
 * sits from the green edge. `min()` stops it becoming a vast green wall on an
 * ultrawide monitor. */
:root {
    /* `clamp`, not `min`. The previous `min(42vw, 34rem)` capped the panel at
     * 544px, which on a 1900px monitor is 28% of the screen — the composition
     * stopped being a two-field split and became a stripe beside a vast empty
     * field. The lower bound keeps it from collapsing just above the
     * breakpoint; the upper one keeps it from becoming a green wall on an
     * ultrawide. Between them it stays a proportion of the screen, which is
     * what a split has to be. */
    --fb-login-panel: clamp(24rem, 40vw, 46rem);
    --fb-login-band: calc(var(--fb-login-panel) * 0.255);

    /* The narrow layout's band spans the full width, so its height comes from
     * the viewport rather than from the panel. One token because two rules need
     * the identical value — the band's own height, and the height subtracted
     * from the content area so the two cannot overlap. Written twice, they
     * would drift the first time either changed. */
    --fb-login-band-narrow: min(calc(100vw * 0.255), 9rem);
}

/* Light palettes only, and scoped rather than undone in §9 — for the same
 * reason as the surface tokens. `background-color: initial` is `transparent`,
 * not "whatever GLPI had", so undoing it there would leave the dark login page
 * with no ground at all.
 *
 * The guide's #F3F3F3, not #FFFFFF, and the reason is the band.
 *
 * A white form field was the first choice and it was wrong: the band's last
 * block is #FFFFFF and runs to the panel's edge, so on a white ground it
 * dissolved into the form side and the device stopped reading as three blocks.
 * On #F3F3F3 every block is bounded — green sliver against the ground, grey
 * against white, white against the form field — which is what the guide's own
 * page shows. The inputs stay white and now sit *on* the ground rather than
 * disappearing into it. */
:root:not([data-glpi-theme-dark="1"]) body.welcome-anonymous {
    background-color: var(--fb-grey);
}

/* ---- The brand panel ----------------------------------------------------
 *
 * One pseudo-element, four layers: the Racing Green ground, the block band,
 * the Rec Red circle, the lockup.
 *
 * `position: fixed` rather than a grid column, deliberately. The alternative
 * is making <body> a grid, and <body> has children this file does not own —
 * the skip-links, and whatever GLPI adds to the anonymous layout in a later
 * release. A fixed panel takes part in no layout at all, so nothing else can
 * be pushed into a cell it did not expect.
 *
 * Every colour is a token, so an entity that customised its palette gets its
 * own colours here without this rule knowing anything about it. The
 * `linear-gradient` is not an effect: hard colour stops are how a row of flat
 * rectangles is drawn in CSS, and that is all it does. */
@media (min-width: 992px) {
    body.welcome-anonymous::before {
        content: "";
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: var(--fb-login-panel);
        background-color: var(--fb-deep);
        background-image:
            var(--fb-logo-negative),
            radial-gradient(
                circle calc(var(--fb-login-panel) * 0.0195) at 86.1% 69.9%,
                var(--fb-red) 99%,
                transparent 100%
            ),
            /* The first segment names the ground colour rather than using
             * `transparent` to let the element's own background show through.
             * Both render identically, but the explicit form does not depend on
             * how the layer beneath composites, and it says what it means: the
             * guide's band starts 16.3% in, and the space before it is the
             * ground rather than a hole. The narrow layout's copy of this band
             * has no element background behind it at all, so it needed the
             * colour anyway — and two copies of one device should not differ. */
            linear-gradient(
                to right,
                var(--fb-deep) 0 16.3%,
                var(--fb-green) 16.3% 22.8%,
                var(--fb-grey) 22.8% 48.2%,
                var(--fb-white) 48.2% 100%
            );
        background-repeat: no-repeat;
        /* The lockup's inset is deliberate, not a default. A percentage
         * background-position resolves against (container - image), so the
         * 20%/16% below places it about 12% of the panel width in from the
         * left and a similar distance down — clear space in the region the
         * guide devotes a whole page to (p.6, "Freiraum und Proportionen").
         * At 12% it sat noticeably tighter to the edge than the guide's own
         * examples do. */
        /* 20% across, 30% down. The vertical figure is the one that was
         * wrong: at 16% the lockup sat hard against the top edge and left a
         * 200px void between it and the band — the panel read as two thin
         * incidents with nothing in between rather than as a composition.
         *
         * A percentage background-position resolves against (container -
         * image), so 30% puts the lockup near the optical centre of the field
         * above the band at ordinary window heights, with the air distributed
         * either side of it instead of all below. */
        background-position:
            20% 30%,
            0 100%,
            0 100%;
        background-size:
            40% auto,
            100% var(--fb-login-band),
            100% var(--fb-login-band);
    }

    /* The form side clears the panel. `margin` rather than `padding`, so the
     * ground stops exactly where the green begins.
     *
     * The vertical centring is a fix, not a flourish. GLPI puts
     * `justify-content-center` on a div *inside* `main`, and `main` is only as
     * tall as its content — so the centring had nothing to centre within and
     * the form sat 82px above the optical middle of a 620px viewport, leaving a
     * 200px void along the bottom of the field. Giving `main` the viewport's
     * height is what makes GLPI's own rule do what it was written to do.
     *
     * `min-height`, never `height` — that distinction is what makes the
     * centring safe. A fixed height with `justify-content: center` is the
     * classic flexbox trap: once the content is taller than the box it
     * overflows *both* ways and the top becomes unreachable, because scrolling
     * cannot go above the scroll origin. With `min-height` the element simply
     * grows and the centring stops applying.
     *
     * Verified rather than assumed, with the local form expanded so the page is
     * 1001px in a 620px viewport: scrolled to the top, `main` sits at 0 and the
     * heading is fully visible. */
    body.welcome-anonymous .page-anonymous {
        margin-inline-start: var(--fb-login-panel);
    }

    /* The panel already carries the lockup as artwork, so the marked-up one
     * would be a second copy of the same logo on the same screen.
     *
     * Hiding it costs nothing that matters: GLPI renders it as an empty
     * `<span class="glpi-logo" title="GLPI">` with no text content, so it is
     * decorative in the accessibility sense, and the page keeps its real
     * heading. Below the breakpoint the panel is gone and this comes back. */
    body.welcome-anonymous .glpi-logo {
        display: none;
    }

    /* The form's measure is left to GLPI.
     *
     * An earlier revision constrained `.container-tight` here and it did
     * nothing, because IndexController passes `card_bg_width` and
     * page_card_notlogged writes an inline `max-width: 60rem` onto that
     * element — an inline style beats any class rule short of `!important`,
     * and reaching for `!important` to win an argument with the host is how a
     * plugin becomes unmaintainable.
     *
     * It is also unnecessary. login.html.twig already puts the fields in a
     * `.col-md-5` inside a centred row, so the form lands at a sensible
     * measure in whatever width it is given. Centred in the white field, set
     * against the green one, is the composition. */
}

/* ---- Vertical centring, at every width ----------------------------------
 *
 * This is a fix, not a flourish. GLPI puts `justify-content-center` on a div
 * *inside* `main`, and `main` is only as tall as its content — so the centring
 * had nothing to centre within and the form sat 82px above the optical middle,
 * leaving a void along the bottom of the field. Giving `main` the viewport's
 * height is what makes GLPI's own rule do what it was written to do.
 *
 * `min-height`, never `height`, and that distinction is what makes it safe. A
 * fixed height with `justify-content: center` is the classic flexbox trap: once
 * the content is taller than the box it overflows *both* ways and the top
 * becomes unreachable, because scrolling cannot go above the scroll origin.
 * With `min-height` the element simply grows and the centring stops applying.
 *
 * Verified rather than assumed, with the local form expanded so the page was
 * 1001px in a 620px viewport: scrolled to the top, `main` sat at 0 and the
 * heading was fully visible.
 *
 * Outside the media query on purpose. It was inside it at first, which left the
 * narrow layout top-aligned with the same void underneath that the split had
 * just been fixed for — the phone got the bug the desktop had lost. */
body.welcome-anonymous .page-anonymous {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-block: var(--fb-space-8);
}

/* ---- The marked-up logo, for when the panel is not there ----------------
 *
 * This has to exist at every width even though it is hidden above the
 * breakpoint, because GLPI's own rule for it is a trap. `_base.scss:346-352`
 * sets `.page-anonymous .glpi-logo { content: var(--logo); width: 200px;
 * height: 110px }` — a 1.82 box around a 0.989 lockup. Leave it alone and the
 * logo is stretched by nearly a factor of two, which is the guide's first
 * prohibition (p.8).
 *
 * `object-fit` *and* `background-size`, because `content` makes this a
 * replaced element: a replaced element ignores `background-size` and defaults
 * to `object-fit: fill`. With the bundled lockup that was invisible — 152x154
 * is the artwork's own aspect, so filling and containing look identical — and
 * it would have stayed invisible right up until an administrator uploaded a
 * logo of a different shape. */
.page-anonymous .glpi-logo,
body.welcome-anonymous .glpi-logo {
    width: 152px;
    height: 154px;
    margin-inline: auto;
    object-fit: contain;
    background-position: center;
    background-size: contain;
}

/* ---- The card, which stops being a card ---------------------------------
 *
 * On the split there is nothing for a card to separate the form *from* — the
 * white field is already its own half of the screen. Border, shadow and radius
 * would be three pieces of decoration doing no work, which is exactly what the
 * brief says to remove. The element stays, because it is GLPI's markup; it
 * simply stops drawing itself. */
.page-anonymous .main-content-card {
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.page-anonymous .card-body {
    padding: 0;
}

/* There are two `.card-header` elements on this page. The outer one, at the top
 * of the card, is empty — GLPI keeps it on one line precisely so an `:empty`
 * selector can collapse it. The inner one is inside the form and holds the
 * heading (login.html.twig:47), so it must not be touched by this. */
.page-anonymous .card-header:empty {
    display: none;
}

/* ---- Type and controls on the form side ---------------------------------
 *
 * The one place the identity's headline device appears without an
 * administrator having to configure anything: GLPI's own "Login to your
 * account" heading, set in the display face and closed with the Rec Red full
 * stop.
 *
 * `.card-title` is GLPI's class for it. The stop is generated content, so it
 * is not part of the accessible name — the heading still reads as GLPI wrote
 * it. */
.page-anonymous .card-header h2 {
    margin-bottom: var(--fb-space-2);
    color: var(--fb-deep);
    font-weight: 900;
    /* Montserrat Black earns its place only at display size. At the previous
     * ceiling it rendered around 28px on a 1280px window — a heading, not a
     * statement, in a face the guide reserves for "Design & Layout". */
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: uppercase;
}

.page-anonymous .card-header h2::after {
    content: ".";
    color: var(--fb-red);
}

.page-anonymous .form-label {
    color: var(--fb-deep);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Taller fields than GLPI's default. On a screen with two inputs the cost is
 * nothing, and the gain is a form that reads as deliberate rather than as a
 * dialog that happens to be on its own page. */
.page-anonymous .form-control,
.page-anonymous .form-select {
    padding-block: var(--fb-space-3);
}

.page-anonymous .btn-primary {
    width: 100%;
    padding-block: var(--fb-space-3);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- One column, single sign-on first -----------------------------------
 *
 * GLPI lays the login out as two Bootstrap columns side by side: the credential
 * fields in `.col-md-5`, the `DISPLAY_LOGIN` plugin controls in a `.col-auto`.
 * That is the right layout while the local form is the primary way in. It is
 * the wrong one once an identity provider is, and it cannot be reordered into a
 * readable stack by CSS alone without fighting the grid — so the script moves
 * the plugin column under the heading and this collapses the row to one column
 * around it.
 *
 * Written so it is correct with or without the script: without it, the two
 * columns simply stack, which is what Bootstrap does below `md` anyway. */
.page-anonymous form > .row {
    flex-direction: column;
    align-items: stretch;
}

.page-anonymous form > .row > [class*="col-"] {
    max-width: 24rem;
    margin-inline: auto;
    flex: 0 0 auto;
    width: 100%;
}

/* Once the script has moved the plugin column inside the fields column, it is
 * no longer a child of the row and the rule above stops reaching it — leaving
 * a `.col-auto` at its content width, so the primary action rendered narrower
 * than the heading above it and the disclosure below it. Everything in this
 * stack shares one edge. */
.page-anonymous .col-md-5 > .col-auto {
    width: 100%;
    max-width: none;
}

/* Everything in the stack shares one gutter.
 *
 * GLPI's plugin column carries Bootstrap's `.px-2`, and Bootstrap's spacing
 * utilities are `!important` by design — they are meant to be the last word.
 * Rather than out-shout a utility that is doing its job, the heading and the
 * disclosed form are set to the same 0.5rem inset, so the sign-on button, the
 * disclosure and the fields all line up on one edge. Measured before: 328 /
 * 352 / 368, three different widths in a column 384 wide. */
.page-anonymous .card-header,
.page-anonymous .fb-local-login {
    padding-inline: 0.5rem;
}

/* ---- The single-sign-on button ------------------------------------------
 *
 * DELIBERATELY ALMOST UNTOUCHED.
 *
 * `.en-sso__button` belongs to the sibling `entra` plugin, and it is already
 * built correctly: a neutral surface, a full-width hit area, and the Microsoft
 * mark drawn as four CSS squares rather than fetched, so an anonymous page
 * makes no third-party request. Microsoft's brand requirements govern how a
 * "Sign in with Microsoft" control may look, and repainting it in Racing Green
 * would break them.
 *
 * So it is made primary by *composition* — first in the reading order, alone
 * above the fold, with space around it — and not by colour. The only thing
 * changed here is the framing: entra styles `.en-sso` as an addendum with a
 * rule above it, which is right when it sits below a form and wrong when it is
 * the first thing on the page.
 *
 * If entra is absent, every one of these selectors matches nothing. */
.page-anonymous .en-sso {
    margin-block: 0 var(--fb-space-5);
    padding-block-start: 0;
    border-block-start: 0;
}

/* The primary action has to carry like one.
 *
 * It stays a neutral button on purpose. Microsoft's brand guidance for
 * "Sign in with Microsoft" prescribes the button's appearance — a light or
 * dark neutral ground with their mark at a fixed size — and repainting it
 * Vibrant Green to match the rest of the identity would break that. So the
 * weight comes from size, type and space instead of from colour: it is the
 * tallest control on the page, it shares the heading's exact measure, and
 * nothing else competes with it.
 *
 * That is also the honest hierarchy. The brand owns the left half of the
 * screen; the right half belongs to the person signing in, and the thing they
 * came for should look like the thing they came for. */
.page-anonymous .en-sso__button {
    padding-block: var(--fb-space-5);
    border-color: var(--fb-border-control);
    border-radius: var(--fb-radius);
    background-color: var(--fb-white);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.page-anonymous .en-sso__button:hover,
.page-anonymous .en-sso__button:focus-visible {
    border-color: var(--fb-green-text);
    background-color: var(--fb-n-50);
}

/* ---- The disclosure -----------------------------------------------------
 *
 * A text control, not a button that competes with the one above it. The whole
 * point is that this is the quieter path: it has to be findable and obviously
 * actionable without reading as a second primary action.
 *
 * `--fb-green-text` rather than the fill green — this is text on a light
 * ground, where Vibrant Green measures 2.20:1. */
.fb-local-toggle {
    display: block;
    width: 100%;
    padding: var(--fb-space-2);
    border: 0;
    background: none;
    color: var(--fb-green-text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
}

.fb-local-toggle:hover {
    color: var(--fb-green-text-hover);
    text-decoration: underline;
}

/* The affordance is a rotating caret, because a disclosure has to say which way
 * it goes. Drawn in CSS so it inherits the button's colour and needs no asset. */
.fb-local-toggle::after {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-inline-start: 0.5em;
    border-right: 2px solid currentcolor;
    border-bottom: 2px solid currentcolor;
    transform: translateY(-0.15em) rotate(45deg);
    transition: transform var(--fb-motion-fast) var(--fb-ease);
}

.fb-local-toggle[aria-expanded="true"]::after {
    transform: translateY(0.1em) rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
    .fb-local-toggle::after {
        transition: none;
    }
}

/* ---- The revealed local form -------------------------------------------
 *
 * Set apart from the primary path by a rule and by space, so that opening it
 * reads as stepping aside rather than as the page growing. `[hidden]` does the
 * hiding — see the script for why that attribute rather than a class. */
.fb-local-login {
    margin-block-start: var(--fb-space-4);
    padding-block-start: var(--fb-space-5);
    border-block-start: 1px solid var(--fb-n-200);
}

/* The submit button of the *local* form is no longer the page's primary
 * action, and should not look like it. Outline rather than fill: it keeps the
 * brand colour and the full hit area, and stops two filled buttons competing
 * for the same glance. */
.page-anonymous .fb-local-login .btn-primary {
    background-color: transparent;
    border-color: var(--fb-green-text);
    color: var(--fb-green-text);
}

.page-anonymous .fb-local-login .btn-primary:hover,
.page-anonymous .fb-local-login .btn-primary:focus-visible {
    background-color: var(--fb-green-text);
    border-color: var(--fb-green-text);
    color: var(--fb-white);
}

/* ---- The optional welcome panel -----------------------------------------
 *
 * `LoginHook` renders this into the column GLPI reserves beside the form. It
 * sits with the form rather than on the green field, and that is a decision
 * rather than a limitation: here it is real markup with real text, selectable
 * and announced, where a string pushed onto the brand panel would have to
 * travel through a CSS custom property and arrive as generated content.
 * Identity on the left, words on the right. */
.fb-login-panel {
    max-width: 22rem;
    margin-inline: auto;
    text-align: start;
}

.fb-login-panel__headline {
    margin-bottom: var(--fb-space-3);
    color: var(--fb-deep);
    font-size: 1.5rem;
}

.fb-login-panel__message {
    margin: 0;
    color: var(--fb-n-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}


/* =========================================================================
 * 7. COMPONENTS
 * =========================================================================
 * Only what section 2 could not reach. Each rule states why a token was not
 * enough; if a rule here can be replaced by a token, replace it.
 * ========================================================================= */

/* Primary buttons carry weight, because at this size Montserrat Regular on a
 * saturated fill reads thin. Weight is a typographic decision the token layer
 * has no property for. */
.btn-primary {
    font-weight: 700;
}

/* Tabler derives `:hover` and `:active` from `--tblr-primary` by colour-mix,
 * and those derivations are unbounded — far enough and the Racing Green label
 * on the fill drops below AA. The two states are pinned to the measured stops
 * instead. This is an accessibility fix, not a styling preference. */
.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--fb-green-hover);
    border-color: var(--fb-green-hover);
    color: var(--fb-deep);
}

.btn-primary:active,
.btn-primary.active {
    background-color: var(--fb-green-active);
    border-color: var(--fb-green-active);
    color: var(--fb-deep);
}

/* Avatar initials.
 *
 * GLPI paints a per-user avatar colour inline, generated from the user's name
 * (`Toolbox::getColorForString`), and the initials on top of it simply inherit
 * whatever text colour is in scope. That was `--tblr-muted` — a mid grey — on a
 * mid-tone generated background, which measures as low as **1.00:1** across the
 * colours the generator can produce. The initials can be literally invisible.
 *
 * This is GLPI's defect, not one the branding introduced, but the branding did
 * make it marginally worse (1.50:1 -> 1.41:1 on the avatar this was found on),
 * and a plugin that lowers an existing floor has to raise it back.
 *
 * Black is the answer, and it is a bounded claim rather than a guess. The
 * generator emits HSL with L in {0.6, 0.65, 0.7} and S in {0.6, 0.65, 0.7},
 * so the full range is enumerable: across all 359 hues x 3 x 3, black's worst
 * case is **3.63:1** (on #5252E0) and white's is 1.29:1. Black it is.
 *
 * Harmless on the photo variant, where the element carries a background-image
 * and no initials are shown. */
.avatar {
    color: #000;
}

/* Status chips go fully round — the one place the logo's circular geometry is
 * quoted, and the one place it reads as a data label rather than decoration.
 * Cards and panels stay nearly square; see the shape note in section 1. */
.badge {
    border-radius: var(--fb-radius-pill);
}

/* Tables are where an ITSM is actually used, and the brief's requirement is
 * "data density without visual density". So: no zebra, no heavy grid, a header
 * that is legible without shouting, and hover as the only decoration — the row
 * you are pointing at is the only one that needs emphasis. */
.table > thead > tr > th {
    color: var(--fb-n-600);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--fb-n-200);
}

.table > tbody > tr:hover > td {
    background-color: var(--fb-n-50);
}

/* Checked form controls carry a dark mark, not Tabler's white one.
 *
 * The selectors match Tabler's own exactly — it sets
 * `--tblr-form-check-bg-image` on these elements, not on `:root`, so a `:root`
 * override would lose on specificity and change nothing. Each maps Tabler's
 * variable onto ours from §1, which is what lets `theme.css` recolour the mark
 * for a customised palette without restating any selector.
 *
 * `[type=...]` is quoted here where Tabler leaves it bare; the two are
 * equivalent and the quoted form is the one that survives a linter. */
.form-check-input:checked[type="checkbox"] {
    --tblr-form-check-bg-image: var(--fb-check-tick);
}

.form-check-input:checked[type="radio"] {
    --tblr-form-check-bg-image: var(--fb-check-dot);
}

.form-check-input[type="checkbox"]:indeterminate {
    --tblr-form-check-bg-image: var(--fb-check-dash);
}

/* Only when the switch is on. Off, the knob sits on a pale track where
 * Tabler's own light grey is correct and a dark knob would read as enabled. */
.form-switch .form-check-input:checked {
    --tblr-form-switch-bg: var(--fb-switch-knob);
}

/* Inputs.
 *
 * The resting border is the one piece of visual information that identifies an
 * empty text field, which puts it under WCAG 1.4.11 and its 3:1 floor.
 * `--tblr-border-color` cannot be raised to meet that, because it also draws
 * every table rule and card edge and the page would turn into a grid. So the
 * control border is separated from the decorative one. See §1.
 *
 * `.form-check-input:not(:checked)` is included because an unchecked checkbox
 * is nothing *but* its border. */
.form-control,
.form-select,
.form-check-input:not(:checked) {
    border-color: var(--fb-border-control);
}

/* GLPI sets `--tblr-box-shadow-input: none`, so the focused state is carried
 * entirely by the border — which means it has to be the brand's text-safe green
 * rather than its fill green, or focus becomes invisible. The `:focus-visible`
 * outline in §4 is the primary signal; this is the second one, for the pointer
 * focus that does not raise an outline. */
.form-control:focus,
.form-select:focus {
    border-color: var(--fb-green-text);
}

/* A placeholder says what belongs into a field: text somebody reads. Tabler
 * gives it its tertiary colour, which here is the decorative grey (2.55:1 on
 * white). The muted text colour measures 4.74:1. */
.form-control::placeholder {
    color: var(--fb-n-600);
    opacity: 1;
}

/* A left rule in the brand colour, on the plugin's own section blocks. It is
 * the guide's rectangular layout language (p.3/p.4) at component scale. */
.fb-section {
    border-inline-start: 3px solid var(--fb-green);
    padding-inline-start: var(--fb-space-4);
}


/* =========================================================================
 * 8. MOTION
 * =========================================================================
 * Motion is functional or it is absent. The only transitions this plugin adds
 * are on states the user caused.
 * ========================================================================= */

.sidebar #navbar-menu .nav-link,
.table > tbody > tr > td,
.btn {
    transition: background-color var(--fb-motion-fast) var(--fb-ease),
        border-color var(--fb-motion-fast) var(--fb-ease),
        color var(--fb-motion-fast) var(--fb-ease);
}

/* `prefers-reduced-motion` is honoured for everything this file adds. GLPI has
 * its own handling for `--animate-duration`; this covers ours. */
@media (prefers-reduced-motion: reduce) {
    .sidebar #navbar-menu .nav-link,
    .table > tbody > tr > td,
    .btn {
        transition: none;
    }
}


/* =========================================================================
 * 9. DARK PALETTES
 * =========================================================================
 * The identity is light-first, and this plugin does not convert a dark palette
 * into a light one. A user who chose "Darker" chose it, and GLPI writes
 * `data-glpi-theme-dark="1"` onto <html> (head.html.twig) so that choice is
 * legible to us.
 *
 * What survives into dark is the brand, not the Bright Identity: the logo, the
 * accent, and the type. The surfaces stay GLPI's, because the guide's Dark
 * Identity (p.4) is a Racing Green ground and forcing that over a user's
 * chosen dark palette would be the same overreach in the other direction.
 *
 * The critical correction is the accent. Vibrant Green measures 9.56:1 on
 * black, so on dark it becomes usable as *text* — the light-theme derivation
 * that darkens it would be exactly wrong here.
 * ========================================================================= */

:root[data-glpi-theme-dark="1"] {
    --tblr-link-color: var(--fb-green);
    --tblr-link-color-rgb: 30, 201, 91;
    --tblr-link-hover-color: var(--fb-green-hover);

    --glpi-form-header-fg: var(--fb-green);
    --glpi-badge-fg: var(--fb-green);

    /* On a dark chrome the negative variant is correct everywhere, including
     * the login card, which is itself dark under a dark palette.
     *
     * Note the asymmetry, which is deliberate: the chrome pair carries the
     * *monogram* and the login pair carries the *lockup*, exactly as in the
     * light mapping. Only the colour variant changes here, never which artwork
     * is used — that is a composition decision and it does not depend on the
     * user's theme. */
    --glpi-logo-dark: var(--fb-logo-mark-negative);
    --glpi-logo-dark-reduced: var(--fb-logo-mark-negative);
    --glpi-logo-dark-login: var(--fb-logo-negative);

    /* Note what is NOT here: no surface, border or muted token is undone.
     * There is nothing to undo, because the light-only block above never
     * claimed them under this attribute. Trying to hand them back here instead
     * — with `initial` or `revert` — is what turned every dark palette's page
     * background black. See the note on that block. */
}

:root[data-glpi-theme-dark="1"] h1,
:root[data-glpi-theme-dark="1"] h2,
:root[data-glpi-theme-dark="1"] h3,
:root[data-glpi-theme-dark="1"] h4,
:root[data-glpi-theme-dark="1"] h5,
:root[data-glpi-theme-dark="1"] h6,
:root[data-glpi-theme-dark="1"] .card-title,
:root[data-glpi-theme-dark="1"] .page-title {
    /* Racing Green measures 1.26:1 on GLPI's dark surface — invisible. The
     * guide's own Dark Identity sets headings in the bright grey. */
    color: var(--fb-grey);
}



/* =========================================================================
 * 10. HIGH CONTRAST
 * =========================================================================
 * GLPI writes `data-high-contrast="1"` onto <html> when the user asks for it
 * (head.html.twig, css/includes/_highcontrast.scss). That is an explicit
 * request for legibility over identity, and it is answered literally: the
 * brand steps out of the way.
 *
 * The mono logo used here is not an invention — guide p.7 sanctions a 100%
 * black variant, and this is the web equivalent of the use it names.
 * ========================================================================= */

:root[data-high-contrast="1"] {
    --tblr-link-color: #0b4d23;
    --tblr-link-hover-color: #000;
    /* Chrome keeps the monogram, the login page keeps the lockup — only the
     * colour variant steps aside. */
    --glpi-logo-dark: var(--fb-logo-mark-mono);
    --glpi-logo-dark-reduced: var(--fb-logo-mark-mono);
    --glpi-logo-dark-login: var(--fb-logo-mono);
}

:root[data-high-contrast="1"] .table > thead > tr > th {
    color: #000;
}


/* =========================================================================
 * 11. UTILITIES
 * =========================================================================
 * A deliberately short list, for this plugin's own templates. Anything that
 * belongs to a component belongs in that component.
 * ========================================================================= */

.fb-muted { color: var(--fb-n-600); }
.fb-accent { color: var(--fb-green-text); }
.fb-on-brand { color: var(--fb-deep); }

/* A Vibrant Green fill always carries a Racing Green label. This pairs them so
 * the two cannot be separated by accident — white on this fill is 2.20:1. */
.fb-fill-brand {
    background-color: var(--fb-green);
    color: var(--fb-deep);
}

.fb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}


/* =========================================================================
 * 12. RESPONSIVE
 * =========================================================================
 * GLPI's own layout is responsive and is not re-litigated here. What needs
 * saying is that the brand block cannot keep a desktop's footprint on a phone:
 * below `lg` the sidebar becomes a top bar, where a full-height brand block
 * would take a third of the viewport.
 *
 * The artwork no longer needs overriding here — the chrome carries the
 * monogram at every width since the 2026-09-01 change, so this is now purely a
 * size step. It keeps the same 1.6 aspect as the desktop box.
 * ========================================================================= */

@media (max-width: 991.98px) {
    .navbar-brand .glpi-logo {
        width: 72px;
        height: 45px;
    }

    /* No brand *panel* below this width, but the identity does not disappear
     * with it — see §6. The narrow layout is the stacked composition: lockup
     * above, form below, and the guide's block band anchoring the foot of the
     * page.
     *
     * Without the band the narrow login was a logo and a form on a grey field
     * and nothing else — the one state of this page carrying no brand device at
     * all, which on a phone is where most people meet it. It is the same
     * artwork as the panel's, turned to run the full width, so it is the same
     * quote rather than a second invention.
     *
     * IN FLOW, NOT FIXED, AND THAT IS THE WHOLE DESIGN OF IT
     * -----------------------------------------------------
     * The first attempt was a fixed strip at the bottom with the content given
     * matching bottom padding. It fell over twice. With `min-height: 100vh`
     * plus that padding the page was 806px in a 711px viewport — 95px of
     * pointless scroll on a form that fits. Subtracting the band's height from
     * the content box fixed the scroll and left a worse bug behind: on a short
     * viewport the content simply grows past the band, and because a fixed
     * element with `z-index: -1` sits *behind* the page, the footer would have
     * scrolled straight over the blocks.
     *
     * So `body` becomes the column, `main` takes the free space, and the band
     * is a `::after` at the end of it. The band cannot overlap what precedes it
     * in flow, it sits at the bottom when there is room, and it is simply
     * pushed down when there is not. No height arithmetic to keep in step. */
    body.welcome-anonymous {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    /* Undoes the `min-height: 100vh` from the global centring rule — here the
     * flex parent supplies the height, and leaving both would stack them. */
    body.welcome-anonymous .page-anonymous {
        flex: 1 0 auto;
        min-height: 0;

        /* Half the desktop's breathing room. GLPI's own `.py-6` on the
         * container is already 48px top and bottom; adding another 32 each side
         * put 160px of vertical padding on a 711px phone screen, which is most
         * of the reason the page scrolled at all. */
        padding-block: var(--fb-space-4);
    }

    body.welcome-anonymous::before {
        content: none;
    }

    body.welcome-anonymous::after {
        content: "";
        flex: 0 0 auto;
        height: var(--fb-login-band-narrow);
        background-image:
            radial-gradient(
                circle calc(100vw * 0.0195) at 86.1% 69.9%,
                var(--fb-red) 99%,
                transparent 100%
            ),
            linear-gradient(
                to right,
                var(--fb-deep) 0 16.3%,
                var(--fb-green) 16.3% 22.8%,
                var(--fb-grey) 22.8% 48.2%,
                var(--fb-white) 48.2% 100%
            );
        background-repeat: no-repeat;
        background-size: 100% 100%, 100% 100%;
    }


    .page-anonymous .glpi-logo,
    body.welcome-anonymous .glpi-logo {
        width: 132px;
        height: 134px;
    }

    /* No font-size override here any more. The desktop rule is a
     * `clamp(1.75rem, 3.4vw, 2.75rem)` whose *floor* is the mobile size, so a
     * second declaration only fought it — it was pinning the heading to 22px
     * on a phone while the clamp had already resolved to a deliberate 28px. */
}


/* =========================================================================
 * 13. PLUGIN-OWNED SURFACES
 * =========================================================================
 * The configuration screen and the login panel. These are this plugin's own
 * markup, so unlike everything above they are styled directly rather than
 * through GLPI's tokens.
 *
 * They live in this file rather than a separate stylesheet on purpose. A second
 * file would be a second <link> on every page in the product to serve rules
 * that two screens use; ~3 KB inside a file that is already cached immutably
 * per plugin version is the cheaper of the two.
 * ========================================================================= */

/* ---- Login panel ------------------------------------------------------- */

.fb-login-panel {
    max-width: 22rem;
    margin-inline: auto;
    text-align: start;
}

.fb-login-panel__headline {
    margin-bottom: var(--fb-space-3);
    color: var(--fb-deep);
    font-size: 1.5rem;
}

.fb-login-panel__message {
    margin: 0;
    color: var(--fb-n-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ---- Configuration screen ---------------------------------------------- */

.fb-config__scope {
    margin-bottom: var(--fb-space-6);
    padding: var(--fb-space-4);
    border: 1px solid var(--fb-n-200);
    border-radius: var(--fb-radius);
    background: var(--fb-white);
}

.fb-config__grid {
    display: grid;
    gap: var(--fb-space-6);
    grid-template-columns: minmax(0, 1fr);
}

/* The aside is a reference column, not a second form. It only earns its own
 * column when there is room for both to stay readable; below that it stacks
 * under the fields it describes, which is the order it is read in anyway. */
@media (min-width: 1200px) {
    .fb-config__grid {
        grid-template-columns: minmax(0, 1fr) 24rem;
        align-items: start;
    }

    .fb-config__aside {
        position: sticky;
        top: var(--fb-space-6);
    }
}

.fb-config__aside > .card + .card {
    margin-top: var(--fb-space-6);
}

.fb-config .card + .card {
    margin-top: var(--fb-space-5);
}

.fb-field {
    padding-block: var(--fb-space-4);
    border-top: 1px solid var(--fb-n-100);
}

.fb-field:first-of-type {
    border-top: 0;
}

.fb-field__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fb-space-3);
    align-items: center;
}

.fb-config__hint {
    margin-block: var(--fb-space-2) 0;
    color: var(--fb-n-600);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.fb-config__value {
    font-size: 0.875rem;
    color: var(--fb-n-600);
}

.fb-config__badge {
    background: var(--fb-n-100);
    color: var(--fb-n-600);
    font-weight: 400;
    text-transform: lowercase;
}

.fb-config__thumb {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 3rem;
    padding: var(--fb-space-1);
    border: 1px solid var(--fb-n-200);
    border-radius: var(--fb-radius);
    background: var(--fb-white);
}

/* A negative logo is white artwork. Previewing it on a white card shows an
 * empty box and reads as a failed upload, so its thumbnail carries the ground
 * it is designed for. */
.fb-config__thumb--dark {
    background: var(--fb-deep);
}

.fb-config__thumb--empty {
    background: repeating-linear-gradient(
        45deg,
        var(--fb-n-50) 0 6px,
        var(--fb-n-100) 6px 12px
    );
}

.fb-config__thumb img {
    max-width: 100%;
    max-height: 100%;
}

.fb-config__actions {
    margin-top: var(--fb-space-6);
}

.fb-config__swatch {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 1.75rem;
    border: 1px solid var(--fb-n-200);
    border-radius: var(--fb-radius);
    font-size: 0.75rem;
    font-weight: 700;
}

.fb-config__contrast td {
    vertical-align: middle;
}

/* ---- Preview -----------------------------------------------------------
 * Reads its colours from custom properties set inline by the template, so it
 * renders the palette that would actually ship — including any correction the
 * contrast guard applied. A preview that showed the requested colour rather
 * than the rendered one would be actively misleading. */

.fb-preview {
    overflow: hidden;
    border: 1px solid var(--fb-n-200);
    border-radius: var(--fb-radius);
    font-size: 0.75rem;
}

.fb-preview__nav {
    padding: var(--fb-space-3);
    background: var(--sb);
    color: var(--sf);
}

.fb-preview__logo {
    display: block;
    height: 2.25rem;
    margin-bottom: var(--fb-space-3);
    background: var(--fb-logo-mark-negative) no-repeat center left / contain;
}

.fb-preview__item {
    display: block;
    padding: var(--fb-space-2) var(--fb-space-3);
    border-left: 3px solid transparent;
}

.fb-preview__item--active {
    border-left-color: var(--p);
    background: var(--sa);
}

.fb-preview__item--muted {
    color: var(--sfm);
}

.fb-preview__body {
    padding: var(--fb-space-4);
    background: var(--fb-white);
}

.fb-preview__heading {
    margin: 0 0 var(--fb-space-2);
    color: var(--deep);
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* The accent full stop.
 *
 * `--acc` is bound to the guard's *text-safe* accent, not the raw one. At the
 * display sizes the device is designed for — the login headline at 24px black,
 * a section heading at 20px black — the raw Rec Red measures 3.48:1 and clears
 * the 3:1 that large text needs. This preview heading is 16px, which is not
 * large text by the WCAG definition however bold it is, so it needs 4.5:1 and
 * the raw accent would fail. Caught by tools/check-tokens.php reporting
 * `--fb-red-text` as declared but never used. */
.fb-preview__heading span {
    color: var(--acc, var(--fb-red-text));
}

.fb-preview__text {
    margin: 0 0 var(--fb-space-3);
}

.fb-preview__text a {
    color: var(--at);
}

.fb-preview__btn {
    display: inline-block;
    padding: var(--fb-space-2) var(--fb-space-4);
    border-radius: var(--fb-radius);
    background: var(--p);
    color: var(--on-p);
    font-weight: 700;
}

.fb-preview__badge {
    display: inline-block;
    margin-inline-start: var(--fb-space-2);
    padding: var(--fb-space-1) var(--fb-space-3);
    border-radius: var(--fb-radius-pill);
    background: var(--fb-n-100);
    color: var(--at);
}

.fb-preview__table {
    width: 100%;
    margin-top: var(--fb-space-4);
    border-collapse: collapse;
}

.fb-preview__table th {
    padding-block: var(--fb-space-1);
    border-bottom: 2px solid var(--fb-n-200);
    color: var(--fb-n-600);
    font-size: 0.6875rem;
    text-align: start;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fb-preview__table td {
    padding-block: var(--fb-space-2);
    border-bottom: 1px solid var(--fb-n-100);
}

/* ---- The footer ---------------------------------------------------------
 *
 * GLPI's copyright line. It sat 16px under the disclosure, which read as part
 * of the same group — a legal notice pretending to be a third option.
 *
 * Pushed away and quietened. It is not ours to remove: it is GLPI's
 * attribution and the licence expects it to be there. It is only ours to stop
 * it competing. */
/* `padding` rather than `margin`, and that is not a style preference: the
 * element carries Bootstrap's `.mt-3`, which sets `margin-top` with
 * `!important`. A margin here would lose silently, and answering an
 * `!important` with another one is how a plugin ends up in a specificity war
 * with its host over a copyright line. */
body.welcome-anonymous main .text-muted {
    padding-block-start: var(--fb-space-10);
    color: var(--fb-n-500);
    font-size: 0.75rem;
}
