/* ==========================================================================
   Variant 4 — the Odoo look. Linked LAST in Components/App.razor: the lists, the
   forms (the invoice editor first) and the buttons drawn as Odoo's web client
   draws its list view, its form view and its buttons, on the gateway's own
   markup — the DevExpress behaviour of the grid (grouping, the filter row, the
   header filters, the column chooser, the pinned action column) stays as it is,
   only its surface changes. The shell (rail, top bar, menus) is not touched.

   Measured from Odoo's own stylesheets — addons/web/static/src: scss/
   primary_variables.scss, scss/bootstrap_overridden.scss, views/list/
   list_renderer.scss, views/form/form_controller.scss, views/fields/fields.scss,
   views/fields/statusbar/statusbar_field.scss, core/notebook/notebook.scss,
   search/control_panel/control_panel.scss — in 18.0 (on this Mac), 19.0 and
   20.0 (github.com/odoo/odoo). Where the versions differ the newest is taken:
     19.0  body text gray-900 (#212529) instead of gray-700, headings black,
           the active state of a button a 10 % tint with the brand's border
     20.0  the form sheet's corners 6 px (border-radius-lg) and 24 px of
           padding on a wide window, the statusbar's steps inside one
           bordered rounded box, a group row 40 px tall, the list's head on a
           faint gradient of the grey, popovers and modals at 6 px, no
           gradient on any button, a 4 px focus ring
   Constant through 18 → 20: the system font stack, 14 px / 1.5 text,
   "bold" = 500, buttons 5 px 10 px with 4 px corners (small 3 px 8 px, 13 px),
   secondary buttons filled gray-300 with no visible border, a field as a value
   on a 1 px line that shows only under the pointer (#ccc) and turns the brand
   colour with the focus, labels 14 px / 500 in a fit-content(150px) column,
   list cells .5rem .3rem with 16 px at the row's ends, 1 px gray-300 rules.

   Colour: Odoo's own primary is #71639e (community) / #714B67 (enterprise);
   here the brand colour stays Onix's (--brand) in that place — --o-primary
   below is the one token to change for Odoo's purple. Every other colour is
   Odoo's grey scale, light; the dark theme maps the scale onto the gateway's
   dark tokens.

   Sections: 0 tokens · 1 type · 2 buttons · 3 fields · 4 the list (DataGrid) ·
   5 the form sheet and the invoice editor · 6 the record bar (Odoo's control
   panel and statusbar) · 7 popovers, chips, odds and ends · 8 dark theme.
   ========================================================================== */

/* ─── 0. Tokens ──────────────────────────────────────────────────────────── */

:root {
    /* Bootstrap's grey scale, as Odoo ships it. */
    --o-white: #FFFFFF;
    --o-black: #000000;
    --o-gray-100: #f8f9fa;
    --o-gray-200: #e9ecef;
    --o-gray-300: #dee2e6;
    --o-gray-400: #ced4da;
    --o-gray-500: #adb5bd;
    --o-gray-600: #6c757d;
    --o-gray-700: #495057;
    --o-gray-800: #343a40;
    --o-gray-900: #212529;

    --o-text: var(--o-gray-900);            /* $o-main-text-color (19.0+) */
    --o-heading: var(--o-black);            /* $o-main-headings-color (19.0+) */
    --o-muted: var(--o-gray-600);           /* $text-muted */
    --o-text-info: #0180a5;                 /* $o-theme-text-colors "info": .text-info, decoration-info */
    --o-border: var(--o-gray-300);          /* $border-color */
    --o-view-bg: var(--o-white);            /* $o-view-background-color */
    --o-webclient-bg: var(--o-gray-100);    /* $o-webclient-background-color */
    --o-input-border: #ccc;                 /* $o-form-lightsecondary */
    --o-placeholder: #bec5cc;               /* mix($gray-400, $gray-500) */
    --o-danger: #dc3545;
    --o-danger-text: #d23f3a;
    --o-success-text: #008818;
    --o-warning-text: #9a6b01;

    /* The brand in Odoo's places: buttons, links, the focus, the checked box, the active state. */
    --o-primary: var(--brand);
    --o-primary-hover: var(--brand-strong);
    --o-primary-ink: #FFFFFF;
    --o-link: var(--brand);
    --o-active-bg: color-mix(in srgb, var(--o-primary) 20%, var(--o-gray-100));   /* $o-component-active-bg */
    --o-active-border: var(--o-primary);
    --o-primary-active-bg: color-mix(in srgb, var(--o-primary) 10%, var(--o-white)); /* primary, pressed (19.0+) */
    --o-focus-ring: 0 0 0 .125rem var(--o-primary), 0 0 0 .25rem color-mix(in srgb, var(--o-primary) 50%, transparent);

    --o-radius-sm: 3px;
    --o-radius: 4px;
    --o-radius-lg: 6px;
    --o-radius-xl: 12px;
    --o-shadow-pop: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --o-hover-bg: color-mix(in srgb, var(--o-black) 5.5%, transparent);          /* $table-hover-bg-factor */
    --o-focus-row-bg: color-mix(in srgb, var(--o-black) 11%, transparent);

    /* The gateway's own tokens, re-valued to the scale (light; the dark theme keeps its own below). */
    --ink: var(--o-text);
    --ink-soft: var(--o-gray-700);
    --muted: var(--o-gray-600);
    --muted-2: var(--o-gray-500);
    --line: var(--o-border);
    --line-strong: var(--o-gray-400);
    --hairline: var(--o-border);
    --panel: var(--o-view-bg);
    --panel-2: var(--o-gray-100);
    --panel-hover: var(--o-gray-200);
    --bg: var(--o-webclient-bg);
    --bg-soft: var(--o-gray-100);
    --ring: color-mix(in srgb, var(--o-primary) 25%, transparent);
    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-md: none;

    /* The grid's surfaces. */
    --dxg-surface: var(--o-view-bg);
    --dxg-head: var(--o-gray-100);
    --dxg-hover: color-mix(in srgb, var(--o-black) 5.5%, var(--o-view-bg));
    --dxg-selected: var(--o-active-bg);
    --dxg-focused: color-mix(in srgb, var(--o-black) 11%, var(--o-view-bg));
    --dxg-group: var(--o-gray-100);
    --dxg-radius: 0;

    /* The forms' type and fields (css/onix-type-forms.css reads these). */
    --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --form-label-size: 14px;
    --form-label-weight: 500;
    --form-label-color: var(--o-text);
    --form-value-size: 14px;
    --form-note-size: 12px;
    --form-section-size: 12px;
    --form-row-gap: 10px;
    --field-h: 28px;
    --field-pad-x: 4px;
    --field-radius: 0;
    --field-bg: transparent;
    --field-bg-hover: transparent;
    --field-bg-focus: transparent;
    --field-border: transparent;
    --field-border-hover: transparent;
    --field-underline: transparent;                 /* at rest the line is not drawn (form_controller.scss) */
    --field-underline-hover: var(--o-input-border);
    --field-focus-border: transparent;
    --field-focus-shadow: inset 0 -1px 0 var(--o-primary);
}

/* The page behind the views: one flat grey, no blobs (Odoo's web client). */
body::before { background: var(--bg); }

/* ─── 1. Type ────────────────────────────────────────────────────────────── */

html, body { color: var(--o-text); font-size: 14px; line-height: 1.5; font-feature-settings: normal; }
h1, h2, h3, h4, h5 { color: var(--o-heading); font-weight: 500; letter-spacing: 0; }
h1 { font-size: 28px; }      /* $h1-font-size: 14px × 2 */
h2 { font-size: 21px; }      /* × 1.5 */
h3 { font-size: 18px; }      /* × 1.3 */
a { color: var(--o-link); }
a:hover { color: var(--o-primary-hover); }
.muted { color: var(--o-muted); }

/* ─── 2. Buttons ─────────────────────────────────────────────────────────── */

/* Odoo's .btn: 5 px 10 px, 14 px / 1.5, weight 500, 4 px corners, no shadow, no gradient (20.0). The gateway's
   plain .button is Odoo's btn-secondary — filled gray-300, the border the same colour, black on hover; .primary
   its btn-primary; .small its btn-sm (3 px 8 px, 13 px, 3 px corners); .ghost / .icon its btn-light. */
.button,
.page-trail-tools .button.small,
.dxg-sticky .dxg-toolbar-main .button {
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-gray-300);
    color: var(--o-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    box-shadow: none;
    transform: none;
}
.button:hover:not(:disabled) { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); box-shadow: none; }
.button:active:not(:disabled) { transform: none; background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); box-shadow: none; }
.button:focus-visible { outline: none; box-shadow: var(--o-focus-ring); }
.button:disabled { opacity: .5; box-shadow: none; }

