/*
 * portal-body.css — restyles the Odoo-rendered page BODY of the reseller portal
 * (/my/*, /new-quote, /web/login) to the Taco design system.
 *
 * Companion to portal-chrome.css, injected by the same router (edge/portal-router,
 * CHROME_HEAD_LINKS) and loaded straight after it. The two sheets never overlap:
 *   portal-chrome.css  styles .tt-chrome — OUR header/footer/cookie bar, swapped in
 *                      for Odoo's by HTMLRewriter.
 *   portal-body.css    styles #wrap / .o_portal_wrap — ODOO's markup, which stays
 *                      Odoo's and keeps working; this only changes how it looks.
 * Nothing here may reach into .tt-chrome, and nothing there reaches in here.
 *
 * Why a restyle and not a rebuild: the body is Odoo's own Bootstrap 5 markup, rendered
 * by QWeb from modules we do not own (sale, helpdesk, portal, website_form). Replacing
 * it would mean reimplementing the portal. So the hooks below are Odoo's stable class
 * names — captured as a signed-in reseller in scratch/portal-capture/ — and the job is
 * to make Odoo's shapes take our values: radii, hairlines, density, type scale.
 *
 * THREE RULES WHEN EDITING THIS FILE
 *
 * 1. Scope everything under the three roots Odoo gives a page body:
 *
 *      :is(#wrap, main > .o_portal, main > .oe_website_login_container)
 *
 *    `#wrap` is the page body proper. `main > .o_portal` is the breadcrumb/actions
 *    strip Odoo renders as a SIBLING of #wrap on /my/account and on the detail pages.
 *    `main > .oe_website_login_container` is the auth screens — /web/login,
 *    /web/reset_password, /web/login/totp and signup — which Odoo renders with NEITHER
 *    of the other two roots (§14), so for as long as the sheet had two roots the login
 *    page showed Odoo's own theme through: #00a9a3 pill buttons, 15px-radius inputs,
 *    an outlined `.btn-link`.
 *
 *    `main >` is what keeps the second and third roots off #wrapwrap, which carries the
 *    same `.o_portal` class and contains the injected .tt-chrome. A bare element or
 *    utility selector here would leak into the chrome and into Odoo's own overlays;
 *    `:is()` takes the specificity of its MOST specific argument, so the whole sheet
 *    stays at #wrap's 1,0,0 however many roots the list grows — adding the third
 *    changed no cascade outcome on any page that already worked.
 *
 * 2. `!important` only where a specific Odoo or Bootstrap rule leaves no choice, with
 *    the beaten selector named in a comment. Bootstrap spacing/colour/opacity
 *    UTILITIES are `!important` by design, and Odoo's website builder writes inline
 *    `style` attributes — those are the only two reasons that appear below. Every use
 *    is marked `[!]`.
 *
 * 3. Semantic tokens only, never a layer-1 primitive (CLAUDE.md). Odoo pages never
 *    carry `[data-palette]`, so this is Classic throughout — but the indirection is
 *    what keeps a future palette or tone switch working.
 */

/* ---------------------------------------------------------------------------
   Tokens — declared on :root, ONCE.

   portal-chrome.css declares its own subset on `.tt-chrome` rather than `:root`, so
   that it can never be reached by (or reach) the rest of an Odoo page — which means
   #wrap sees no design tokens at all and this file has to bring its own. Safe to put
   on :root: Odoo/Bootstrap namespace their custom properties `--bs-*` and `--o-*`, so
   `--color-*` / `--space-*` / `--radius-*` cannot collide with anything on the page.

   Hand-copied from site/src/styles/tokens.css, same standing caveat as its sibling:
   an Odoo page does not run the Astro build, so nothing here updates on its own. Keep
   the values in sync by hand.
   ------------------------------------------------------------------------ */

:root {
  /* primitives */
  --teal-50:  #f0f9f8;
  --teal-100: #d9efec;
  --teal-200: #b3e0d9;
  --teal-300: #7ecabf;
  --teal-400: #38ada0;
  --teal-500: #0d9184;
  --teal-600: #008478;
  --teal-700: #006e68;
  --teal-800: #005c5d;
  --teal-900: #004749;

  --ink-50:  #f6f7f8;
  --ink-100: #eceff1;
  --ink-200: #d9dee2;
  --ink-300: #b9c2c9;
  --ink-400: #8b98a3;
  --ink-500: #64717c;
  --ink-600: #4a555f;
  --ink-700: #38424a;
  --ink-800: #283138;
  --ink-900: #1d252c;

  --feedback-success:        #198754;
  --feedback-success-bg:     #e7f5ee;
  --feedback-success-border: #a3d9bf;
  --feedback-warning:        #b45309;
  --feedback-warning-bg:     #fdf4e7;
  --feedback-warning-border: #f0c891;
  --feedback-danger:         #b42318;
  --feedback-danger-bg:      #fdeceb;
  --feedback-danger-border:  #f2b5b0;
  --feedback-info:           #0b6bcb;

  /* semantic — Classic only */
  --color-text:           var(--ink-900);
  --color-text-muted:     var(--ink-500);
  --color-text-inverse:   #ffffff;
  --color-bg:             #ffffff;
  --color-surface:        var(--ink-50);
  --color-surface-raised: #ffffff;
  --color-border:         var(--ink-200);
  --color-border-strong:  var(--ink-500);
  --color-disabled-bg:    var(--ink-100);
  --color-disabled-fg:    var(--ink-400);

  --color-accent:            var(--teal-600);
  --color-accent-fill:       var(--teal-600);
  --color-accent-fill-hover: var(--teal-700);
  --color-accent-hover:      var(--teal-700);
  --color-accent-active:     var(--teal-800);
  --color-accent-subtle:     var(--teal-100);
  --color-accent-on:         #ffffff;
  --color-accent-text:       var(--teal-700);
  --color-surface-accent:    var(--teal-50);
  --color-border-accent:     var(--teal-200);
  --color-link:              var(--teal-700);
  --color-link-hover:        var(--teal-800);
  --color-focus-ring:        color-mix(in oklab, var(--teal-600) 45%, transparent);
  --focus-ring:              0 0 0 3px var(--color-focus-ring);

  --color-success: var(--feedback-success);
  --color-warning: var(--feedback-warning);
  --color-danger:  var(--feedback-danger);
  --color-info:    var(--feedback-info);

  /* type */
  --font-sans: Raleway, system-ui, -apple-system, "Segoe UI", sans-serif;
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extra:    800;
  --tracking-display: -0.028em;
  --tracking-heading: -0.018em;
  --tracking-base:    -0.011em;
  --tracking-wide:     0.06em;
  --text-2xs:  0.6875rem;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-md:   0.9375rem;
  --text-base: clamp(1rem, 0.94rem + 0.19vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.01rem + 0.38vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 1.02rem + 0.75vw, 1.5rem);
  --text-2xl:  clamp(1.5rem, 1.15rem + 1.13vw, 1.875rem);
  --text-3xl:  clamp(1.75rem, 1.16rem + 1.88vw, 2.375rem);
  --text-4xl:  clamp(2rem, 1.25rem + 2.26vw, 3rem);
  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --measure: 68ch;

  /* spacing / layout */
  --space-px: 1px;
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --section-y-tight: clamp(2.25rem, 5vw, 4.5rem);
  --container:        75rem;
  --container-narrow: 48.75rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;
  --radius-full: 50%;

  --shadow-xs: 0 1px 2px color-mix(in oklab, var(--ink-900) 8%, transparent);
  --shadow-sm: 0 2px 6px color-mix(in oklab, var(--ink-900) 8%, transparent),
               0 1px 2px color-mix(in oklab, var(--ink-900) 5%, transparent);
  --shadow-md: 0 6px 16px color-mix(in oklab, var(--ink-900) 10%, transparent),
               0 2px 4px color-mix(in oklab, var(--ink-900) 6%, transparent);

  --duration-base: 200ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-base: 0ms; }
}

/* ---------------------------------------------------------------------------
   0. The document scrolls, not the body

   The ONE rule in this file that is not scoped to Odoo's page body, and the
   only documented exception to rule 1 above.

   MEASURED on beta, 2026-09-11 (CDP matched-rules on `<body>`): Odoo's own
   bundle ships three rules whose combined effect nobody intended —

     html, body { height: 100%; }
     html, body { position: relative; height: 100%; }
     html, body { overflow-x: hidden; }

   `overflow-x: hidden` computes the untouched `overflow-y: visible` up to
   `auto`, and `height: 100%` then gives `<body>` a 900px content box for
   2117px of content. So `<body>` is a SCROLL CONTAINER the size of the
   viewport and the document never moves: documentElement.scrollHeight is the
   viewport height, `window.scrollY` is permanently 0 whatever the reseller
   scrolls, and everything our chrome hangs off the document scroll is dead —
   the Nav's scroll-direction script kept `data-hidden="false"` at every
   offset, and the sticky header and rail are pinned inside a scrollport their
   own scripts cannot see. /channel-connect, the same shell served by EmDash,
   scrolls the document, so this was also the last structural difference
   between the two halves of one portal.

   The fix is on `body` alone, and needs no `!important` — this sheet loads
   after Odoo's bundle and the selectors tie:
     - `height: auto`      the body box is its content again, so the viewport
                           has something to scroll;
     - `min-height: 100%`  keeps what Odoo's `height` was actually buying: a
                           short page (/my/orders with no orders, /web/login)
                           still fills the fold, so the footer does not float
                           up the page. It resolves against `<html>`, which
                           keeps `height: 100%` — the root's overflow
                           propagates to the viewport, so the root is not a
                           second scroll container;
     - `overflow-x: clip`  the same protection against a wide snippet that
                           `hidden` bought, WITHOUT the side effect: `clip`
                           may pair with `visible` on the other axis, so
                           `<body>` stops being a scroll container at all.
                           (Odoo made the same swap itself on `#wrapwrap`.)

   Verified at 1280 and 390 on /new-quote, /new-support, /my/orders and
   /web/login: the document scrolls, the rail sticks at `--nav-h` + 24px and
   releases with its column, the Nav hides on a scroll down, the cookie bar
   stays fixed to the viewport and the footer sits at the end of the content.
   ------------------------------------------------------------------------ */

body {
  height: auto;
  min-height: 100%;
  overflow-x: clip;
}

/* ---------------------------------------------------------------------------
   1. Type and measure

   Odoo already serves Raleway, so the family is not the mismatch — the tracking and
   the ink are. Measured on the staging build: body copy came out at Bootstrap's
   $gray-700 (#495057) with `letter-spacing: normal`, where the site runs ink-900 at
   --tracking-base. That is most of why the portal read as a different site even
   though the font matched.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-base);
  color: var(--color-text);
}

:is(#wrap, main > .o_portal, main > .oe_website_login_container) p { line-height: var(--leading-normal); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) small { font-size: var(--text-sm); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) a:hover { color: var(--color-link-hover); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------------------------------------------------------------------------
   2. Headings

   Odoo starts the portal outline at <h3> (the page title) and uses <h4> for the
   sections under it, so the levels are shifted one step from a marketing page's
   h1/h2. The scale below is global.css's, entered at the level Odoo actually uses:
   the portal title lands on --text-3xl (38px at desktop, within a pixel of what Odoo
   renders) rather than on the h1 step, which would make a utility page shout louder
   than /channel-connect's own hero. h1/h2 keep the section-heading step for the
   builder-snippet pages (/new-quote's "Start a new quote" is an <h2>).
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(h1, h2, h3, h4, h5, h6) {
  font-family: inherit;
  color: var(--color-text);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(h1, h2) { font-size: var(--text-4xl); letter-spacing: var(--tracking-display); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) h3 { font-size: var(--text-3xl); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) h4 { font-size: var(--text-xl); }
/* The only <h5> in the captured portal is the reseller's name in the /my sidebar. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) h5 { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) h6 { font-size: var(--text-base); font-weight: var(--weight-semibold); }

/* /new-quote's snippet subhead. Bootstrap's `.lead` is 1.25rem at weight 300. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) p.lead {
  font-size: var(--text-lg);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  max-width: var(--measure);
  margin-inline: auto;
}

/* ---------------------------------------------------------------------------
   3. Layout — align the body with the header and footer around it

   Odoo's `.container` is 1140px wide with 15px gutters; ours is 1200 with --gutter.
   Left as-is the page body started 13px to the right of the wordmark directly above
   it, which is the kind of drift that reads as two different sites stitched together.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.container, .container-fluid) {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Odoo's narrow container (the /new-quote snippet). Kept narrow — a one-column form
   at full container width is unreadable — but on our own narrow measure. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_container_small {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Section rhythm. `.pt-3 .pb-5` gave the page 16px above the title — the heading
   almost touched the nav — and 48px below, so the body sat off-centre between our
   own header and footer. --section-y-tight is what a Section space="tight" uses.
   [!] Bootstrap spacing utilities are declared `!important`; beats `.pt-3`/`.pb-5`. */
#wrap.o_portal_wrap > .container { padding-block: var(--section-y-tight) !important; }

/* The builder-snippet pages (/new-quote) carry Odoo's own `.pt64`/`.pb48` instead.
   [!] Odoo generates those snippet padding classes `!important` too. */
#wrap.oe_structure > section { padding-block: var(--section-y-tight) !important; }

/* The sibling strip (see rule 1 at the top of this file): on /my/account and on the
   detail pages Odoo renders the trail — and, on the detail pages, the print/download
   actions — in its own `.o_portal.container` block ABOVE #wrap. It is the first thing
   under our header there, so the page's top space belongs to IT. `.mt-3` already
   contributes 16px of that and is a Bootstrap utility we are not going to fight, so
   the padding makes up the rest. */
main > .o_portal.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block-start: calc(var(--section-y-tight) - var(--space-4));
}
/* …and then the body block below it opens at a normal gap from the trail rather than
   a second section's worth of air. [!] beats `.pt-3` again. */
main > .o_portal.container + #wrap > .container { padding-block-start: var(--space-8) !important; }

/* ---------------------------------------------------------------------------
   3b. Inside the app shell (D112 point 5)

   On a signed-in portal page the router wraps Odoo's `<main>` in the rail +
   content grid and names main itself `.tt-portal__main` (edge/portal-router/
   src/index.ts; the shell's geometry is in portal-chrome.css). The content
   column IS the measure from that point on, so Odoo's containers stop centring
   themselves inside it — a second centring on top of the shell's own would sit
   the body off to the right of the rail with a double gutter, and the coloured
   snippet sections on /new-quote would no longer reach the column's edges.

   `--shell-gutter` comes from `.tt-portal` so the gutter and its narrow-viewport
   step are defined once, beside the grid they belong to.
   ------------------------------------------------------------------------ */

.tt-portal__main :is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.container, .container-fluid),
.tt-portal__main > .o_portal.container {
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--shell-gutter, var(--space-6));
}

/* A container NESTED in another one takes the gutter twice, and the inner copy is
   pure indent — the column has already been established by the outer one. Odoo nests
   them on the detail pages (the ticket's `#card_header` is a `.container` inside
   `#wrap > .container`) and on /new-quote (a `.container-fluid` inside
   `.o_container_small`), and inside the shell the second helping is --shell-gutter:
   64px, which is what sat the ticket title that far right of its own description.
   Placed AFTER the shell rule on purpose — both selectors compute to the same
   specificity, so this only wins from here. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.container, .container-fluid, .o_container_small) :is(.container, .container-fluid) {
  max-width: none;
  padding-inline: 0;
}

/* ---------------------------------------------------------------------------
   4. Buttons — Button.astro's geometry

   Odoo's portal buttons are 52px pills: `.btn` at 50px radius, `.btn-light` a
   #ced4da grey with a 2px near-black border, `.btn-primary` an unaligned #00a9a3.
   One geometry for all of them, then three variants: accent fill, accent outline,
   and a quiet neutral outline for the toolbar (§8).

   `--radius-md`, not the pill: Button.astro ships both shapes, and the portal is
   application chrome — a page of pill buttons beside pill inputs is what made the
   body read as a different product.
   ------------------------------------------------------------------------ */