.button.primary,
.button.primary:hover:not(:disabled),
:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .button.primary:hover:not(:disabled) {
    background: var(--o-primary);
    border-color: var(--o-primary);
    color: var(--o-primary-ink);
    box-shadow: none;
}
.button.primary:hover:not(:disabled),
:root[data-theme="dark"] .button.primary:hover:not(:disabled) { background: var(--o-primary-hover); border-color: var(--o-primary-hover); }
.button.primary:active:not(:disabled),
:root[data-theme="dark"] .button.primary:active:not(:disabled) { background: var(--o-primary-active-bg); border-color: var(--o-primary); color: var(--o-primary-hover); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .button.primary,
    :root:not([data-theme="light"]) .button.primary:hover:not(:disabled) { background: var(--o-primary); border-color: var(--o-primary); color: var(--o-primary-ink); box-shadow: none; }
    :root:not([data-theme="light"]) .button.primary:hover:not(:disabled) { background: var(--o-primary-hover); border-color: var(--o-primary-hover); }
    :root:not([data-theme="light"]) .button:hover:not(:disabled) { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); }
}

.button.small,
.page-trail-tools .button.small,
.dxg-sticky .dxg-toolbar-main .button { padding: 3px 8px; font-size: 13px; border-radius: var(--o-radius-sm); }
.button.small.icon,
.row-actions .button.small.icon { padding: 3px 6px; }
/* The main button of a row of controls (New, Validate, Save) is the primary one wherever the row is; the icon
   buttons of the record bar and of a list's control row are btn-light, as Odoo's cog and switches are. */
.dxg-sticky .dxg-toolbar-main .button.primary,
.page-trail-tools .button.small.primary,
.editor-decision .button.small.primary,
.form-actions .button.primary { background: var(--o-primary); border-color: var(--o-primary); color: var(--o-primary-ink); }
.dxg-sticky .dxg-toolbar-main .button.primary:hover:not(:disabled),
.page-trail-tools .button.small.primary:hover:not(:disabled),
.editor-decision .button.small.primary:hover:not(:disabled),
.form-actions .button.primary:hover:not(:disabled) { background: var(--o-primary-hover); border-color: var(--o-primary-hover); color: var(--o-primary-ink); }
.page-trail-tools .button.small.icon:not(.primary, .danger),
.dxg-sticky .dxg-toolbar-main .button.icon:not(.primary, .danger),
.editor-nav__buttons > .button.small.icon { background: transparent; border-color: transparent; color: var(--o-text); }
.page-trail-tools .button.small.icon:not(.primary, .danger):hover:not(:disabled),
.dxg-sticky .dxg-toolbar-main .button.icon:not(.primary, .danger):hover:not(:disabled),
.editor-nav__buttons > .button.small.icon:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-200); color: var(--o-heading); }
.page-trail-tools .button.small.icon[aria-pressed="true"] { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }

/* btn-danger and btn-outline-secondary (a destructive choice shows red only once it is armed, as Odoo's dialogs do). */
.button.danger,
.button.danger:hover:not(:disabled) { background: var(--o-danger); border-color: var(--o-danger); color: #FFFFFF; }
.button.danger:hover:not(:disabled) { background: #bb2d3b; border-color: #b02a37; }
.button.danger-outline { background: transparent; border-color: var(--o-gray-300); color: var(--o-text); }
.button.danger-outline:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-300); color: var(--o-heading); }
.button.danger-outline.is-armed { color: var(--o-danger-text); border-color: var(--o-danger-text); }
/* btn-light: white, the border the same, grey under the pointer. */
.button.ghost, .button.icon:not(.primary):not(.danger) {
    background: transparent;
    border-color: transparent;
    color: var(--o-text);
}
.button.ghost:hover:not(:disabled), .button.icon:not(.primary):not(.danger):hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-200); color: var(--o-heading); }
/* btn-link. */
.link-button { color: var(--o-link); font-weight: 500; }
.link-button:hover { color: var(--o-primary-hover); }

/* Odoo's checked box: 1 em square, 1 px gray-500 edge, .25 em corners, the brand when checked. */
input[type=checkbox], input[type=radio] { width: 14px; height: 14px; accent-color: var(--o-primary); }

/* The view switcher: a btn-group of btn-secondary, the active one in the active tint behind the brand's border. */
.view-switcher { gap: 2px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.view-switcher-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-gray-300);
    color: var(--o-text);
}
.view-switcher-btn + .view-switcher-btn { border-left: 1px solid var(--o-gray-300); }
.view-switcher-btn:hover { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); }
.view-switcher-btn.active, .view-switcher-btn.active:hover { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }

/* A segmented control that is not the editor's tabs (the Home's period, a view's sub-pages): Odoo's btn-group of
   btn-secondary — the buttons joined (no gap, the inner corners square, the borders overlapping), each the size of
   every other button of its row, the active one in the active tint behind the brand's border. In a row of small
   buttons (a list's control row, the record bar, the document pane's tools) it is btn-sm with them. */
.onix-segmented {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.onix-segmented button,
.docpane-bar .onix-segmented button,
.pd-wizard__lang .onix-segmented button {
    position: relative;
    padding: 5px 10px;
    border: 1px solid var(--o-gray-300);
    border-radius: 0;
    background: var(--o-gray-300);
    color: var(--o-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.onix-segmented > button + button { margin-left: -1px; }
.onix-segmented > button:first-child { border-top-left-radius: var(--o-radius); border-bottom-left-radius: var(--o-radius); }
.onix-segmented > button:last-child { border-top-right-radius: var(--o-radius); border-bottom-right-radius: var(--o-radius); }
.onix-segmented button:hover { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); }
.onix-segmented button.is-active,
.docpane-bar .onix-segmented button.is-active { z-index: 1; background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); font-weight: 500; }
.onix-segmented button:focus-visible { z-index: 2; outline: none; box-shadow: var(--o-focus-ring); }
.dxg-sticky .onix-segmented button,
.page-trail-tools .onix-segmented button,
.docpane-bar .onix-segmented button { padding: 3px 8px; font-size: 13px; }
:is(.dxg-sticky, .page-trail-tools, .docpane-bar) .onix-segmented > button:first-child { border-top-left-radius: var(--o-radius-sm); border-bottom-left-radius: var(--o-radius-sm); }
:is(.dxg-sticky, .page-trail-tools, .docpane-bar) .onix-segmented > button:last-child { border-top-right-radius: var(--o-radius-sm); border-bottom-right-radius: var(--o-radius-sm); }
.docpane-bar .onix-segmented { padding: 0; border-radius: 0; }

/* The pill buttons (the Home's period, layout, TV mode and Edit dashboard; the guides' steps; the bank account
   picker) are btn-secondary like every other button: the same box and size, the icon in the text's colour. The
   period the figures cover is only a label in that box: no pointer, no change under it. */
.onix-pillbtn {
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-gray-300);
    color: var(--o-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.onix-pillbtn svg { width: 14px; height: 14px; color: currentColor; }
:is(a, button, select, label).onix-pillbtn { cursor: pointer; }
:is(a, button, select, label).onix-pillbtn:hover:not(:disabled) { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); text-decoration: none; }
.onix-pillbtn:focus-visible, .onix-pillbtn:focus-within { outline: none; box-shadow: var(--o-focus-ring); }
.onix-pillbtn:disabled { opacity: .5; cursor: default; }
.home-period, .home-period:hover { cursor: default; }
.home-layout { gap: 6px; padding-right: 8px; }
.home-layout-label { color: var(--o-muted); font-weight: 400; }
.home-layout select { color: var(--o-text); font-size: 14px; font-weight: 500; line-height: 1.5; }
.home-layout select:focus-visible { outline: none; }
.home-head-actions { gap: 8px; }
@media (max-width: 767.98px) { .home-head-actions .onix-segmented button { padding: 5px 4px; } }
/* The Home's edit mode: a block's tools are btn-light icons, its handle a btn-sm label; the drop hint of a list on
   the same 4 px corners. */
.home-block-btn {
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: var(--o-radius);
    background: transparent;
    color: var(--o-text);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.home-block-btn:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-200); color: var(--o-heading); }
.home-block-btn:disabled { opacity: .4; }
.home-block-handle {
    padding: 3px 8px 3px 6px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius-sm);
    background: var(--o-gray-300);
    color: var(--o-text);
    font-size: 13px;
    font-weight: 500;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.home-block-handle svg { color: var(--o-gray-600); }
.dxg-hint { border-radius: var(--o-radius); }

/* ─── 3. Fields ──────────────────────────────────────────────────────────── */

/* Every form field of the gateway (app.css draws .form / .form-card inputs; css/onix-type-forms.css the forms' through
   its tokens, set above): Odoo's o_input — padding 2 px 4 px, 14 px / 1.5, transparent, a 1 px line under it that is
   drawn under the pointer (#ccc) and in the brand colour with the focus, nothing else. */
.form input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=button], [type=submit]), .form select, .form textarea,
.form-card input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=button], [type=submit]), .form-card select, .form-card textarea {
    min-height: var(--field-h);
    padding: 2px var(--field-pad-x);
    border: 1px solid transparent;
    border-bottom-color: transparent;
    border-radius: 0;
    background: transparent;
    color: var(--o-text);
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
}
.form input:hover:not(:disabled, :focus), .form select:hover:not(:disabled, :focus), .form textarea:hover:not(:disabled, :focus),
.form-card input:hover:not(:disabled, :focus), .form-card select:hover:not(:disabled, :focus), .form-card textarea:hover:not(:disabled, :focus) {
    background: transparent;
    border-color: transparent;
    border-bottom-color: var(--o-input-border);
}
.form input:focus, .form select:focus, .form textarea:focus,
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
    outline: none;
    background: transparent;
    border-color: transparent;
    box-shadow: inset 0 -1px 0 var(--o-primary);
}
.form textarea, .form-card textarea { padding: 2px 4px; border-radius: 0; }
.form input::placeholder, .form-card input::placeholder, .form textarea::placeholder, .form-card textarea::placeholder,
:is(.form, .form-card, .form-column, .form-pairs, .bankmatch-pane) :is(input, select, textarea):not(.dxg *)::placeholder { color: var(--o-placeholder); }
.form input:disabled, .form-card input:disabled, .form select:disabled, .form-card select:disabled,
:is(.form, .form-card, .form-column, .form-pairs, .bankmatch-pane) :is(input, select, textarea):not(.dxg *):disabled { opacity: 1; color: var(--o-text); border-bottom-color: transparent; }
/* A field that must be filled keeps the brand's line under the pointer ($o-input-border-required). */
label.required input:hover:not(:disabled, :focus), label.required select:hover:not(:disabled, :focus) { border-bottom-color: var(--o-primary); }
label.required > span:first-child::after { content: ""; }

/* Captions: 14 px / 500 in the text colour, left of the field or over it; a note under a field: 12 px muted. */
.form label span, .form-card label span,
.form-pairs > :not(.form-pairs__full, .form-lock--pairs) > :first-child,
.form-pairs > .form-lock--pairs > :not(.form-pairs__full) > :first-child,
.form-column > :not(.form-pairs__full, .form-lock--pairs, .form-column__side) > :first-child,
.form-column > .form-lock--pairs > :not(.form-pairs__full, .form-column__side) > :first-child {
    color: var(--o-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}
.form-pairs > :not(.form-pairs__full, .form-lock--pairs) > :first-child,
.form-pairs > .form-lock--pairs > :not(.form-pairs__full) > :first-child { text-align: left; max-width: 150px; }
.form-column { grid-template-columns: fit-content(150px) minmax(0, 1fr) minmax(0, 12em); }
.form-pairs { gap: var(--form-row-gap) 16px; }
.form-column .form-column__text { color: var(--o-text); font-size: 14px; font-weight: 400; }
.field-hint, :is(.form-column, .form-pairs) small, :is(.form, .form-card) label small { color: var(--o-muted); font-size: 12px; }

/* A group's title (Odoo's separator): small capitals in gray-700 (20.0) on a hairline. */
.form-section__head { min-height: 28px; margin: 12px 0 6px; border-bottom: 1px solid var(--o-border); }
.form-section__toggle,
.form-card > h3:first-child,
.form-card .form-section-title,
.invoice-payment__head :is(h3, h4, strong, .onix-overline) {
    color: var(--o-gray-700);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.form-section__toggle:hover { color: var(--o-heading); }
.form-section__chevron { color: var(--o-gray-600); }
.form-section__summary { font-size: 13px; }

/* ─── 4. The list (DataGrid) ─────────────────────────────────────────────── */

/* The frame: Odoo's list view is a white sheet under its control panel — a 1 px gray-300 edge, square, flat. */
.dxg { font-size: 14px; }
.dxg-frame,
.dxg-compact > .dxg-frame { border: 1px solid var(--o-border); border-radius: 0; box-shadow: none; background: var(--o-view-bg); }

/* The control panel: white, 8 px 16 px, a gray-300 rule under it; the view's name in the breadcrumb's size. */
.dxg-toolbar,
.dxg-toolbar.dxg-sticky { gap: 6px 12px; padding: 8px 16px; background: var(--o-view-bg); border-bottom: 1px solid var(--o-border); }
.dxg-title { margin: 0 8px 0 0; font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--o-heading); }
.dxg-title + .dxg-toolbar-main:not(:empty) { padding-left: 0; border-left: 0; }
.dxg .dxg-sticky > .dxg-toolbar-main.toolbar { gap: 6px; }
.dxg-sticky .dxg-toolbar-main select,
.toolbar select,
.dxg-groupby-pick select,
.dxg-pagesize-pick,
.dxg-pagesize select,
.dxg-filter-cell select {
    height: 32px;
    padding: 3px 24px 3px 8px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background-color: var(--o-view-bg);
    color: var(--o-text);
    font-size: 13px;
    box-shadow: none;
}
.dxg-groupby-pick select { height: 32px; padding-left: 30px; }
.dxg-groupby-pick select:focus, .dxg-pagesize-pick:focus, .toolbar select:focus { border-color: var(--o-primary); box-shadow: var(--o-focus-ring); }
.dxg-sticky .dxg-toolbar-main label.inline, .dxg-caption { color: var(--o-muted); font-size: 13px; }

/* The search: Odoo's search view — a 4 px box with a gray-300 edge, its facets inside; wider than a pill. */
.dxg-search input,
.dxg-sticky .dxg-search input {
    width: 260px;
    height: 32px;
    padding-left: 30px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-view-bg);
    font-size: 14px;
}
.dxg-search input:hover, .dxg-sticky .dxg-search input:hover { border-color: var(--o-gray-400); }
.dxg-search input:focus, .dxg-sticky .dxg-search input:focus { width: 340px; border-color: var(--o-primary); box-shadow: var(--o-focus-ring); }
.dxg-searchbox, .dxg-searchbox.has-facets {
    min-height: 32px;
    max-width: min(640px, 46vw);
    padding: 2px 8px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-view-bg);
}
.dxg-searchbox:hover { border-color: var(--o-gray-400); }
.dxg-searchbox:focus-within { border-color: var(--o-primary); box-shadow: var(--o-focus-ring); }
.dxg-searchbox input { height: 24px; font-size: 14px; }
.grid-facet { height: 24px; border-radius: var(--o-radius); background: var(--o-gray-200); color: var(--o-text); font-size: 13px; font-weight: 500; }
.grid-facet--group { background: var(--o-gray-200); color: var(--o-text); }

/* The grid's tools (filter row, columns, fit, export, more): btn-light squares; one in use in the active tint. */
.dxg-tool { width: 32px; height: 32px; border-radius: var(--o-radius); color: var(--o-text); }
.dxg-tool:hover { background: var(--o-gray-200); color: var(--o-heading); }
.dxg-tool.active { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }
.dxg-tool:focus-visible { box-shadow: var(--o-focus-ring); }

/* Odoo's pager: "1-80 / 312" in the text colour, ‹ › as btn-light. */
.dxg-toppager { margin-left: 8px; padding-left: 0; border-left: 0; color: var(--o-text); font-size: 14px; }
.dxg-range { color: var(--o-text); font-weight: 400; }
.dxg-page { min-width: 32px; height: 32px; border-radius: var(--o-radius); color: var(--o-text); font-size: 14px; }
.dxg-page:hover:not(:disabled):not(.current) { background: var(--o-gray-200); color: var(--o-heading); }
.dxg-page.current { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); font-weight: 500; }
.dxg-toolbar-end { margin-left: 8px; padding-left: 0; border-left: 0; }
.dxg-pager { padding: 8px 16px; background: var(--o-view-bg); border-top: 1px solid var(--o-border); color: var(--o-text); font-size: 14px; }
.dxg-pager-selected { color: var(--o-text); font-weight: 500; }

/* The grouping in the row: Odoo's "Group By" facet — a grey block, the column's name, × after it. */
.dxg-groupby { border-radius: var(--o-radius); }
.dxg-chip,
.dxg-groupby .dxg-chip { border: 0; border-radius: var(--o-radius); background: var(--o-gray-200); color: var(--o-text); font-size: 13px; font-weight: 500; }
.dxg-chip + .dxg-chip::before { background: var(--o-gray-400); }
.dxg-chip-main { padding: 5px 4px 5px 10px; }
.dxg-chip-x { color: var(--o-muted); }
.dxg-grouppanel { min-height: 40px; padding: 4px 16px; font-size: 13px; }
.dxg-notices { padding: 6px 16px; }
.dxg-link { color: var(--o-link); font-size: 13px; font-weight: 500; }

/* The head: one row on the faint grey (gray-100 — 20.0 draws it as a gradient of the same), the names in the
   heading colour at 500, .5rem .3rem of padding with 16 px at the row's ends, one gray-300 rule under it and no
   rule between the columns; the sort glyph in the text colour. */
.dxg .dxg-table thead th,
.shell .dxg .dxg-table thead th {
    height: auto;
    padding: 8px 5px;
    background: var(--o-gray-100);
    color: var(--o-heading);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--o-border);
}
.dxg .dxg-table thead tr.dxg-head th + th { box-shadow: none; }
.dxg .dxg-table thead th.sortable:hover,
.shell .dxg .dxg-table thead th.sortable:hover { color: var(--o-heading); background: var(--o-gray-200); }
.dxg .dxg-table thead th.sorted-asc, .dxg .dxg-table thead th.sorted-desc,
.shell .dxg .dxg-table thead th.sorted-asc, .shell .dxg .dxg-table thead th.sorted-desc { color: var(--o-heading); }
.dxg .dxg-table thead tr.dxg-head > th:first-child, .dxg .dxg-table tbody tr > td:first-child, .dxg .dxg-table tfoot tr > td:first-child { padding-left: 16px; }
.dxg .dxg-table thead tr.dxg-head > th:last-child, .dxg .dxg-table tbody tr.dxg-row > td:last-child, .dxg .dxg-table tfoot tr > td:last-child { padding-right: 16px; }
.dxg-sort { color: var(--o-gray-600); }
.dxg-th-btn { border-radius: var(--o-radius-sm); color: var(--o-gray-600); }
.dxg-th-btn:hover, .dxg-th-btn.active { background: var(--o-gray-200); color: var(--o-heading); }
th.filtered > .dxg-th > .dxg-th-btn { color: var(--o-primary); }
.dxg-resizer:hover::after, .dxg-resizer.active::after { background: var(--o-border); }