/* `.taco-btn` rides along with `.btn` everywhere below: /new-support is hand-built
   and styles its own buttons without Bootstrap, so the ONLY way its CTA looks like
   every other primary action in the portal is to be the same rule, not a copy of it.
   §11b carries the three declarations of its own it still has to lose. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn, .taco-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  height: auto;
  padding: 0 var(--space-5);
  border: var(--space-px) solid transparent;
  border-radius: var(--radius-md);
  background-color: transparent;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-base);
  line-height: var(--leading-tight);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-primary, .taco-btn),
:is(#wrap, main > .o_portal, main > .oe_website_login_container) input[type="submit"].btn-primary {
  background-color: var(--color-accent-fill);
  border-color: var(--color-accent-fill);
  color: var(--color-accent-on);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-primary, .taco-btn):hover,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) input[type="submit"].btn-primary:hover {
  background-color: var(--color-accent-fill-hover);
  border-color: var(--color-accent-fill-hover);
  color: var(--color-accent-on);
}

/* Every remaining Odoo variant collapses onto the secondary outline. Odoo hands out
   `.btn-secondary`, `.btn-light`, `.btn-outline-*` and the bare `.btn` for actions of
   the same weight (Back to Dashboard, Change Password, Enable 2FA, modal Cancel), so
   keeping four different looks would only reproduce the inconsistency we are removing. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-light, .taco-btn--ghost) {
  background-color: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-light, .taco-btn--ghost):hover {
  background-color: var(--color-accent-subtle);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

/* A bare `.btn` (the delete-account modal's Cancel) is a quiet neutral, not an accent. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn:not([class*="btn-"]) {
  border-color: var(--color-border);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn:not([class*="btn-"]):hover { background-color: var(--color-surface); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-danger, input[type="submit"].btn-danger) {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-text-inverse);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.btn-danger, input[type="submit"].btn-danger):hover {
  background-color: color-mix(in oklab, var(--color-danger) 85%, black);
  color: var(--color-text-inverse);
}

/* Button.astro's `tertiary`: a link that happens to be a button. "Edit information". */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn-link {
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background-color: transparent;
  color: var(--color-link);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn-link:hover { color: var(--color-link-hover); text-decoration: underline; background-color: transparent; }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn:disabled,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn.disabled,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn[aria-disabled="true"] {
  background-color: var(--color-disabled-bg);
  border-color: transparent;
  color: var(--color-disabled-fg);
  cursor: not-allowed;
}

/* Odoo's mobile account trigger wraps the reseller's avatar in a `.btn`, so the
   geometry above drew a 44px outlined box around a 40px circle. It is an avatar, not a
   button face — the id is Odoo's own and stable. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .btn[data-bs-target="#accountOffCanvas"] {
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background-color: transparent;
}

/* Bootstrap's caret is a CSS triangle; at the button's own size it reads as a chevron. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-toggle::after {
  margin-inline-start: var(--space-1);
  border-top-color: currentcolor;
  opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   5. Forms — Form.astro's geometry

   Odoo ships three different input shapes at once (44px pills in the searchbar, 38px
   15px-radius boxes on /my/account and /new-quote, `.form-control-sm` on /my/security)
   and a disabled state at #909294 on #e9e9ea, which is 3.0:1 and fails AA. One shape
   for all of them, on Form.astro's values: padding, hairline, --radius-md, --text-sm.

   `:not(.form-check-input)` is load-bearing, not defensive: Odoo's form builder puts
   `s_website_form_input` on RADIOS and CHECKBOXES too, so without it /new-quote's
   "Professional Services Required?" rendered its three radios as three full-width
   text fields with the words Yes/No/Unsure sitting beside them.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select, .s_website_form_input):not(.form-check-input) {
  width: 100%;
  height: auto;
  padding: var(--space-2) var(--space-3);
  border: var(--space-px) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-base);
  line-height: var(--leading-snug);
  box-shadow: none;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
/* `.form-control-sm` exists only to shrink Odoo's oversized default; the default is
   now the right size, so the small variant stops being a second shape. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .form-control-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }

/* `background-color`, never the `background` shorthand: `.form-select` carries its
   chevron as a background-image and the shorthand silently deletes it. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .form-select { padding-inline-end: var(--space-8); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select, .s_website_form_input):not(.form-check-input)::placeholder { color: var(--color-text-muted); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select, .s_website_form_input):not(.form-check-input):focus,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select, .s_website_form_input):not(.form-check-input):focus-visible {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: var(--focus-ring);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) textarea.form-control { resize: vertical; min-height: 6rem; }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select):disabled,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-control, .form-select)[readonly] {
  background-color: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* Labels. Odoo uses `.col-form-label` (portal), `.s_website_form_label` (builder) and
   a bare <label> (/my/security) for the same thing, at three different sizes and
   weights. `.form-check-label` is a different job — the word beside a radio — and must
   stay inline and normal weight. The bare `label` is safe here only because the whole
   selector is already inside Odoo's page body. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.col-form-label, .s_website_form_label, label):not(.form-check-label):not(.s_website_form_check_label) {
  display: block;
  margin-block-end: var(--space-2);
  padding-block: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_label_content { font-size: inherit; font-weight: inherit; }

/* /new-quote's labels carry an inline `style="width: 200px"` written by Odoo's form
   builder. Nothing here fights it with `!important`, and nothing needs to: Odoo's own
   CSS already outranks that inline width (measured — the labels compute to the full
   column), and `display: block` on the field row is what actually guarantees the
   stacked layout at every width. Should Odoo's rule ever go, the label would narrow
   to 200px but still sit ABOVE its input rather than beside it — which is the part
   that has to hold.

   `margin-inline: 0` is the gutter fix. Bootstrap's `.row` pulls itself 15px out on
   each side and its columns pad 15px back in — but Odoo zeroes the padding on THIS
   row's columns and leaves the negative margin, so every field bled 15px past its
   container: at 390 that left a 1px side gutter, and at 1280 the inputs sat 15px
   left of the centred heading above them. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_field > .row { display: block; margin-inline: 0; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_field > .row > [class*="col-"] { width: 100%; max-width: 100%; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_label { width: auto; padding-inline: 0; }
/* The submit row's spacer carries the same inline width and no content. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_submit > .s_website_form_label { display: none; }
/* Odoo stretches the builder's submit to `width: 100%` — a 750px teal bar across the
   bottom of /new-quote. Button.astro sizes to its label; the form's action does not
   need to be the widest thing on the page. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_submit .s_website_form_send { width: auto; }

/* "(optional)" is copy, not an alert — Form.astro's `.form__mark--optional`. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .s_website_form_mark { color: var(--color-text-muted); font-weight: var(--weight-normal); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-text, .s_website_form_field_description) {
  margin-block-start: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .form-check { display: flex; align-items: start; gap: var(--space-3); padding-inline-start: 0; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .form-check-input {
  margin: 0.25em 0 0;
  flex: 0 0 auto;
  accent-color: var(--color-accent-fill);
  border-color: var(--color-border-strong);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .form-check-input:checked { background-color: var(--color-accent-fill); border-color: var(--color-accent-fill); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.form-check-label, .s_website_form_check_label) {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text);
}

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .invalid-feedback { font-size: var(--text-sm); color: var(--color-danger); }

/* ---------------------------------------------------------------------------
   6. Portal home (/my) — the index cards and the details column

   Odoo's cards are a flat #f8f9fa fill with a 64px stock illustration; four of them in
   a column read as a stack of grey slabs. The values here are FeatureGrid's `tiles`
   variant, the site's own restrained card: hairline, --radius-md, one surface step,
   title --text-lg, copy --text-md muted.
   ------------------------------------------------------------------------ */

/* [!] `.rounded` is a Bootstrap utility (`border-radius: ... !important`) and Odoo
   compiled it to a static 6.4px rather than to a custom property, so there is no
   variable to redefine. One rule covers every `.rounded` in the portal body. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .rounded { border-radius: var(--radius-md) !important; }

/* The card GRID.

   Odoo groups the cards into five `.o_portal_category` rows (alerts, client, service,
   vendor, common) nested inside one outer row, and then leaves two cards as direct
   children of the outer row. A reseller sees three cards, so four of those five rows
   are empty — but each still carries `.mt-3`, which added 80px of dead air between
   the page title and the first card, and the one surviving category row took a full
   line to hold a single half-width card, leaving an empty half beside it.

   `display: contents` hoists every card out of its category row into one real grid, so
   the cards lay out by how many there ARE rather than by which Odoo module supplied
   them. No DOM is changed and nothing is hidden: a card Odoo shows full-width
   (`.col-12`, the "Invoices to pay" and "Document(s) to sign" alerts) still spans both
   tracks, and the `d-none` ones stay hidden and simply take no cell. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  /* The 80px the empty category rows used to supply, back as one deliberate step. */
  margin: var(--space-6) 0 0;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_category { display: contents; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card {
  width: auto;
  max-width: none;
  padding-inline: 0;
  margin: 0;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card.col-12 { grid-column: 1 / -1; }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card > a {
  align-items: flex-start;
  height: 100%;
  /* Padding is left to Odoo's `.py-3 .px-md-3` utilities, which resolve to 16px all
     round — exactly --space-4, so there is nothing here worth an `!important`. */
  /* [!] `.bg-100` is one of Odoo's colour utilities and is declared `!important`, so
     the card's own #f8f9fa fill cannot be replaced without matching it. White, per
     FeatureGrid's card variant — a hairline and a shadow do the separating, and a
     grey fill under a grey page ground is what made these read as slabs. */
  background-color: var(--color-surface-raised) !important;
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  color: var(--color-text);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
/* Quiet: the border takes the accent and the shadow lifts a step. No transform —
   sixteen cards that jump on hover is the tic this design system does not have. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card > a:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

/* Odoo's stock module illustrations. They stay — they are the page's only wayfinding —
   but at a size and saturation that lets the card's own words lead. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_icon {
  flex: 0 0 auto;
  width: var(--space-10);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_icon img {
  width: var(--space-10);
  height: var(--space-10);
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.6;
}

/* [!] The card title carries `.fs-5 .fw-normal .lh-1` — three Bootstrap typography
   utilities, all `!important`. Odoo's `.fs-5` is 24px, and `lh-1` collides the two
   lines of a title like "Requests for Quotation". */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card .fs-5 {
  font-size: var(--text-lg) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-tight) !important;
  letter-spacing: var(--tracking-heading);
  color: var(--color-text);
}
/* [!] `.opacity-75` (Bootstrap utility) on ink-500 lands at 3.0:1 and fails AA for
   body copy; the muted token is contrast-checked, so take the opacity back to 1. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card .opacity-75 {
  opacity: 1 !important;
  margin-block-start: var(--space-2);
  font-size: var(--text-md);
  color: var(--color-text-muted);
}

/* The details column: avatar, name, email, "Edit information", "Back to Dashboard". */
/* [!] Both avatars carry `.rounded`, whose utility `!important` the rule above only
   redirects to --radius-md; a circle needs its own. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.o_portal_contact_img, .o_avatar) {
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-full) !important;
  object-fit: cover;
}

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_address {
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-muted);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_address i { color: var(--color-accent); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_my_details + .btn-link { margin-block-start: var(--space-3); }

/* ---------------------------------------------------------------------------
   7. Toolbar — breadcrumb, filters, search, dropdowns

   Measured before: a 108px-tall bar holding a 48px breadcrumb, three 52px grey pills
   and a 44px grey search field. It is navigation furniture, not content, so it reads
   quiet and compact: --text-sm, one hairline-bordered search control, outline chips.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_navbar { gap: var(--space-3); row-gap: var(--space-3); }

/* The trail, on site/src/components/Breadcrumb.astro's terms. Odoo's markup already
   agrees on the shape — an `<ol>` of `.breadcrumb-item`s whose `::before` is a "/" —
   so this is the component's VALUES, not a second implementation: muted ink, `/` in
   the same muted ink, and the current page as the one crumb that reads solid.
   --text-sm rather than the component's --text-md is §7's standing decision above:
   in here the trail shares a bar with the filter chips.
   The router rewrites the first crumb — Odoo's house icon linking /my/home — into a
   text link to /channel-connect, and injects this same markup on the pages Odoo gives
   no trail at all (edge/portal-router/src/index.ts). Both are styled from here. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) ol.breadcrumb {
  --breadcrumb-item-padding-x: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  align-items: center;
}
/* NOT `display: flex`, which is what this rule used to be. A crumb holds mixed inline
   content — Odoo's last one is `<span>name</span> (#<span>id</span>)` — and as a flex
   container each of those became its own flex item: at 390px the name wrapped to two
   lines while "(#29763)" was pushed out to the far right of the row. The `<ol>` above
   is the flex container; inside a crumb, normal inline flow is the whole point.
   `min-width: 0` so a long crumb may shrink inside that flex row instead of forcing
   the trail wider than the column. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item { min-width: 0; }
/* Bootstrap FLOATS the separator, which puts it at the crumb's top-left and tucks the
   crumb's second line underneath it. Breadcrumb.astro's is an ordinary inline box, so
   a wrapped crumb starts after the "/" and wraps under its own first line.
   `--breadcrumb-item-padding-x` already provides the space on both sides of it. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item + .breadcrumb-item::before {
  float: none;
  color: var(--color-text-muted);
}
/* Chrome, not a call to action (D77, and Breadcrumb.astro's own note): the links
   inherit the trail's muted ink and only reach for the accent under the cursor. Left
   on the accent token they read as a row of competing CTAs above the page title. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item a { color: inherit; text-decoration: none; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item a:hover { color: var(--color-accent-text); text-decoration: underline; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item.active { color: var(--color-text); font-weight: var(--weight-semibold); }
/* Odoo truncates the last crumb (the record's name) to an ellipsis. The component
   wraps instead, and at 390px an ellipsis is all a reader would get. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .breadcrumb-item.text-truncate { overflow: visible; text-overflow: clip; white-space: normal; }

/* The Sort/Filter/Group labels beside each chip. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .navbar-text { font-size: var(--text-sm); color: var(--color-text-muted); padding-block: 0; }

/* The chips themselves, and the search control's two flanking buttons: a quiet
   neutral outline, not the accent — three accent buttons above a list would compete
   with whatever the page's real action is. `sm` geometry (Button.astro), because
   halving the bar's height is most of the fix. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_navbar .btn,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .btn {
  min-height: 32px;
  padding: 0 var(--space-3);
  border-color: var(--color-border);
  background-color: var(--color-surface-raised);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_navbar .btn:hover,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .btn:hover {
  border-color: var(--color-border-strong);
  background-color: var(--color-surface);
  color: var(--color-text);
}

/* The search control is ONE object: the group carries the border and the radius, and
   the field and its two buttons sit flush inside it. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group {
  border: var(--space-px) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  overflow: hidden;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group:focus-within {
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group > .form-control {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  /* [!] the field carries `.bg-light`, a Bootstrap colour utility, which paints it
     #ced4da grey — the reason the searchbar read as a disabled control. */
  background-color: transparent !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group > .btn {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--color-text-muted);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group > .btn:hover { background-color: var(--color-surface); color: var(--color-text); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel .input-group > .btn.border-end { border-inline-end: var(--space-px) solid var(--color-border); }

/* The mobile filters toggle. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .navbar-toggler {
  min-height: 32px;
  padding: 0 var(--space-3);
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  color: var(--color-text);
  font-size: var(--text-sm);
  box-shadow: none;
}

/* Odoo compiled Bootstrap's dropdown without its `--bs-dropdown-*` custom properties,
   so each value is set outright. `.dropdown-item.active` shipped as a solid teal bar
   with white text; the subtle pair is what the site's own menus use. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-menu {
  padding-block: var(--space-2);
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-item {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-item:hover,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-item:focus {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-item.active,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-item:active {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: var(--weight-semibold);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .dropdown-divider { border-top-color: var(--color-border); }

/* ---------------------------------------------------------------------------
   8. Tables and badges

   The test account has no orders and no tickets, so there was no captured DOM to work
   against: these hooks come from Odoo's `portal_table` markup, and were checked by
   rebuilding that markup as a local fixture rather than by reading a real list. The
   rules are deliberately generic for that reason. Values match global.css's `.prose`
   table — row hairlines, no zebra, no vertical rules.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(table.o_portal_my_doc_table, .table) {
  width: 100%;
  margin-block: 0;
  border-collapse: collapse;
  font-size: var(--text-md);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table > :not(caption) > * > * {
  padding: var(--space-3);
  background-color: transparent;
  border-bottom: var(--space-px) solid var(--color-border);
  box-shadow: none;
  vertical-align: middle;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(table.o_portal_my_doc_table, .table) thead th {
  padding-block: var(--space-2);
  border-bottom: var(--space-px) solid var(--color-border-strong);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
/* No zebra. Odoo's group rows (`.table-light`) stay distinguishable by surface. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table > tbody > tr:nth-of-type(odd) > * { background-color: transparent; }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table :is(tr, td, th).table-light,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table .table-light > * {
  background-color: var(--color-surface);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table > tbody > tr:hover > * { background-color: var(--color-surface); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table a { color: var(--color-link); }

/* A wide document table must not force the page to scroll sideways on a phone. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .table-responsive { overflow-x: auto; }

/* Badges. `.rounded-pill` is a Bootstrap utility (`!important`), but it resolves a
   custom property ON the element — Odoo renames Bootstrap's to `--border-radius-pill`
   — so redeclaring that property here retargets the utility with no `!important`
   needed at all. Both spellings are declared: the `--bs-` one costs nothing and covers
   a stock Bootstrap build.

   A hairline in the badge's own colour, rather than Odoo's leftover #28a745. Odoo
   paints that ring with `border: 1px solid var(--bg-solid) !important`, so the border
   goes the same way as the radius: redeclare `--bg-solid` on the element and the ring
   follows whichever state colour the rules below resolve, no `!important` required.
   The `border` declaration is the fallback for a build without Odoo's rule. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge {
  --border-radius-pill: var(--radius-sm);
  --bs-border-radius-pill: var(--radius-sm);
  --bg-solid: currentcolor;
  padding: var(--space-1) var(--space-2);
  border: var(--space-px) solid currentcolor;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-base);
  text-transform: none;
}
/* [!] Odoo declares `.badge { background: …!important; color: …!important }` for EVERY
   badge, on top of Bootstrap's own `.text-bg-*` helper — so a badge's two colours
   cannot be set at all without matching that importance.
   Each maps to the subtle pair its state deserves: a status chip in a table row is a
   label, not a traffic light, and Bootstrap's saturated fills were the loudest thing
   on the page. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge.text-bg-primary,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge.text-bg-info {
  background-color: var(--color-accent-subtle) !important;
  color: var(--color-accent-text) !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge.text-bg-success {
  background-color: var(--feedback-success-bg) !important;
  color: var(--color-success) !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge.text-bg-warning {
  background-color: var(--feedback-warning-bg) !important;
  color: var(--color-warning) !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge.text-bg-danger {
  background-color: var(--feedback-danger-bg) !important;
  color: var(--color-danger) !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .badge:is(.text-bg-secondary, .text-bg-light, .text-bg-dark) {
  background-color: var(--color-surface) !important;
  color: var(--color-text-muted) !important;
}

/* An avatar inside a table row is an identifier at line height, not a portrait. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(table.o_portal_my_doc_table, .table) :is(.o_portal_contact_img, .o_avatar, .rounded-circle) {
  width: var(--space-6);
  height: var(--space-6);
}

/* ---------------------------------------------------------------------------
   9. Alerts — Callout.astro

   Odoo's `.alert-info` is a pale blue slab (#d1ecf1), `.alert-secondary` a grey one.
   Callout's shape instead: a surface, a hairline, a rule on the leading edge that
   carries the state's colour, and body text at body-text size.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border: var(--space-px) solid var(--color-border);
  border-inline-start: 3px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-base);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert > i { margin-block-start: 0.2em; font-size: var(--text-lg); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert a { color: var(--color-link); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert-link { color: inherit; }

/* Info takes the NEUTRAL surface with an accent rule, not an accent tint: a teal-50
   wash at box size reads as mint, which is the same note the design review struck off
   `tone="accent"`. The rule carries the state; the ground stays quiet. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-info, .alert-primary) {
  border-color: var(--color-border);
  border-inline-start-color: var(--color-accent);
  background-color: var(--color-surface);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-info, .alert-primary) > i { color: var(--color-accent); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert-success {
  border-color: var(--feedback-success-border);
  border-inline-start-color: var(--color-success);
  background-color: var(--feedback-success-bg);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert-success > i { color: var(--color-success); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert-warning {
  border-color: var(--feedback-warning-border);
  border-inline-start-color: var(--color-warning);
  background-color: var(--feedback-warning-bg);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert-warning > i { color: var(--color-warning); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-danger, .alert-error) {
  border-color: var(--feedback-danger-border);
  border-inline-start-color: var(--color-danger);
  background-color: var(--feedback-danger-bg);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-danger, .alert-error) > i { color: var(--color-danger); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-secondary, .alert-light, .alert-dark) {
  border-color: var(--color-border);
  border-inline-start-color: var(--color-border-strong);
  background-color: var(--color-surface);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.alert-secondary, .alert-light, .alert-dark) > i { color: var(--color-text-muted); }

/* An alert used AS a card (Odoo's "Invoices to pay" / "Document(s) to sign" tiles are
   both at once) keeps the card's shape; §6's rule already wins on the surface. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_index_card > a.alert { border-inline-start-width: var(--space-px); }

/* ---------------------------------------------------------------------------
   10. Panels, modals and sections on the pages we could not capture

   /my/security is the only page with `<section>` blocks and a modal; the ORDER detail
   pages (no orders on the test account) add `.card` panels. Generic on purpose. The
   ticket detail is no longer in that list — it has a real capture now, and §11 below
   is measured rather than guessed.
   ------------------------------------------------------------------------ */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_security_body > section + section {
  margin-block-start: var(--space-10);
  padding-block-start: var(--space-8);
  border-block-start: var(--space-px) solid var(--color-border);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_security_body h4 { margin-block-end: var(--space-4); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_security_body form > .mb-3 { margin-block-end: var(--space-4); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .card {
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  box-shadow: var(--shadow-xs);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--space-px) solid var(--color-border);
  background-color: var(--color-surface);
  font-weight: var(--weight-semibold);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .card-body { padding: var(--space-5); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-content {
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-raised);
  box-shadow: var(--shadow-md);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: var(--space-px) solid var(--color-border);
}
/* Odoo paints the delete-account dialog's header `.bg-danger` — a full red band under
   white text. The state belongs on the title, not on the furniture. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-header.bg-danger {
  background-color: var(--feedback-danger-bg) !important; /* [!] beats `.bg-danger` */
  border-bottom-color: var(--feedback-danger-border);
  color: var(--color-danger);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-header .modal-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-body { padding: var(--space-6); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-footer { padding: var(--space-5) var(--space-6); border-top: var(--space-px) solid var(--color-border); gap: var(--space-3); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .offcanvas {
  background-color: var(--color-surface-raised);
  color: var(--color-text);
  border-inline-end: var(--space-px) solid var(--color-border);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .offcanvas-body { padding: var(--space-6); }

:is(#wrap, main > .o_portal, main > .oe_website_login_container) hr { border: 0; border-top: var(--space-px) solid var(--color-border); margin-block: var(--space-6); opacity: 1; }

/* ---------------------------------------------------------------------------
   11. The detail pages — ticket sidebar, title, chatter

   /helpdesk/ticket/<id> is the one portal page with a two-column body of its own: a
   sidebar (jump list, customer, "Powered by Odoo") beside the ticket card and its
   communication history. Reviewed from scratch/portal-capture/helpdesk-ticket-29763*.
   ------------------------------------------------------------------------ */

/* Odoo's own footer credit, in OUR portal's sidebar. It is Odoo's branding on a page
   that is now wearing the Taco chrome, and it is the only element in the sidebar that
   is not about the ticket. The whole "Powered by" block goes, not just the logo — a
   stranded "Powered by" reads worse than the badge did.
   [!] the block is `.d-none.d-lg-block`, and Bootstrap's display utilities are
   `!important` by design — `.d-lg-block` is what makes it visible from 992px up. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_sidebar_content > :has(> a[href*="odoo.com"]) {
  display: none !important;
}

/* The jump list ("Ticket", "History"). A quiet in-page TOC at the rail's measure —
   deliberately NOT rail pills, which would put two competing navigations on one page.
   Odoo pins `.p-0` on these links, so the rhythm comes from the list's gap instead of
   from padding we would have to fight for. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #ticket-nav .nav { gap: var(--space-1); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #ticket-nav .nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-decoration: none;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #ticket-nav .nav-link:hover {
  color: var(--color-accent-text);
  text-decoration: underline;
}

/* "Customer" — the sidebar's one section label — on .portal-rail__title's device
   (portal-chrome.css), so the rail and the column beside it agree on what a label is.
   Odoo writes it as `h6 > small`, which §2 and §1 had landing at body size. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_sidebar_content h6 { margin-block-end: var(--space-3); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_sidebar_content h6 > small {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
/* …and the block under it reads as one group at one size, not a name at body size
   over an address at --text-sm. The avatar is already a circle — §6's
   `.o_portal_contact_img, .o_avatar` rule covers this page too. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_sidebar_content .o_portal_contact_details { font-size: var(--text-sm); }

/* The rule between the sidebar and the ticket.
   [!] `.bg-300` is one of Odoo's colour utilities (`background-color: #DEE2E6
   !important`), which paints this hairline two steps darker than every other
   hairline on the page. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_project_portal_sidebar .vr {
  background-color: var(--color-border) !important;
}

/* The ticket's own title. Odoo wraps it in `.text-truncate`, which turned "TEST -
   portal migration check (safe to close)" into "TEST - portal migr…" — the page's
   subject, unreadable, at the top of the page about it. A heading may take two lines;
   it may not withhold the name of the thing. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #card_header .text-truncate {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

/* THE COMMUNICATION HISTORY, AND WHY THIS IS ONE CUSTOM PROPERTY.

   Odoo mounts the chatter into a SHADOW ROOT (`#chatterRoot`, Owl-rendered — measured
   2026-09-11; the saved capture stops at the empty host element, so the DOM inside it
   exists only at runtime). Nothing in this sheet can select into a shadow tree, so
   the usual hook does not exist. What DOES cross the boundary is inheritance: Odoo's
   own shadow stylesheet paints the strip from a custom property —
   `.o-portal-Chatter .o-mail-Chatter-top { background-color: var(--body-bg) }` — and
   that property is inherited from the host. Setting it here is therefore the only
   lever there is, and it is enough.

   The strip is a 20px sticky mask with `margin-top: -15px`, there to hide messages
   scrolling under a header the portal chatter does not have. Painted white on the
   content column's radial wash it read as a stray bar cutting through the bottom of
   "Communication history". So the history becomes a surface panel — §10's card
   values — and the mask lands white-on-white inside it, invisible, with the heading
   clear above the panel's edge. --body-bg is given the panel's own colour rather than
   `transparent`, because the same property feeds the dropdown, pagination and
   offcanvas backgrounds inside that shadow tree, and those need a real surface. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #ticket_chat > h3 { margin-block-end: var(--space-4); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) #discussion {
  --body-bg: var(--color-surface-raised);
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  /* [!] beats `.p-0`, a Bootstrap spacing utility and so `!important` by design. */
  padding: var(--space-5) !important;
}

/* ---------------------------------------------------------------------------
   11b. /new-support — the one hand-built page in the portal

   Unlike every other page this sheet touches, /new-support is not QWeb output:
   it is a page an author built in Odoo's HTML editor, and it ships its own
   ~120-line `<style>` in the body under its own class names — `#wrap` carries
   `.taco-wrapper`, the form sits in a `.taco-card`, the CTA is a `.taco-btn`.
   Three of those choices fight the shell, and the reseller saw all three:

   1. `min-height: 100vh` + `display: flex` + `align-items: center` on #wrap.
      Standalone that centres the card in the window. Inside the shell the
      column already starts below our header and the injected trail, so the
      viewport-height box is centred against nothing and opened a ~120px band
      of the page's own `--wash` (#f6f9f9) above the card — "un espacio blanco
      arriba que no encaja" (user, 2026-09-11). Its two blurred ::before /
      ::after blobs wash the same band.
   2. The `.taco-card`: white, 18px radius, a 48px shadow. No other page in
      this portal puts its content on a raised card — /new-quote's form sits
      flat on the column, /my/* are flat tables — so inside the shell the card
      read as a floating panel on the shell's grey. Both form pages are FLAT
      (the choice; the alternative was carding /new-quote too), on the shell's
      own radial wash, at the same narrow measure /new-quote's
      `.o_container_small` takes.
   3. The CTA, `a.taco-btn`, is handled in §4 — see the note there.

   Only 1 and 2 are scoped to `.tt-portal__main`: they are about the page
   inside the shell. Anonymous visitors — /new-support is a public form — get
   no shell, and there the author's standalone composition is correct as
   built. 3 and the token normalisation below apply in both states, because a
   CTA nobody can read and a hex outside the ramp are wrong either way.
   ------------------------------------------------------------------------ */

/* 1. The page's own top space and wash, inside the shell. `--section-y-tight`
   and `--shell-gutter` are what /new-quote's first section gets from §3/§3b,
   so the two form pages open at exactly the same place under the trail. */
.tt-portal__main #wrap.taco-wrapper {
  display: block;
  min-height: 0;
  padding: var(--section-y-tight) var(--shell-gutter, var(--space-6));
  background: transparent;
  isolation: auto;
}
.tt-portal__main #wrap.taco-wrapper::before,
.tt-portal__main #wrap.taco-wrapper::after { content: none; }

/* 2. Flat, and on the measure — not a card. */
.tt-portal__main #wrap.taco-wrapper > .taco-card {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* 3. What `.taco-btn` still carries of its own after §4 adopted it: a teal drop
   glow no Button.astro variant has, a hover lift the design system does not use,
   and `width: 100%` (which §5 already undoes for the submit slot, but not for
   the "Back to Home" ghost in the success message). */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.taco-btn, .taco-btn--ghost) {
  width: auto;
  box-shadow: none;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.taco-btn, .taco-btn--ghost):hover { transform: none; }

/* The page's local palette, onto the ramp: `#edf7f6`/`#d8ecea` for the eyebrow
   pill, `#5c6876` for body copy and `#e6e8ee` for the section rules are all
   near-misses of tokens we have. Teal-700 on teal-50 is 5.72:1, ink-500 on
   white 5.01:1 — both AA. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .taco-badge {
  background-color: var(--color-surface-accent);
  border-color: var(--color-border-accent);
  border-radius: var(--radius-pill);
  color: var(--color-accent-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .taco-text { color: var(--color-text-muted); font-size: var(--text-base); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .taco-section-head {
  border-block-end-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

/* ---------------------------------------------------------------------------
   11c. /your-ticket-has-been-submitted — the success icon

   Captured signed-in at scratch/portal-capture/your-ticket-has-been-submitted.html:
   `<i class="fa fa-paper-plane fa-2x mb-3 rounded-circle text-bg-success">` sits
   above "Thank you!" — a Bootstrap-green circle, off both palettes. Classic content
   carries one accent, so the badge takes --color-accent-fill / --color-accent-on,
   the same pair Button.astro's primary uses. Geometry is untouched: Bootstrap's own
   `.rounded-circle.fa-2x` already sizes the box to 5rem and centres the glyph, and
   nothing here needs to redeclare it.
   The three buttons below it ("Go Back", "Go to Homepage", "Go to Channel Connect")
   are `.btn-outline-secondary`, `.btn-primary` and `.btn-secondary` — already read
   as secondary/primary/secondary from §4, no separate rule needed.
   [!] beats Bootstrap's `.text-bg-success`, which sets both `background-color` and
   `color` `!important`. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .text-bg-success.rounded-circle {
  background-color: var(--color-accent-fill) !important;
  color: var(--color-accent-on) !important;
}

/* ---------------------------------------------------------------------------
   12. Icons

   [!] Odoo's own Font Awesome 4 wins the `font-family` on `.fa` (it declares it
   `!important`), while the FA7 build the router injects wins the CODEPOINT, because
   it loads later and sets `--fa`. The two disagree for any glyph FA renumbered
   between v4 and v7 — `.fa-pencil` asked the v4 font for FA7's U+F303 and drew a tofu
   box next to "Edit information" on /my. Pinning the family to the injected build is
   the smaller fix, and a strictly safe one: a v4 name FA7 does not define already
   renders nothing today, since FA7's `content: var(--fa)` rule wins there too.
   Odoo's own `.oi` icon font is a different class and is left alone.
   ------------------------------------------------------------------------ */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.fa, .fas, .fa-solid) {
  font-family: "Font Awesome 7 Free" !important;
  font-weight: 900 !important;
}
/* `.fa-google` rides along because of the same v4/v7 split: FA7 moved every brand glyph
   into the Brands face and renamed the class, Odoo's template still writes the v4
   `fa fa-google` with no brand marker, and the pin above therefore asked Free Solid for
   U+F1A0 and drew a tofu box beside "Team Taco Login" on /web/login. It has to be HERE
   rather than in §14: the pin's `:is()` scope resolves to #wrap's 1,0,0, so no selector
   written under the login container alone can outrank it — only a rule of equal
   specificity, later in the file. The one brand glyph the portal uses; if a second
   appears, it joins this list. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(.fa-brands, .fa-google) { font-family: "Font Awesome 7 Brands" !important; font-weight: 400 !important; }

/* ---------------------------------------------------------------------------
   13. Narrow viewports

   The 390px review: nothing may overflow, the toolbar wraps as rows rather than
   squeezing, and /my's details column stacks under the cards instead of beside them
   (Odoo swaps it for an offcanvas below `lg`, which is its own behaviour, not ours).
   ------------------------------------------------------------------------ */

@media (max-width: 47.99rem) {
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) :is(h1, h2) { font-size: var(--text-3xl); }
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) h3 { font-size: var(--text-2xl); }

  /* One card per row. The grid in §6 is unconditional, and Odoo's `.col-md-6` — which
     it replaces — only paired the cards from 768px up. */
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_docs { grid-template-columns: 1fr; }

  /* The filter chips take the full row each, so a long label ("Helpdesk Team") does
     not shrink its neighbours to an unreadable width. */
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_navbar .btn-group { width: 100%; }
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_navbar .btn-group > .btn { width: 100%; justify-content: space-between; }
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_portal_search_panel { width: 100%; max-width: 100%; }

  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .alert { padding: var(--space-4) var(--space-5); }
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) .modal-body, :is(#wrap, main > .o_portal, main > .oe_website_login_container) .offcanvas-body { padding: var(--space-5); }
}

/* ---------------------------------------------------------------------------
   14. Login / password screens (`main > .oe_website_login_container`)

   The third root (rule 1 at the top of this file). Odoo renders /web/login,
   /web/reset_password, /web/login/totp and the signup screens from one template —
   `web.login_layout` — whose body is NEITHER `#wrap` NOR `main > .o_portal`:

     #wrapwrap > :is(#wrap, main > .o_portal, main > .oe_website_login_container) > form.oe_login_form

   so until the scope grew a third root, this sheet reached none of it and Odoo's own
   theme showed through on the one page every reseller sees first: a `.btn-primary` at
   rgb(0,169,163) with a 50px pill radius, 38px/15px-radius inputs, `.btn-link`
   rendered as a 2px outlined pill, and a 300px form floating in the column with no
   title, no card, 123px of air above it and the footer directly underneath.

   Two things are needed beyond the scope change. First, a CARD and a vertical rhythm:
   the sheet's own §4/§5 fix the controls as soon as they are in scope, but a bare form
   in the middle of a column is not a screen. Second, the screen has NO COPY at all —
   Odoo's template has no heading slot — so the router injects a fragment of our own
   (`/portal-chrome/login-intro`, built from `components/portal/LoginIntro.astro` and
   `LoginFoot.astro`, classes `tt-login__*`). Its CSS lives here rather than in a scoped
   Astro `<style>` because on the real page the document that loads it is Odoo's, not
   Astro's.

   LAYOUT CONTRACT — what the router produces, and the only shape these rules assume:

     main > .oe_website_login_container
       ├ .tt-login__intro                            injected before the form
       ├ owl-component[name="web.user_switch"]       Odoo's, empty on a first visit
       ├ form.oe_login_form                          Odoo's
       └ .tt-login__foot                             injected after the form

   One column, centred, every width: intro, card, foot line. A two-column variant with
   the intro on an ink panel beside the card was built and shown as `?v=b` on
   /dev/login-preview, and the user chose the stacked one (D184) — there is no copy to
   fill a panel with, and a half-empty dark column beside a 420px card is a worse screen
   than this one, not a richer one. Nothing here is written against a modifier class any
   more, and the container is a flex column with no `:has()` branch.

   SPECIFICITY, which cost a round here. Everything below the container is written with
   the sheet's own `:is()` prefix even though the container alone would select it, and
   that is not decoration: the prefix resolves to #wrap's 1,0,0, so §4's `.btn` rule is
   a 1,1,0 and `main > .oe_website_login_container .form-label .btn-link` — a 0,4,1 —
   LOSES to it. Measured, not reasoned: the first pass shipped "Reset Password" with
   §4's button border and semibold weight still on it. A §14 rule that has to beat §4 or
   §5 must carry the prefix. (So must the one icon fix this screen needs — it cannot
   outrank §12's `!important` family pin from here at all, and lives in §12 instead.)

   The exception is the CONTAINER'S OWN rules, which are addressed directly as
   `main > .oe_website_login_container` (0,1,1): through the `:is()` list they would
   also select `#wrap`, i.e. the body of every other page in the portal. Odoo styles
   that class — and `.oe_login_form`, where the 300px comes from — at 0,1,0 with no id
   in the selector, so 0,1,1 is enough to win there.
   ------------------------------------------------------------------------ */

/* The band. A muted ground so the white card below reads as a card, and the page's
   own vertical rhythm: the brief asked for 4rem/5rem, and the scale this sheet copied
   from tokens.css stops at --space-12, so the section step is used instead — the same
   value §3 gives every other page's first block, plus one space-6 at the bottom so the
   card is not optically stuck to the footer. */
main > .oe_website_login_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--section-y-tight) calc(var(--section-y-tight) + var(--space-6));
  padding-inline: var(--gutter);
  background-color: var(--color-surface);
}

/* Odoo's OWL mount point for the user switcher. It is EMPTY on a first visit (it only
   renders when the browser has stored sessions), and an empty inline element is still
   a flex/grid item: it was taking a gap of its own between the intro and the card.
   `:empty` and not a blanket `display: none` — when it does render the stored-session
   list, that list is part of the screen. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) > owl-component:empty { display: none; }

/* ---- the card ---------------------------------------------------------- */

/* §10's panel values (border, raised surface) one radius step up, because this is the
   only thing on the screen.

   `margin-block: 0` is not tidiness. Odoo's frontend bundle carries

     .oe_login_form, .oe_signup_form, .oe_reset_password_form
       { max-width: 300px; position: relative; margin: 50px auto; }

   (verbatim from `web.assets_frontend.min.css` on beta, 2026-10-01) and the first pass
   of this rule only overrode the INLINE half with `margin-inline: auto` — so the 50px
   block margins survived, on top of the container's own `gap`. Measured in headless
   Chromium on the real beta page at 1440 and at 390: 74px between the lead and the card
   (50 + 24) where the /dev preview, which had no stand-in for that rule, showed 24.
   Both edges, so the band was 100px taller than designed. The container's `gap` is the
   only thing that may space these children. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) form.oe_login_form {
  width: 100%;
  max-width: 420px;
  margin-block: 0;
  margin-inline: auto;
  padding: var(--space-8);
  border: var(--space-px) solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-raised);
  box-shadow: var(--shadow-sm);
}

/* Odoo's field wrappers. The value matches `.mb-3` exactly, so on the real page
   Bootstrap's `!important` utility wins with the same 1rem and nothing moves; this is
   here so the screen also holds together without Bootstrap (the /dev preview) and if
   Odoo ever reworks the template's utilities. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form :is(.mb-3, .field-login) { margin-block-end: var(--space-4); }
/* The form's direct `<p>` children, of which `web.login` has three: the empty
   `.mt-2.text-center` it always renders, and the `error` / `message` alerts it renders
   `t-if`. Zeroing the margin is load-bearing for all three — the empty one would
   otherwise add a stray step above the foot line, and an alert's own Bootstrap
   `margin-bottom: 1rem` would stack on top of `.oe_login_buttons`'s `--space-6` and
   leave the error further from the button than from the field it is about. The alert's
   look itself is §9's, unchanged: it is the same `.alert-danger` as everywhere else in
   the portal and must not become a second one. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form > p { margin-block: 0; }

/* The label row carries the field name on the left and a link on the right — "Reset
   Password" beside Password, Odoo 18's "Choose a user" beside Email. Same reasoning as
   above for restating `.d-flex`/`.justify-content-between`. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form .form-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-block-end: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

/* Those two links are TERTIARY: §4 already strips `.btn-link` back to a link, and this
   adds what the login screen needs on top — no border at all (§4 leaves the `.btn`
   hairline in place at `transparent`, which is invisible but still 1px of box), the
   label's own size, and the normal weight so they do not compete with the field name.
   `.btn-sm`, which Odoo puts on Reset Password, reaches nothing: Bootstrap 5 sizes
   buttons through `--bs-btn-*` custom properties that only its own `.btn` rule reads,
   and §4 replaced those declarations outright. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form .form-label :is(.btn-link, .o_user_switch_btn) {
  border: 0;
  min-height: 0;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  letter-spacing: var(--tracking-base);
  color: var(--color-link);
  text-decoration: none;
  white-space: nowrap;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form .form-label :is(.btn-link, .o_user_switch_btn):hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* §5 owns the input's shape — hairline, radius, padding, focus ring. The one thing it
   does not set is a height, because in a dense table toolbar it should not have one.
   On the login card the two fields sit directly above a 44px button, so they take the
   same 44px. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_form .form-control { min-height: 44px; }

/* ---- the actions ------------------------------------------------------- */

/* [!] beats `.pt-3`, `.mb-1` and `.gap-1` — Bootstrap spacing utilities, `!important`
   by design. The grid itself is Odoo's `.d-grid` and is restated for the same reason
   as `.d-flex` above. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_buttons {
  display: grid;
  gap: var(--space-3) !important;
  padding-block-start: var(--space-6) !important;
  margin-block-end: 0 !important;
}

/* `.btn-primary` is §4's accent fill as soon as it is in scope — nothing to add but
   the full width the `.d-grid` column already gives it. */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_login_auth { display: grid; gap: var(--space-3); }

/* "- or -": a hairline with the words sitting over it, not an italic line of text.
   [!] `display` beats `.d-block` and `color` beats `.text-muted`, both Bootstrap
   utilities and so `!important` by design. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_login_auth em {
  display: flex !important;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-1) !important; /* [!] beats `.my-1` */
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--color-text-muted) !important;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_login_auth em::before,
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_login_auth em::after {
  content: "";
  flex: 1 1 0;
  height: var(--space-px);
  background-color: var(--color-border);
}

/* The OAuth providers. Odoo renders them as a Bootstrap list group — a stack of
   full-width rows with a shared border — which on a card reads as a table of one row.
   They are buttons, so they take §4's secondary outline: same geometry, same hairline,
   same hover wash, centred icon + label. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_auth_oauth_providers { display: grid; gap: var(--space-2); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_auth_oauth_providers .list-group-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding-inline: var(--space-5);
  border: var(--space-px) solid var(--color-accent);
  border-radius: var(--radius-md);
  background-color: transparent;
  color: var(--color-accent-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  text-decoration: none;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .o_auth_oauth_providers .list-group-item:hover {
  background-color: var(--color-accent-subtle);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

/* The Google glyph is a BRAND glyph and Odoo writes it as FA4's `fa fa-google`, with no
   brand marker — so §12's family pin asked Free Solid for a codepoint only the Brands
   face ships and drew a tofu box. Fixed in §12, beside the pin it has to outrank; see
   the note there for why it cannot live in this section. */

/* "Log in as superuser", which Odoo appends under the primary in a debug session. The
   quietest thing on the screen: it is a developer affordance, not an action a reseller
   has. (Not in the anonymous capture — reconstructed from Odoo's `web.login` template;
   the preview renders it behind `?su=1`.) */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_buttons .btn-link {
  border: 0;
  min-height: 0;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .oe_login_buttons .btn-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ---- the fragment: intro and foot --------------------------------------- */

:is(#wrap, main > .o_portal, main > .oe_website_login_container) .tt-login__intro {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  text-align: left;
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .tt-login__kicker {
  margin-block: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-text);
}
/* §2 already gives the h1 --text-4xl and the display tracking. */
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .tt-login__title { margin-block: 0 var(--space-3); }
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .tt-login__lead {
  margin-block: 0;
  max-width: 34ch;
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
:is(#wrap, main > .o_portal, main > .oe_website_login_container) .tt-login__foot {
  width: 100%;
  max-width: 420px;
  margin-block: 0;
  margin-inline: auto;
  font-size: var(--text-sm);
  text-align: center;
  color: var(--color-text-muted);
}

/* ---- narrow ------------------------------------------------------------ */

@media (max-width: 30rem) {
  :is(#wrap, main > .o_portal, main > .oe_website_login_container) form.oe_login_form { padding: var(--space-6); }
}