/* The filter row (DevExpress's, under the head): the cells' inputs as Odoo's bordered inputs. */
.dxg .dxg-table thead tr.dxg-filter-row th { top: 37px; height: 34px; padding: 3px 4px; background: var(--o-view-bg); border-bottom: 1px solid var(--o-border); }
.dxg-filter-cell input, .dxg-filter-cell select { height: 26px; padding: 0 6px; border: 1px solid var(--o-gray-300); border-radius: var(--o-radius); font-size: 13px; }
.dxg-filter-cell input:hover, .dxg-filter-cell select:hover { border-color: var(--o-gray-400); }
.dxg-filter-cell input:focus, .dxg-filter-cell select:focus { border-color: var(--o-primary); box-shadow: var(--o-focus-ring); }
.dxg-op { border-radius: var(--o-radius-sm); color: var(--o-gray-600); }
.dxg-op:hover { background: var(--o-gray-200); color: var(--o-heading); }

/* The rows: .5rem .3rem, a gray-300 rule under every cell, the hover a 5.5 % shade, a chosen row in the active
   tint, the focused one an 11 % shade; the text 14 px in gray-900. */
.dxg .dxg-table tbody tr.dxg-row > td { padding: 8px 5px; border-bottom: 1px solid var(--o-border); color: var(--o-text); }
.dxg .dxg-table tbody tr:last-child > td { border-bottom: 1px solid var(--o-border); }
.dxg .dxg-table tbody tr.dxg-row.dxg-focused > td:first-child { box-shadow: none; }
.dxg .dxg-table tbody tr.dxg-row.row-muted > td { color: var(--o-muted); }
/* Odoo's decoration-info on a draft (#0180a5); a cancelled / void document is Odoo's decoration-muted taken one step
   further, to the grey of a disabled control (gray-500), so it reads as out of play at a glance. */
.dxg .dxg-table tbody tr.dxg-row.row-draft > td { color: var(--o-text-info); }
.dxg .dxg-table tbody tr.dxg-row.row-void > td,
.dxg .dxg-table tbody tr.dxg-row.row-void > td :is(a, .num, .amount) { color: var(--o-gray-500); }
.dxg .dxg-table.dxg-grouped tbody tr.dxg-row > td.dxg-first { padding-left: calc(16px + var(--dxg-level, 0) * 22px); }
@media (max-width: 760px) { .dxg .dxg-table tbody tr.dxg-row > td { padding: 8px 5px; } }

/* The checked box of a row and of the head: Odoo's form-check-input. */
.dxg-check, .dxg-bool {
    width: 16px; height: 16px;
    border: 1px solid var(--o-gray-500);
    border-radius: 4px;
    background: var(--o-view-bg);
}
.dxg-check:hover { border-color: var(--o-gray-500); }
.dxg-check:focus-visible { box-shadow: 0 0 0 .25rem var(--ring); }
.dxg-check[aria-checked="true"], .dxg-check[data-checked="true"],
.dxg-check[aria-checked="mixed"], .dxg-check[data-checked="mixed"], .dxg-bool.on { background: var(--o-primary); border-color: var(--o-primary); }
.dxg-check[aria-checked="true"]::after, .dxg-check[data-checked="true"]::after { width: 8px; height: 4px; border-color: #FFFFFF; }
.dxg-check[aria-checked="mixed"]::after, .dxg-check[data-checked="mixed"]::after { background: #FFFFFF; }
.dxg .dxg-table th.dxg-col-check, .dxg .dxg-table td.dxg-col-check { width: 40px; padding: 0 0 0 16px !important; }

/* A group's row: 40 px (20.0), the grey, the caret and the name in the heading colour at 500, the count in
   parentheses, the aggregates after them, every one of them in the text colour. */
.dxg .dxg-table tbody tr.dxg-group-row > td,
.shell .dxg .dxg-table tbody tr.dxg-group-row > td { background: var(--o-gray-100); border-bottom: 1px solid var(--o-border); }
.dxg-group { min-height: 40px; padding: 0 16px 0 calc(12px + var(--dxg-level, 0) * 22px); gap: 4px 16px; }
.dxg-group-toggle { gap: 4px; padding: 4px 2px; color: var(--o-heading); }
.dxg-chevron { color: var(--o-heading); }
.dxg-group-title,
.shell .dxg .dxg-table tbody tr.dxg-group-row .dxg-group-title { color: var(--o-heading); font-weight: 500; }
.dxg-group-value { color: var(--o-heading); font-weight: 500; }
.dxg-count { min-width: 0; padding: 0; border-radius: 0; background: transparent; color: var(--o-heading); font-size: 14px; font-weight: 500; }
.dxg-count::before { content: "("; }
.dxg-count::after { content: ")"; }
.dxg-group-sum { color: var(--o-muted); font-size: 13px; }
.dxg-group-sum b { color: var(--o-text); font-weight: 500; }
.dxg-group-note { font-size: 12px; }

/* The totals under the rows: Odoo's footer — the figures at 500 on white, a rule over them, no words. */
.dxg .dxg-table tfoot td { padding: 8px 5px; background: var(--o-view-bg); border-top: 1px solid var(--o-border); color: var(--o-text); font-weight: 500; }
.dxg-sum-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dxg-sum-value { font-weight: 500; }
.edg .dxg-table tfoot td.num { font-weight: 500; }

/* A detail row, the empty note. */
.dxg-detail { padding: 12px 16px 14px 56px; background: var(--o-gray-100); box-shadow: none; }
.dxg-alt-detail { background: var(--o-gray-100); box-shadow: none; }
.dxg-empty { padding: 32px 16px; color: var(--o-muted); }
.dxg-expander { border-radius: var(--o-radius-sm); color: var(--o-gray-600); }
.dxg-expander:hover { background: var(--o-gray-200); color: var(--o-heading); }
.dxg-expander.open { color: var(--o-heading); }

/* The action column of a row (Odoo's list has buttons as links): text buttons in the link colour, the main one at
   500 — not a row of filled buttons; the joined tools lose their frame. */
.row-actions .button.small,
.row-actions-tools .button.small,
.row-actions .row-menu-button {
    height: 26px;
    padding: 0 6px;
    border-color: transparent;
    border-radius: var(--o-radius-sm);
    background: transparent;
    color: var(--o-link);
    font-weight: 500;
    box-shadow: none;
}
.row-actions .button.small.primary { background: transparent; border-color: transparent; color: var(--o-link); }
.row-actions .button.small:hover:not(:disabled),
.row-actions-tools .button.small:hover:not(:disabled),
.row-actions .button.small.primary:hover:not(:disabled),
.row-actions .row-menu-button:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-200); color: var(--o-primary-hover); }
.row-actions-tools .button.small:focus-visible,
.row-actions-tools .button.small[aria-expanded="true"],
.row-menu-button[aria-expanded="true"] { z-index: 1; background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }
.row-actions-tools > * + * { margin-left: 2px; }
.row-actions-tools > :first-child, .row-actions-tools > :first-child > .button.small,
.row-actions-tools > :last-child, .row-actions-tools > :last-child > .button.small { border-radius: var(--o-radius-sm); }
.dxg .dxg-table td.dxg-command, .dxg .dxg-table th.dxg-command { box-shadow: inset 1px 0 0 var(--o-border); }
.dxg.invoice-list > .dxg-frame > .dxg-scroll > .dxg-table > tbody > tr.dxg-row > td.dxg-command { padding: 5px 16px 5px 8px; }

/* The filter panel under the rows (the active filter spelled out): Odoo's facets. */
.dxg-filterpanel { padding: 6px 16px; font-size: 13px; }
.dxg-cond { border-radius: var(--o-radius); background: var(--o-gray-200); color: var(--o-text); }
.dxg-cond-x:hover { background: var(--o-gray-300); }
.dxg-filterpanel-icon { color: var(--o-gray-600); }

/* A grid too narrow for every column: like Odoo's list it scrolls sideways (js/onix-gridcards.js gives the table its
   least width and marks the grid data-wide) — the rows are never cards on a desktop. The pinned action column keeps
   the right edge, as before. */
.dxg[data-wide] > .dxg-frame > .dxg-scroll.dxg-scroll-fit { overflow-x: auto; }

/* The line editor in a form (EditGrid): Odoo's one2many list — no frame of its own, the head on the grey, 1 px rules,
   the add links in the link colour under the rows, the tools of a row quiet. */
.edg .dxg-frame, .edg .dxg-frame { border: 0; border-radius: 0; background: transparent; }
.edg .dxg-table thead th { padding: 6px 5px; }
.edg .dxg-table tbody tr.edg-row > td { height: 36px; padding: 0 5px; border-bottom: 1px solid var(--o-border); }
.edg .dxg-table tbody tr.edg-row > td.wrap { padding-top: 6px; padding-bottom: 6px; }
.edg .dxg-table tbody tr.edg-row > td[colspan] { padding: 0 5px; }
.edg .dxg-table tbody tr.edg-section { --dxg-row: var(--o-gray-100); }
.edg .dxg-table tbody tr.edg-section > td { font-weight: 500; }
.edg .dxg-table tbody tr.edg-subsection > td { font-weight: 500; }
.edg .dxg-table tbody tr.edg-editing,
.edg .dxg-table tbody tr.edg-editing:hover { --dxg-row: var(--o-view-bg); }
.edg .dxg-table tbody tr.edg-editing > td:first-child { box-shadow: none; }
.edg .dxg-table tbody tr.edg-editing > td.edg-cell-edit { padding: 0 2px; }
.edg .dxg-table td input:not([type=checkbox]):not([type=radio]),
.edg .dxg-table td select,
.edg .dxg-table td textarea {
    height: 28px;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-bottom-color: var(--o-input-border);
    border-radius: 0;
    background: transparent;
    font-size: 14px;
}
.edg .dxg-table td input:not([type=checkbox]):not([type=radio]):focus,
.edg .dxg-table td select:focus,
.edg .dxg-table td textarea:focus { border-color: transparent; border-bottom-color: var(--o-primary); box-shadow: none; }
@media (hover: hover) {
    .edg .dxg-table tbody tr.edg-row.dxg-clickable > td[data-edg-editable]:hover { box-shadow: inset 0 -1px 0 var(--o-input-border); border-radius: 0; background-color: transparent; }
}
.edg .dxg-table th.edg-pinned, .edg .dxg-table td.edg-pinned { box-shadow: none; }
.edg .dxg-table thead th.edg-pinned { background: var(--o-gray-100); }
.edg .dxg-table tfoot td.edg-pinned { background: var(--o-view-bg); }
.edg-bar { padding: 6px 8px; background: transparent; border-top: 0; font-size: 13px; }
.edg-bar .edg-add-link, .edg-add-link { color: var(--o-link); font-size: 14px; font-weight: 400; }
.edg-icon { border-radius: var(--o-radius-sm); color: var(--o-gray-600); }
.edg-icon:hover:not(:disabled) { background: var(--o-gray-200); color: var(--o-heading); }
.edg .dxg-table tfoot td { height: auto; padding: 8px 5px; }

/* ─── 5. The form sheet and the invoice editor ───────────────────────────── */

/* Odoo's o_form_sheet: a white sheet with a 1 px gray-300 edge and 6 px corners (20.0), 16 px of padding — 24 px
   on a wide window —, no shadow, no brand bar at its left, as wide as 1534 px. */
.form-card {
    max-width: 1534px;
    padding: 16px;
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius-lg);
    background: var(--o-view-bg);
    box-shadow: none;
    animation: none;
}
.form-card::before { display: none; }
.form-card h3 { color: var(--o-heading); font-weight: 500; }
@media (min-width: 992px) { .form-card { padding: 24px; } }

/* The editor's sheet (Invoices.razor, in the split view) starts with its fields: the decision row over them —
   Validate · Cancel, Return to draft — is not drawn, the record bar's commands (Confirm and open next, ⋯) and its
   statusbar (a step is a button) do the same. The order of the fields, the folds, the tabs, the preview beside it
   are as they were. */
.onix-split-second > .form-card > .editor-decision { display: none; }

/* The sheet starts with its fields: the record bar already says what is open and in which state, so neither the
   form's own title nor the note on what a posted document still lets you change is drawn (both stay in the markup
   for what reads the page). */
.editor-head, .editor-locked { display: none; }

/* A record is a screen of its own, as Odoo's form view is: the page's list — its grid, its view switcher, what
   stands over the rows — is wrapped in .record-list and hidden while the record's sheet shows (the wrapper keeps
   the grid alive, so its page, its sort and its chosen rows are there again on the way back). The bar over the
   sheet (Breadcrumbs SaveForm) carries Save and Discard; the sheet has no button row at its foot. */
.record-list[hidden] { display: none !important; }
.page-trail-actions > .page-trail-commands { order: -1; }
.page-trail-commands > .editor-discard { order: 1; }

/* The header's rows (css/onix-form.css): Odoo's o_inner_group — the caption column fit-content(150px), 10 px between
   the rows (the field's 5 px and the grid's 8 px, near enough), the helpers beside a field shown with the pointer. */
.form-column.invoice-header { gap: var(--form-row-gap) 16px; }
.form-column > :not(.form-pairs__full, .form-lock--pairs, .form-column__side) > small,
.form-column > .form-lock--pairs > :not(.form-pairs__full, .form-column__side) > small,
.form-pairs > :not(.form-pairs__full, .form-lock--pairs) > small,
.form-pairs > .form-lock--pairs > :not(.form-pairs__full) > small { font-size: 12px; color: var(--o-muted); }
.register-fill, .lookup-open, .lookup-toggle, .lookup-clear, .dateinput-pick { color: var(--o-gray-600); }
.form-card :is(label, .form-pair, .form-column__side, .field-with-action):not(:hover, :focus-within) :is(.register-fill, .lookup-open, .lookup-clear) { opacity: 0; }
.form-card :is(label, .form-pair, .form-column__side, .field-with-action):not(:hover, :focus-within) :is(.lookup-toggle, .dateinput-pick) { opacity: .5; }
.register-fill .button { border-color: transparent; background: transparent; }
.register-fill:hover .button { border-color: var(--o-gray-300); background: var(--o-gray-300); }
.editor-badge__button.is-ai { background: transparent; border-color: transparent; color: var(--o-link); font-weight: 500; padding-left: 0; box-shadow: none; }
.editor-badge__button.is-ai:hover { text-decoration: underline; }
/* "Fill from previous bill / PO…" over a vendor draft: a link, not a button block, so the sheet starts quietly. */
.form-card > .toolbar.editor-autocomplete { margin: 0 0 8px; }
.form-card > .toolbar.editor-autocomplete .button { padding-left: 0; border-color: transparent; background: transparent; color: var(--o-link); font-weight: 500; }
.form-card > .toolbar.editor-autocomplete .button:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--o-primary-hover); text-decoration: underline; }

/* The notebook: Bootstrap's nav-tabs as Odoo draws them — the names in the link colour on a gray-300 rule, the open
   one in the text colour inside a bordered tab whose foot is the sheet's white; 16 px of air under the row. */
.editor-tabs { margin: 16px 0 0; }
.editor-tabs .onix-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    margin: 0 0 16px;
    border: 0;
    border-bottom: 1px solid var(--o-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.editor-tabs .onix-segmented button {
    margin: 0 0 -1px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--o-radius) var(--o-radius) 0 0;
    background: transparent;
    color: var(--o-link);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.editor-tabs .onix-segmented button:hover { border-color: var(--o-gray-200) var(--o-gray-200) var(--o-border); color: var(--o-primary-hover); background: transparent; }
.editor-tabs .onix-segmented button.is-active,
.editor-tabs .onix-segmented button.is-active:hover { border-color: var(--o-border) var(--o-border) var(--o-view-bg); background: var(--o-view-bg); color: var(--o-text); font-weight: 400; }
.editor-tabs > .muted { font-size: 13px; }
.onix-segmented.invoice-entries-views { margin: 0 0 8px; }

/* Odoo's oe_subtotal_footer: at the right, the captions right-aligned and ending in a colon, the figures at the
   right edge, a rule over the block and one over the Total, which is 1.3 em at 500. */
.onix-card.editor-totals,
.editor-totals {
    width: min(100%, 400px);
    margin: 12px 0 0 auto;
    padding: 4px 0 0;
    border: 0;
    border-top: 1px solid var(--o-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.editor-totals__row { min-height: 26px; padding: 2px 0; font-size: 14px; }
.editor-totals__row + .editor-totals__row { border-top: 0; }
.editor-totals__label { text-align: right; color: var(--o-text); }
.editor-totals__label::after { content: ":"; }
.editor-totals__note .editor-totals__label::after, .editor-totals__match .editor-totals__label::after { content: ""; }
.editor-totals__amount { color: var(--o-text); font-weight: 400; }
.editor-totals__ccy { color: var(--o-muted); font-size: 12px; }
.editor-totals__row + .editor-totals__total,
.editor-totals__total { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--o-border); font-size: 18px; font-weight: 500; }
.editor-totals__total .editor-totals__label, .editor-totals__total .editor-totals__amount { color: var(--o-heading); font-weight: 500; }
.editor-totals__total .editor-totals__amount { font-size: 18px; }
.editor-totals__rate { font-size: 12px; }

/* The texts under the lines, Payment, the form's own buttons. */
.invoice-notes textarea { min-height: 56px; }
.invoice-notes__legal { border: 1px solid var(--o-border); border-radius: var(--o-radius); font-size: 13px; }
.invoice-payment { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--o-border); }
.form-actions { gap: 4px; margin-top: 16px; }
.partner-panel, .registry-changes { border-radius: var(--o-radius); background: var(--o-gray-100); }

/* The document pane beside the form (the print preview, the original): the same sheet. */
.onix-split-first > .onix-card,
.onix-split-first > .invoice-source {
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius-lg);
    background: var(--o-view-bg);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.onix-card-title { font-size: 14px; font-weight: 500; color: var(--o-heading); }
.onix-split-divider::after { background: var(--o-border); }
.onix-split-divider:hover::after, .onix-split-divider:focus-visible::after, .onix-split.is-resizing > .onix-split-divider::after { background: var(--o-primary); }

/* ─── 5b. The journal entry (JournalEntriesView.razor) ───────────────────── */

/* Odoo's account.move form of an entry: the two groups of the header, the notebook, the line_ids list — no frame of
   its own, the head on the grey, 1 px rules, the fields Odoo's o_input in the cell (a line under the pointer, the
   brand's with the focus), the add links in the link colour as the list's last row, the debit / credit sums at its
   foot in 500 — and the narration under it, a quiet textarea with "Add an internal note…". */
.journal-entry-header { margin-bottom: 4px; }
.journal-entry-form > .alert { margin: 0 0 12px; }
table.lines.journal-lines { margin: 0; border-collapse: collapse; }
table.lines.journal-lines th,
table.lines.journal-lines td { border-bottom: 1px solid var(--o-border); font-size: 14px; }
table.lines.journal-lines thead th {
    padding: 6px 5px;
    background: var(--o-gray-100);
    color: var(--o-text);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-top: 1px solid var(--o-border);
}
table.lines.journal-lines th.num, table.lines.journal-lines td.num { text-align: right; }
table.lines.journal-lines tbody td { height: 36px; padding: 0 5px; vertical-align: middle; }
table.lines.journal-lines tbody tr:hover > td { background: color-mix(in srgb, var(--o-black) 3%, transparent); }
table.lines.journal-lines td :is(input:not([type=checkbox], [type=radio]), select:not([multiple]), textarea) {
    width: 100%;
    min-height: 28px;
    height: 28px;
    padding: 2px 4px;
}
table.lines.journal-lines td.num input { text-align: right; }
table.lines.journal-lines td select[multiple] { width: 100%; height: 30px; min-height: 0; padding: 4px 2px; border: 0; background: transparent; font-size: 13px; overflow: hidden; }
/* A lookup's helpers (open, clear, the caret) show with the pointer on the row or the focus in the cell, as Odoo's. */
table.lines.journal-lines tbody tr:not(:hover) td:not(:focus-within) :is(.lookup-open, .lookup-clear, .lookup-toggle, .dateinput-pick) { opacity: 0; }
/* A section: a grey row in 500; a note: italic. */
table.lines.journal-lines tr.line-section > td { background: var(--o-gray-100); font-weight: 500; }
table.lines.journal-lines tr.line-section input { font-weight: 500; }
table.lines.journal-lines tr.line-note input { font-style: italic; }
/* The lines the service makes (a tax line, the balancing line): read in grey, as Odoo's generated lines read. */
table.lines.journal-lines tr.line-tax > td, table.lines.journal-lines tr.line-auto-balance > td { color: var(--o-muted); }
table.lines.journal-lines .line-remove { width: 24px; height: 24px; display: inline-grid; place-items: center; border: 0; border-radius: var(--o-radius-sm); background: transparent; color: var(--o-gray-600); cursor: pointer; }
table.lines.journal-lines .line-remove:hover { background: var(--o-gray-200); color: var(--o-danger-text); }
table.lines.journal-lines .line-remove svg { width: 14px; height: 14px; }
table.lines.journal-lines .analytic-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
table.lines.journal-lines .analytic-chips select { width: auto; min-width: 2.5em; border: 0; color: var(--o-link); }
table.lines.journal-lines .line-currency { display: flex; align-items: center; gap: 4px; }
table.lines.journal-lines .deferral-dates { white-space: normal; }
/* Odoo's "Add a line · Add a section · Add a note": links in the list's last row. */
table.lines.journal-lines tr.journal-lines-add > td { height: 36px; padding: 0 8px; background: transparent; }
table.lines.journal-lines tr.journal-lines-add .link-button { margin-right: 16px; color: var(--o-link); font-weight: 400; font-size: 14px; }
table.lines.journal-lines tr.journal-lines-add .link-button:hover { color: var(--o-primary-hover); }
/* The foot: the sums under Debit and Credit at 500, the balance of the two before them. */
table.lines.journal-lines tfoot td { padding: 8px 5px; border-bottom: 0; font-weight: 500; color: var(--o-heading); }
table.lines.journal-lines tfoot td:first-child { font-weight: 400; }
table.lines.journal-lines tfoot .imbalance { margin-right: 12px; }
table.lines.journal-lines tfoot .imbalance.ok { color: var(--o-success-text); }
table.lines.journal-lines tfoot .imbalance.off { color: var(--o-danger-text); font-weight: 500; }
table.lines.journal-lines tfoot .muted { font-size: 13px; }
/* The narration: the internal note under the lines, no caption (Odoo's placeholder says it). */
.journal-entry-narration { display: block; margin: 12px 0 0; }
.form-card label.journal-entry-narration > .journal-entry-narration__caption {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.journal-entry-narration textarea { width: 100%; min-height: 48px; resize: vertical; }
/* The notes the tools logged: Odoo's chatter under the sheet — a rule, the date and the author small and grey. */
.journal-entry-form .entry-notes { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--o-border); font-size: 14px; }
.journal-entry-form .entry-notes > span { color: var(--o-gray-700); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.journal-entry-form .entry-notes ul { margin: 6px 0 0; padding: 0; list-style: none; }
.journal-entry-form .entry-notes li { padding: 6px 0; border-bottom: 1px solid var(--o-gray-200); }
.journal-entry-form .entry-notes li small { display: block; color: var(--o-muted); font-size: 12px; }
.journal-entry-form > h3 { margin: 20px 0 8px; }

/* ─── 6. The record bar: Odoo's control panel and statusbar ──────────────── */

/* The bar over a record (css/onix-trail.css) is Odoo's form view head, its TWO rows exactly:
     1. the control panel — white, a gray-300 rule under it: the way back, the breadcrumb (the list in 13 px grey,
        "/", the record's name 16 px / 500 in black, its journal number and its partner in grey after it) and, at
        the far right, Odoo's pager "‹ 3 / 8 ›";
     2. the statusbar — on the page's grey (Odoo's $body-bg), sticky with the panel: the document's buttons at the
        left in Odoo's order (the main one first, with their words, every one a btn-secondary), then its notices,
        its chips and its layout tools, and the state steps at the right end.
   A window under 1100 px keeps css/onix-trail.css's stacking. It stays in view as before. */
.page-trail.has-record,
.page-trail.has-tools,
.page-trail.has-record.has-tools {
    width: 100%;
    max-width: none;
    margin: -4px 0 8px;
    padding: 6px 16px;
    min-height: 46px;
    gap: 4px 6px;
    border: 0;
    border-bottom: 1px solid var(--o-border);
    border-radius: 0;
    background: var(--o-view-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}
@media (min-width: 1100.02px) {
    /* Its rule under the grey row is where the page is cut when it scrolls (section 7c). */
    .page-trail.has-tools, .page-trail.has-record.has-tools { flex-wrap: wrap; row-gap: 0; }
    /* The tools' three groups become items of the bar itself: the pager ends the first row, the actions ARE the
       second — full width, on the grey, over the panel's rule. */
    .page-trail.has-tools .page-trail-tools { display: contents; }
    .page-trail.has-tools .page-trail-pager { order: 1; flex: 0 0 auto; margin-left: auto; }
    .page-trail.has-tools .page-trail-actions {
        order: 10;
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        min-width: 0;
        margin: 6px -16px -6px;
        padding: 8px 16px;
        gap: 4px;
        border-top: 1px solid var(--o-border);
        background: var(--o-webclient-bg);
    }
    .page-trail.has-tools .page-trail-status { order: 11; flex: 0 0 auto; }
    /* The first row: the list's name whole, the record's name and the partner giving way (an ellipsis) only when
       the row is too narrow for them. */
    .page-trail.has-tools .page-trail-crumb { flex: 0 0 auto; min-width: 0; max-width: 22em; }
    .page-trail.has-tools .page-trail-current { flex: 0 1 auto; min-width: 7em; }
    .page-trail.has-tools .page-trail-partner { flex: 0 2 auto; min-width: 5em; }
    /* The second row, in Odoo's order: the document's buttons first, Save (the main one) leading them, with their
       words — the layout tools keep their icons alone (their names in their tooltips) — the steps last, at the right. */
    .page-trail-actions > .editor-commands { order: -1; }
    .editor-commands > .editor-save { order: -1; }
    .page-trail-actions > .editor-steps { order: 10; margin-left: auto; }
    .page-trail-tools .button-label,
    .page-trail-tools .editor-commands > .button > .button-label,
    .page-trail-tools .editor-commands :not(.editor-save) > .button-label { display: inline; }
    .page-trail-tools .editor-tools .button-label,
    .page-trail-tools .row-menu-button > span:not(.row-menu-caret) { display: none; }
    .page-trail-tools .row-menu-button .row-menu-caret { margin-left: 0; }
    /* Odoo's statusbar buttons are full-size btn-secondary (the main one btn-primary): 5 px 10 px, 14 px, 4 px corners. */
    .page-trail-actions .button.small,
    .page-trail-actions .button.small.icon,
    .page-trail-actions .row-menu-button { padding: 5px 10px; font-size: 14px; border-radius: var(--o-radius); }
    .page-trail-actions .button.small.icon:not(.primary, .danger), .page-trail-actions .row-menu-button { padding: 5px 8px; background: var(--o-gray-300); border-color: var(--o-gray-300); color: var(--o-text); }
    .page-trail-actions .button.small.icon:not(.primary, .danger):hover:not(:disabled), .page-trail-actions .row-menu-button:hover:not(:disabled) { background: var(--o-gray-400); border-color: var(--o-gray-400); color: var(--o-heading); }
    .page-trail-actions .button.small.icon[aria-pressed="true"], .page-trail-actions .button[aria-pressed="true"] { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }
    .page-trail-actions .button.small.editor-badge__button { padding: 5px 10px; font-size: 13px; border-radius: var(--o-radius); }
    .page-trail-actions .onix-chip { padding: 5px 12px; font-size: 13px; }
}
.page-trail-back {
    width: 30px; height: 30px;
    margin-right: 2px;
    border: 1px solid transparent;
    border-radius: var(--o-radius);
    background: transparent;
    color: var(--o-text);
}
.page-trail-back:hover { background: var(--o-gray-200); border-color: var(--o-gray-200); color: var(--o-heading); transform: none; }
.page-trail-crumb { padding: 3px 4px; border-radius: var(--o-radius-sm); color: var(--o-muted); font-size: 13px; font-weight: 400; }
.page-trail-crumb:hover { color: var(--o-heading); background: transparent; text-decoration: underline; }
.page-trail-more-panel .page-trail-crumb { color: var(--o-text); }
.page-trail-sep { padding: 0 2px; color: var(--o-muted); opacity: 1; font-size: 13px; }
.page-trail.has-record h2, .page-trail.has-history h2 { padding: 0 4px; font-size: 16px; font-weight: 500; color: var(--o-heading); }
.page-trail-internal { font-size: 13px; color: var(--o-muted); }
.page-trail-partner { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--o-muted); font-size: 13px; }
.page-trail-more > summary { border-radius: var(--o-radius-sm); }
.page-trail-tools .button[aria-pressed="true"] { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }
.page-trail-tools .row-menu-button { border-radius: var(--o-radius-sm); font-size: 13px; }
/* The state steps (the document's condition chip, when it has one, right after them). */
.page-trail-actions > .editor-steps { margin-right: 0; }
.editor-badges, .editor-chips { gap: 4px; }
/* Odoo's form pager at the far right: ‹ 3 / 50 ›, btn-light, behind a hairline. */
.page-trail-pager { margin-left: 2px; padding-left: 8px; border-left: 1px solid var(--o-border); }
.editor-nav__buttons > .button.small.icon { width: 28px; border-color: transparent; background: transparent; border-radius: var(--o-radius-sm); }
.editor-nav__buttons > .button.small.icon:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-200); }
.editor-nav__buttons > .editor-nav__count { border: 0; background: transparent; color: var(--o-text); font-size: 14px; font-weight: 400; }
.editor-nav__buttons > :first-child, .editor-nav__buttons > :last-child { border-radius: var(--o-radius-sm); }

/* The statusbar (Components/Shared/StatusBar.razor): Odoo 20's o_statusbar_status — the steps inside one box with a
   gray-300 edge and 6 px corners, 2 px of padding; every step an arrow (clip-path) 2 px apart, the words 13 px at
   500 in the text colour, the steps behind the current one no darker, the current one in the active tint, a step
   under the pointer on gray-200. The state's own colour is not used: Odoo's statusbar is one colour. */
.statusbar,
.page-trail-status .statusbar {
    --o-caret: .75em;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 2px;
    border: 1px solid var(--o-border);
    border-radius: calc(var(--o-radius) + 2px);
    background: var(--o-view-bg);
    overflow: visible;
}
.statusbar-step,
.page-trail-status .statusbar-step,
.statusbar-step.done,
.statusbar-step.current,
.statusbar-step.current.is-draft, .statusbar-step.current.is-posted, .statusbar-step.current.is-verified,
.statusbar-step.current.is-muted, .statusbar-step.current.is-good, .statusbar-step.current.is-active,
.statusbar-step.current.is-sent, .statusbar-step.current.is-warn, .statusbar-step.current.is-overdue, .statusbar-step.current.is-bad {
    position: relative;
    padding: 3px calc(var(--o-caret) * 1.7);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--o-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - var(--o-caret)) 0, 100% 50%, calc(100% - var(--o-caret)) 100%, 0 100%, var(--o-caret) 50%);
}
.statusbar-step + .statusbar-step { border-left: 0; margin-left: calc(2px - var(--o-caret)); }
.statusbar-step:first-child { padding-left: calc(var(--o-caret) * 1.25); border-radius: var(--o-radius) 0 0 var(--o-radius); clip-path: polygon(0 0, calc(100% - var(--o-caret)) 0, 100% 50%, calc(100% - var(--o-caret)) 100%, 0 100%); }
.statusbar-step:last-child { padding-right: calc(var(--o-caret) * 1.25); border-radius: 0 var(--o-radius) var(--o-radius) 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--o-caret) 50%); }
.statusbar-step:first-child:last-child { border-radius: var(--o-radius); clip-path: none; }
.statusbar-step:hover:not(:disabled) { background: var(--o-gray-200); color: var(--o-heading); }
.statusbar-step.done { color: var(--o-text); background: transparent; }
.statusbar-step.current,
.statusbar-step.current.is-draft, .statusbar-step.current.is-posted, .statusbar-step.current.is-verified,
.statusbar-step.current.is-muted, .statusbar-step.current.is-good, .statusbar-step.current.is-active,
.statusbar-step.current.is-sent, .statusbar-step.current.is-warn, .statusbar-step.current.is-overdue, .statusbar-step.current.is-bad,
.statusbar-step.current:hover { background: var(--o-active-bg); color: var(--o-heading); }
.statusbar-step:disabled:not(.current) { color: var(--o-muted); }
.page-trail-status .statusbar-step, .page-trail-status .statusbar-step.current { font-size: 13px; }
@media (min-width: 1100.02px) and (max-width: 1200px) { .page-trail-status .statusbar-step { padding: 3px calc(var(--o-caret) * 1.7); } }

/* The steps a document waits for (InvoiceStepChips), the badges of the bar: Odoo's tags — rounded, grey, 500. */
.editor-steps .onix-chip, .onix-chip, .onix-chip--neutral, .onix-chip--review, .onix-chip--posted, .onix-chip--paid, .onix-chip--captured, .onix-chip--overdue {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.onix-chip--neutral { background: var(--o-gray-200); color: var(--o-text); }
.button.small.editor-badge__button { border-radius: var(--o-radius-sm); font-size: 13px; font-weight: 500; }

/* ─── 7. Popovers, chips, odds and ends ──────────────────────────────────── */

/* A drop-down (Odoo's dropdown-menu): white on a gray-300 edge, 6 px corners (20.0), the shadow of a popover, its
   items 14 px on 3 px 20 px, square, grey under the pointer. */
.dxg-popup, .row-menu-panel, .editor-badge-panel, .lookup-panel, .dateinput-panel, .page-trail-more-panel, .field-chooser,
.shell-pop-panel .row-menu-panel {
    padding: 8px 0;
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius-lg);
    background: var(--o-view-bg);
    box-shadow: var(--o-shadow-pop);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font-size: 14px;
}
.dxg-popup-title, .editor-badge-panel__title { padding: 4px 20px 6px; font-size: 13px; font-weight: 500; color: var(--o-muted); }
.dxg-menu-item, .dxg-option, .row-menu-panel a, .row-menu-panel button, .lookup-option, .field-chooser__item {
    padding: 4px 20px;
    border-radius: 0;
    color: var(--o-text);
}
.dxg-menu-item:hover:not(:disabled), .dxg-option:hover, .row-menu-panel a:hover, .row-menu-panel button:hover:not(:disabled), .lookup-option:hover, .lookup-option.is-active {
    background: color-mix(in srgb, var(--o-black) 8%, transparent);
    color: var(--o-heading);
}
.dxg-menu-item.current { color: var(--o-heading); font-weight: 500; }
.dxg-menu-check, .dxg-menu-check svg, .dxg-menu-glyph { color: var(--o-primary); }
.dxg-menu-sep, .row-menu-panel hr { margin: 8px 0; background: var(--o-border); }
.dxg-option-all { border-radius: 0; }
.dxg-quick { padding: 0 12px 8px; margin-bottom: 8px; }
.dxg-quick-btn { height: 30px; border-radius: var(--o-radius); border-color: var(--o-gray-300); color: var(--o-text); }
.dxg-quick-btn:hover:not(:disabled) { background: var(--o-gray-200); border-color: var(--o-gray-300); color: var(--o-heading); }
.dxg-quick-btn.current { background: var(--o-active-bg); border-color: var(--o-active-border); color: var(--o-heading); }
.dxg-popup-foot { padding: 8px 20px 0; }
.dxg-popup-search { margin: 0 12px 8px; }
.row-menu-panel .grid-search__item { border-radius: 0; font-size: 14px; }
.grid-search__head { font-size: 13px; font-weight: 500; color: var(--o-muted); }
.grid-search__glyph { color: var(--o-gray-600); }

/* A chip of state (.badge): Odoo's badge rounded-pill — .25em .82em, 12 px at 500, no dot. The tints stay. */
.badge, .badge::before { }
.badge { gap: 0; padding: .25em .82em; border: 0; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; }
.badge::before { display: none; content: none; }

/* The keyboard's focus, everywhere a control had the gateway's ring. */
.dxg-check:focus-visible, .dxg-page:focus-visible, .dxg-link:focus-visible { box-shadow: var(--o-focus-ring); }

/* The toolbar of a page that is not a grid's row (app.css .toolbar): flat. */
.toolbar { border-radius: var(--o-radius); border-color: var(--o-border); box-shadow: none; }

/* ─── 7b. The top bar's menu: one entry style ────────────────────────────── */

/* Odoo's navbar entries (webclient/navbar/navbar.scss): every item of the row — the app's name, the menu's links and
   drop-downs, the company, the language, the bell, the search — is the same entry: 30 px tall, 0 10 px, 4 px
   corners, no border, no fill, grey (gray-200) under the pointer, the active tint when open or current; the app's
   name 1.2 em at 500 and never filled. The bar's own shape and the rail stay. */
.shell-subnav-app, .shell-subnav-link, .shell-menu-head, .shell-pill, .shell-iconbtn, .shell-lang, .shell-bell {
    height: 30px;
    min-height: 0;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--o-radius);
    background: transparent;
    color: var(--o-text) !important;
    font-family: var(--font-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
}
.shell-subnav { gap: 2px; }
.shell-menubar { gap: 2px; padding: 0 2px; }
.shell-subnav-app { padding: 0 8px 0 4px; border-right: 0; font-size: 16px; font-weight: 500; color: var(--o-heading) !important; }
.shell-subnav-app:hover { background: transparent; color: var(--o-heading) !important; text-decoration: none; }
.shell-subnav-link:hover, .shell-menu-head:hover, .shell-pill:hover, .shell-iconbtn:hover, .shell-lang:hover,
.shell-bell:has(.shell-badge), .shell-bell:has(.shell-badge):hover { background: var(--o-gray-200); border-color: transparent; color: var(--o-heading) !important; text-decoration: none; }
.shell-subnav-link.active, .shell-menu[open] > .shell-menu-head, .shell-menu[open] > .shell-menu-head.active,
:root[data-theme="dark"] .shell-subnav-link.active, :root[data-theme="dark"] .shell-menu[open] > .shell-menu-head.active {
    background: var(--o-active-bg);
    border-color: transparent;
    color: var(--o-heading) !important;
    font-weight: 500;
    box-shadow: none;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .shell-subnav-link.active, :root:not([data-theme="light"]) .shell-menu[open] > .shell-menu-head.active { background: var(--o-active-bg); color: var(--o-heading) !important; box-shadow: none; }
}
.shell-caret { color: inherit; }
.shell-iconbtn { width: 30px; padding: 0; }
.shell-iconbtn.shell-lang { width: auto; padding: 0 8px; font-size: 12px; font-weight: 500; }
.shell-badge { top: 4px; right: 5px; box-shadow: 0 0 0 1.5px var(--o-view-bg); }
.shell-search {
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--o-gray-300);
    border-radius: var(--o-radius);
    background: var(--o-view-bg);
    color: var(--o-muted);
    font-size: 13px;
}
.shell-search:hover { background: var(--o-view-bg); border-color: var(--o-gray-400); }
.shell-search kbd { border-radius: var(--o-radius-sm); background: var(--o-gray-200); color: var(--o-muted); }
.shell-search-mayla { border-left-color: var(--o-gray-300); border-radius: 0 var(--o-radius-sm) var(--o-radius-sm) 0; }
.shell-avatar { width: 30px; height: 30px; }
.shell-pop-panel.shell-menu-panel { border: 1px solid var(--o-border); border-radius: var(--o-radius-lg); box-shadow: var(--o-shadow-pop); }
.shell-menu-panel .shell-menu-item { border-radius: 0; font-size: 14px; }
.shell-menu-panel .shell-menu-item:hover { background: color-mix(in srgb, var(--o-black) 8%, transparent); }
.shell-menu-item.is-active { background: var(--o-active-bg); color: var(--o-heading) !important; }
.shell-menu-item.is-active:hover { background: var(--o-active-bg); }
.shell-menu-section-title, .shell-menu-group-title, .shell-pop-head { color: var(--o-muted); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* ─── 7c. The head is the screen's edge ─────────────────────────────────── */

/* Odoo scrolls a record in its own box under an opaque navbar and control panel: nothing of the page passes under
   them. Here the window scrolls behind fixed chrome, so the chrome is drawn opaque (no glass to see the form through)
   and a band of the page's own colour fills the top of the window down to the line where the record's bar and the
   list's control row park — over the 12 px above the top bar and the 8 px under it. What scrolls up is cut at that
   line, as at a screen's edge: the bar (z 40), the top bar (50) and the rail (52) lie over the band (39), the page's
   content and its sticky heads (5 and less) under it; a pop-up (60 and up) still opens over all of it. The band is
   a box of its own, so a click on it never reaches what it hides. A frame (no chrome) has none. On a phone the top
   bar is the page's head and scrolls away: the bar parks at the window's top, the band covers only the status bar
   of the native app (--safe-top, 0 on the web). */
@media (min-width: 768px) {
    .shell-rail, .shell-topbar {
        border-color: var(--o-border);
        background: var(--o-view-bg);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }
}
main.shell-main::before {
    content: "";
    position: fixed;
    z-index: 39;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--shell-gap) + var(--shell-bar-h) + 8px);
    background: var(--bg);
}
@media (max-width: 767.98px) {
    main.shell-main::before { height: var(--safe-top); }
    .page-trail.has-record { top: var(--safe-top); }
}
html[data-framed] main.shell-main::before,
html[data-layout="embedded"] main.shell-main::before,
.shell--embedded main.shell-main::before { content: none; }
@media print { main.shell-main::before { content: none; } }
/* The list's control row parks right under the record's bar (css/onix-datagrid.css leaves 6 px of air there, which
   showed the rows passing between them). */
.dxg-toolbar.dxg-sticky { top: calc(var(--shell-gap) + var(--shell-bar-h) + 8px + var(--trail-h, 0px)); }

/* ─── 8. Dark theme: the scale turned over, on the gateway's dark tokens ─── */

:root[data-theme="dark"] {
    --o-text-info: #4fb3d9;
    --o-white: #161c26;
    --o-black: #FFFFFF;
    --o-gray-100: #1c2230;
    --o-gray-200: #232b3a;
    --o-gray-300: #2e3747;
    --o-gray-400: #3b4557;
    --o-gray-500: #6b7788;
    --o-gray-600: #8b97ab;
    --o-gray-700: #b4bdcb;
    --o-gray-800: #d2d9e4;
    --o-gray-900: #e8edf5;
    --o-view-bg: #161c26;
    --o-webclient-bg: #0d1117;
    --o-input-border: #3b4557;
    --o-placeholder: #6b7788;
    --o-danger-text: #f0717c;
    --o-shadow-pop: 0 .5rem 1rem rgba(0, 0, 0, .5);
    --o-primary-active-bg: color-mix(in srgb, var(--o-primary) 18%, var(--o-view-bg));
    --dxg-hover: color-mix(in srgb, #FFFFFF 6%, var(--o-view-bg));
    --dxg-focused: color-mix(in srgb, #FFFFFF 11%, var(--o-view-bg));
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --o-text-info: #4fb3d9;
        --o-white: #161c26;
        --o-black: #FFFFFF;
        --o-gray-100: #1c2230;
        --o-gray-200: #232b3a;
        --o-gray-300: #2e3747;
        --o-gray-400: #3b4557;
        --o-gray-500: #6b7788;
        --o-gray-600: #8b97ab;
        --o-gray-700: #b4bdcb;
        --o-gray-800: #d2d9e4;
        --o-gray-900: #e8edf5;
        --o-view-bg: #161c26;
        --o-webclient-bg: #0d1117;
        --o-input-border: #3b4557;
        --o-placeholder: #6b7788;
        --o-danger-text: #f0717c;
        --o-shadow-pop: 0 .5rem 1rem rgba(0, 0, 0, .5);
        --o-primary-active-bg: color-mix(in srgb, var(--o-primary) 18%, var(--o-view-bg));
        --dxg-hover: color-mix(in srgb, #FFFFFF 6%, var(--o-view-bg));
        --dxg-focused: color-mix(in srgb, #FFFFFF 11%, var(--o-view-bg));
    }
}
