/* =============================================================================
   Aretail — visual facelift (ported from MISTRY MONT 2026-09-11)
   =============================================================================

   WHAT THIS IS
   A pure presentation layer. No view overrides, no layout changes, no JS,
   no metadata beyond the single `cssList` entry that loads this file.

   HOW IT IS LOADED
   `custom/Espo/Custom/Resources/metadata/app/client.json` -> `cssList`, listed
   BEFORE `client/custom/css/custom.css` on purpose: `custom.css` carries
   FUNCTIONAL styling (finance blur, stock thumbnails, quotation fullscreen
   dialog, stream panel, inline-edit affordances) and must keep the last word on
   any selector that overlaps.

   ROLLBACK
   Remove the one `cssList` array entry. Nothing else references this file.

   ONE COMPANION OUTSIDE THIS FILE
   Section 13 remaps icons by Font Awesome CLASS, so the five entities that
   carried no `iconClass` at all had nothing to remap. They were given one in
   `custom/Espo/Custom/Resources/metadata/clientDefs/{PriceListItem,
   PriceListCategory,DocumentFolder,SummaryVatRates,VatNumberValidation}.json`
   — a normal `fas fa-*` value, so those entities read correctly everywhere,
   not only where this stylesheet reaches. Those five files stand on their own
   and are NOT part of this rollback.

   WHAT IT LAYERS OVER
   The active theme is AutoERP (`client/modules/autocrm-themes/css/themes/autoerp.css`),
   which is driven by ~588 CSS custom properties on `:root`. Wherever a theme
   variable can carry the change, the variable is retuned instead of a selector
   being fought — that is why this file is short for what it does.

   VERIFIED AGAINST THE LIVE DOM (9.3.10, 2026-07-26). Selectors that could not be
   confirmed to match were deleted rather than shipped; each deletion is noted in
   the section it belonged to.
   ========================================================================== */


/* -----------------------------------------------------------------------------
   0. FONTS — self-hosted IBM Plex Sans (+ Condensed)
   -----------------------------------------------------------------------------
   Self-hosted, NOT `@import url(fonts.googleapis.com)`:
     - this instance has CSP config keys (`clientCspScriptSourceList`,
       `clientCspDisabled`), so an external stylesheet host may be blocked;
     - an external `@import` blocks first paint;
     - the AutoERP theme already self-hosts its own webfont (Poppins), so this
       matches the deployment's existing pattern.

   Subsets: latin + latin-ext only. latin-ext is REQUIRED — the UI is Czech
   (ě š č ř ž ý á í é ů). Sans is a VARIABLE font: one file per subset serves
   400/500/600, which is why the three faces share a `src`.
   Total added weight: 109 KB (2 x Sans 76 KB, 2 x Condensed 35 KB).
   -------------------------------------------------------------------------- */

/* IBM Plex Sans — variable, latin */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — variable, latin-ext (Czech diacritics live here) */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-var-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans Condensed 600 — micro-labels (column heads, panel titles, pills) */
@font-face {
    font-family: 'IBM Plex Sans Condensed';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-condensed-600-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Condensed';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/ibm-plex-sans-condensed-600-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* -----------------------------------------------------------------------------
   1. TOKENS
   -----------------------------------------------------------------------------
   `--mm-*` are ours. The `--brand/--table/--navbar/...` overrides below them are
   EXISTING AutoERP theme variables, retuned deliberately — each one is the theme's
   own single source of truth for that value, so retuning it is safer and smaller
   than out-shouting the selectors that read it.
   -------------------------------------------------------------------------- */

:root {
    --mm-ink:        #0E1621;   /* sidebar, headings */
    --mm-ink-2:      #24313E;   /* body copy on paper */
    --mm-paper:      #F3F5F7;   /* app background */
    --mm-surface:    #FFFFFF;   /* panels, lists, modals */
    --mm-surface-2:  #FBFCFD;   /* list header, quiet fills */
    --mm-steel:      #5C6B7C;   /* secondary text and icons */
    --mm-steel-2:    #7B8896;   /* micro-labels */
    --mm-line:       #E3E7EC;   /* hairlines */
    --mm-accent:     #E0007A;   /* the magenta dot in the logo */
    --mm-accent-d:   #B80064;   /* accent, pressed */
    --mm-accent-pale:#FDEAF3;   /* accent wash (selected rows) */

    --mm-ok:         #147D4B;
    --mm-ok-bg:      #E4F4EC;
    --mm-wip:        #9A6206;
    --mm-wip-bg:     #FBF0DC;
    --mm-err:        #C0293A;
    --mm-err-bg:     #FBE7E9;
    --mm-idle:       #5C6B7C;
    --mm-idle-bg:    #EDF0F3;
    --mm-note:       #2F5AA8;
    --mm-note-bg:    #E8EEF9;

    --mm-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --mm-cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;

    --mm-radius:    8px;
    --mm-radius-sm: 6px;
    --mm-control-h: 34px;

    /* ---- retuned AutoERP theme variables ---------------------------------- */

    /* page background: theme #eaecef -> paper */
    --body-bg: var(--mm-paper);

    /* sidebar: theme ships a gradient (#152b47 -> #06111f); flat ink instead */
    --navbar-inverse-bg: var(--mm-ink);
    --navbar-inverse-link-active-bg: rgba(255, 255, 255, .09);

    /* list header: theme #728194 (dark slate, white text) -> pale surface.
       The text colour is NOT a variable in the theme (it is a literal
       `color: rgb(255,255,255)` on `table.table > thead th`), so section 8
       overrides that selector explicitly as well. */
    --table-th-bg-color: var(--mm-surface-2);
    --table-th-hover-bg-color: #EEF2F6;
    --table-th-height: 38px;
    --table-td-height: 46px;
    --table-new-border-color: var(--mm-line);

    /* dropdowns: theme radius 12px -> 6px */
    --dropdown-border-radius: var(--mm-radius-sm);
    --dropdown-border: var(--mm-line);
    --dropdown-box-shadow: 0 6px 20px rgba(14, 22, 33, .10);
    --dropdown-link-hover-bg: #F1F4F7;

    /* form controls: theme height 40px -> 34px, matching `--mm-control-h`.
       BUG FOUND, 2026-07-26: `.form-control` itself was already 34px (this
       file's section 10 sets it directly), but the theme reads THIS separate
       variable for every button living inside an `.input-group-btn` — the
       date-picker toggle and the link field's "^"/"x" buttons — plus for
       `.selectize-input`/`.form-control.selectize-control.single` (the
       link-field and multi-enum widgets). Two different variables governed
       one visual row, so the attached button stood 6px taller than the input
       beside it. Retuning this one variable fixes the button height AND the
       selectize widgets in one place, per this section's own rule: retune the
       theme's variable rather than fight the selectors that read it. */
    --form-control-height: var(--mm-control-h);

    /* panels / wells. The heading band is retuned through the theme variable
       because the winning rule is `body .panel-default > .panel-heading`
       (specificity 0,2,1) — a plain `.panel > .panel-heading` rule loses to it,
       and out-specifying the theme here would be a worse trade than retuning
       its own value. Separation is carried by the hairline instead. */
    --panel-default-heading-bg: transparent;
    --panel-default-border: var(--mm-line);
    --default-border-color: var(--mm-line);

    /* modals */
    --modal-box-shadow: 0 24px 64px rgba(14, 22, 33, .22);
    --modal-backdrop-bg: rgba(14, 22, 33, .38);
}

/* Every variable above has at least one reader in the theme — counted by walking
   `document.styleSheets` for `var(--name)`, lowest is `--table-td-height` with 1
   (`--form-control-height` has 8). Four more were written in an earlier pass and
   removed again because nothing in the loaded CSS reads them at all:
   `--navbar-inverse-hover-bg`, `--table-active-border-color`, `--well-border`,
   `--modal-header-bg`. A variable override with no reader is a dead rule that
   reads as working code. */


/* -----------------------------------------------------------------------------
   2. BASE TYPOGRAPHY
   -----------------------------------------------------------------------------
   The theme sets `Poppins, sans-serif` on `body` and re-declares it on form
   controls, so the family is restated on the control elements too — a `body`
   rule alone does not reach them.
   `tnum` gives tabular (equal-width) figures, so numbers line up column-wise in
   lists without needing a separate mono face.
   -------------------------------------------------------------------------- */

body {
    font-family: var(--mm-sans);
    font-size: 13.5px;
    font-feature-settings: 'tnum' 1, 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

input,
select,
textarea,
button,
.btn,
.form-control,
.selectize-input,
.selectize-dropdown,
.modal,
.dropdown-menu,
table.table {
    font-family: var(--mm-sans);
    font-feature-settings: 'tnum' 1, 'kern' 1;
}

/* Panel headings are deliberately NOT in this list — they are micro-labels, not
   headings, and section 10 gives them the condensed uppercase treatment. */
h1, h2, h3, h4, h5, h6,
.modal-title {
    font-family: var(--mm-sans);
    font-weight: 600;
    letter-spacing: -.015em;
}


/* -----------------------------------------------------------------------------
   3. LINKS
   -----------------------------------------------------------------------------
   The draft asks for links to drop their brand colour and read as ink, with a
   hover underline. Colour alone must not be the only affordance once the colour
   is gone (WCAG 1.4.1), so a content link keeps a permanent dotted underline
   that solidifies on hover — the draft's own list-link mechanism, used as the
   general one.

   SCOPE CORRECTION, measured on the live DOM: an earlier pass used
   `#main a:not(.btn):not(.action)...`, which also caught the column-sort
   anchors (`th > a.sort`), pagination, mass actions and the `.mm-cat-link`
   category menu from `custom.css` — 30 of the ~200 anchors on a list page are
   navigational, the rest are controls. The treatment is therefore bound to
   list cells, where every anchor is either a record link (`a.link`, or
   `a.text-default` for link fields such as `supplier`) or a row action
   (`a.action` / `[data-action]` — exactly the two markers the row buttons carry
   in this build). Both link flavours have to be covered or one column reads ink
   and the next reads teal in the same row.

   DROPPED vs the draft: "ALL links inherit ink colour". Detail-view link fields
   and stream links are bare `<a href="#...">` with no stable class, so
   recolouring them means either retuning `--link-color` for every consumer
   (`.btn-link`, the search button, pagination icons — 100+ screens, none of
   them verifiable in one pass) or guessing at selectors. The list is where the
   draft named the treatment; that is where it is applied.
   -------------------------------------------------------------------------- */

#main a.link,
.list > table > tbody > tr > td.cell a:not(.action):not([data-action]) {
    color: var(--mm-ink-2);
    text-decoration: none;
    border-bottom: 1px dotted rgba(92, 107, 124, .55);
}

#main a.link:hover,
#main a.link:focus,
.list > table > tbody > tr > td.cell a:not(.action):not([data-action]):hover,
.list > table > tbody > tr > td.cell a:not(.action):not([data-action]):focus {
    color: var(--mm-accent-d);
    border-bottom-color: var(--mm-accent-d);
    border-bottom-style: solid;
    text-decoration: none;
}

#main a:focus-visible {
    outline: 2px solid var(--mm-accent);
    outline-offset: 2px;
    border-radius: 2px;
}


/* -----------------------------------------------------------------------------
   4. SIDEBAR
   -----------------------------------------------------------------------------
   DOM confirmed on this build:
       #navbar li.not-in-more.tab            > a.nav-link  (item)
       #navbar li.not-in-more.tab.tab-divider  .nav-divider-text > .label-text  (section heading)
   CORRECTION vs the draft: the draft keyed rules on `body.has-vertical-navbar`
   and on `#navbar .tabs > li > a`. Neither matches — the body class here is
   `has-navbar` (plus `minimized` when collapsed) and the reliable item selector
   is `#navbar .tab > a`. All sidebar rules below use `#navbar li.not-in-more.tab`
   (see the BUG note further down — an earlier pass dropped `.not-in-more` and
   leaked sidebar text colour into the "..." overflow panel).

   DROPPED vs the draft: the 244px sidebar width (theme is 210px). The 210px value
   is woven through 12+ theme rules — `#header` width, `.navbar-right` right
   padding, `ul.tabs` width, three `left: 210px` tab-group dropdown positions,
   the footer margin, the side-menu backdrop, the `.contains-mattermost`
   variant, and `> .content { padding-left: 225px }`. Changing one without all of
   the others misplaces the flyout menus. Width left alone; the draft's 1200px
   "narrow the sidebar to 216px" rule is dropped for the same reason.

   Per-tab colours come from INLINE `style="color: ..."` written by Admin -> Tabs,
   so `!important` is required to unify them. Scoped to `#navbar` so dashlet,
   button and page-header icons keep their colours.

   BUG FOUND AND FIXED, 2026-07-26: the "..." overflow panel (`li.dropdown.more
   > ul.dropdown-menu.more-dropdown-menu`) renders its entries as
   `li.in-more.tab > a.nav-link > span.short-label / span.full-label` — the
   IDENTICAL markup the visible sidebar uses (`li.not-in-more.tab`), just with
   `in-more` instead of `not-in-more`. Every rule below used to read
   `#navbar li.tab`, which matches BOTH, so the light-on-dark sidebar text
   colours (`.short-label` 52% white !important, `.full-label` 74% white) were
   painted onto the overflow panel's white `.dropdown-menu` background too —
   confirmed live via computed style: `.full-label` `rgba(255,255,255,.74)` on
   `.more-dropdown-menu` background `rgb(254,254,254)`. The panel's own section
   headings stayed legible only because the theme carries an extra, more
   specific rule for that one case (`body[data-navbar=side] #navbar .navbar
   ul.tabs>li.more>ul>li.tab-divider>div>.label-text{color:var(--gray-light)}`
   in `autocrm-themes/css/themes/autoerp.css`) that out-specifies our
   `color: inherit`; nothing analogous exists for `.short-label`/`.full-label`,
   so the items had nothing to fall back on. Fix: every item/active/divider
   selector below is scoped to `.not-in-more`, exactly as this section's own
   DOM comment already documented as the confirmed selector. The overflow panel
   now falls through to the theme's own `.dropdown-menu>li>a{color:var(
   --dropdown-link-color)}` (dark), which is what makes the "OBCHOD" heading
   readable in the first place. */

#navbar li.not-in-more.tab > a.nav-link {
    border-radius: var(--mm-radius-sm);
    padding-top: 7px;
    padding-bottom: 7px;
    height: 36px;
    transition: background-color .12s ease, color .12s ease;
}

#navbar li.not-in-more.tab > a.nav-link .short-label {
    color: rgba(255, 255, 255, .52) !important;
    font-size: 16px;
    transition: color .12s ease;
}

#navbar li.not-in-more.tab > a.nav-link .full-label {
    color: rgba(255, 255, 255, .74);
    font-size: 13.5px;
    letter-spacing: -.005em;
}

#navbar li.not-in-more.tab > a.nav-link:hover .short-label,
#navbar li.not-in-more.tab.active > a.nav-link .short-label {
    color: #FFFFFF !important;
}

#navbar li.not-in-more.tab > a.nav-link:hover .full-label,
#navbar li.not-in-more.tab.active > a.nav-link .full-label {
    color: #FFFFFF;
}

/* Active item: 9% white wash + a 3px accent lane marker.
   `ul.tabs` carries 5px padding, so `left: -5px` puts the marker flush with the
   sidebar edge in both the expanded and the `minimized` state. Scoped to
   `.not-in-more`: the marker is positioned relative to the sidebar column, so
   an `.in-more` twin carrying `.active` would draw it at a meaningless offset
   inside the floating overflow panel instead. */
#navbar li.not-in-more.tab.active > a.nav-link {
    background-color: rgba(255, 255, 255, .09);
}

#navbar li.not-in-more.tab.active > a.nav-link::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background-color: var(--mm-accent);
}

/* Section headings ("Obchod", "Výroba", ...) */
#navbar li.not-in-more.tab.tab-divider .nav-divider-text {
    font-family: var(--mm-cond);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .34);
}

#navbar li.not-in-more.tab.tab-divider .nav-divider-text .label-text {
    color: inherit;
}

/* Thin scrollbar for the tab column (96 tabs; it scrolls). */
#navbar ul.tabs::-webkit-scrollbar,
#navbar .navbar-body::-webkit-scrollbar {
    width: 6px;
}

#navbar ul.tabs::-webkit-scrollbar-track,
#navbar .navbar-body::-webkit-scrollbar-track {
    background: transparent;
}

#navbar ul.tabs::-webkit-scrollbar-thumb,
#navbar .navbar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border-radius: 3px;
}


/* -----------------------------------------------------------------------------
   5. TOP BAR
   -----------------------------------------------------------------------------
   `#navbar .navbar-right` is the white utility strip (search + icon actions).
   The theme gives it no bottom border; a hairline separates it from the paper.
   -------------------------------------------------------------------------- */

#navbar .navbar-right {
    box-shadow: none;
    border-bottom: 1px solid var(--mm-line);
}

/* Global search: theme radius is 25px (a pill) -> squared to the app's 6px.
   `!important` is required and is not laziness: the theme sets
   `body[data-navbar="side"] input.global-search-input { border-radius:
   var(--border-radius) !important }`, and `--border-radius` (25px) is the
   theme's global pill radius used by other components, so it must not be
   retuned wholesale. */
#navbar .global-search-container .form-control.global-search-input {
    height: var(--mm-control-h);
    border-radius: var(--mm-radius-sm) !important;
    background-color: var(--mm-surface-2);
    border: 1px solid var(--mm-line);
    font-size: 13.5px;
    box-shadow: none;
    transition: border-color .12s ease, background-color .12s ease;
}

#navbar .global-search-container .form-control.global-search-input:focus {
    background-color: var(--mm-surface);
    border-color: var(--mm-accent);
    box-shadow: none;
    outline: 0;
}

/* Utility icons: square hit area with a quiet hover */
#navbar .navbar-right > ul > li > a,
#navbar .navbar-right .menu-container > a {
    color: var(--mm-steel);
    border-radius: var(--mm-radius-sm);
    transition: background-color .12s ease, color .12s ease;
}

#navbar .navbar-right > ul > li > a:hover,
#navbar .navbar-right .menu-container > a:hover {
    background-color: #F1F4F7;
    color: var(--mm-ink);
}


/* -----------------------------------------------------------------------------
   6. BUTTONS
   -----------------------------------------------------------------------------
   34px tall, 6px radius, no shadow or text-shadow, 1px press translate.
   `.btn-primary` becomes the magenta accent. `.btn-success` and `.btn-danger`
   are deliberately LEFT ALONE — in this deployment they encode meaning on record
   actions ("Generovat Revolut kartu" is red because it is consequential).
   -------------------------------------------------------------------------- */

.btn {
    border-radius: var(--mm-radius-sm);
    box-shadow: none;
    text-shadow: none;
    font-weight: 500;
    letter-spacing: -.005em;
    transition: background-color .12s ease, border-color .12s ease, transform .06s ease;
}

.btn:active,
.btn.active {
    box-shadow: none;
}

/* The 1px press travel is bound to `:active` (the pointer state) ONLY.
   Espo also puts the `.active` CLASS on the selected record tab
   (`.tabs.middle-tabs > .btn.btn-text.active`); an earlier pass included
   `.btn.active` here and left the selected tab permanently shifted 1px down —
   measured as `transform: matrix(1,0,0,1,0,1)` on "Detail" and "Přehled". */
.btn:active {
    transform: translateY(1px);
}

.btn-default {
    background-color: var(--mm-surface);
    border-color: var(--mm-line);
    color: var(--mm-ink-2);
}

.btn-default:hover,
.btn-default:focus {
    background-color: #F1F4F7;
    border-color: #CFD7E0;
    color: var(--mm-ink);
}

.btn-primary {
    background-color: var(--mm-accent);
    border-color: var(--mm-accent);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--mm-accent-d);
    border-color: var(--mm-accent-d);
    color: #FFFFFF;
}

/* The primary create action on a list header.

   The draft targeted `.btn.action[data-action="create"]` and `.create-button > .btn`.
   NEITHER matches this build. The button is
   `.btn.btn-default.btn-xs-wide.main-header-manu-action.action[data-action="create"]`,
   and the theme styles it at
   `.page-header .header-buttons > .main-header-manu-action[data-action=create]`
   — three classes plus an attribute, so a plain `.btn.main-header-manu-action`
   override loses on specificity and silently does nothing. Matched here at equal
   specificity instead.

   The theme turns it into a 50px green circle and BLANKS THE LABEL
   (`span:not(.fas){font-size:0}`), which is why the screen shows a bare green "+".
   The design calls for an inline magenta pill that says what it does, so width,
   radius, padding and the label are all restored. `border-radius` needs
   `!important` because the theme sets it that way; nothing else does.

   Deliberately NOT done by recolouring `--btn-success-bg`: that variable is
   shared with every other success button, and those encode meaning on record
   actions. Only the create action moves to the accent. */
.page-header .header-buttons > .main-header-manu-action[data-action="create"],
.page-header .header-buttons > .main-header-manu-action[data-action="quickCreate"] {
    width: auto;
    min-width: 0;
    max-width: none;
    height: 34px;
    padding: 0 14px;
    gap: 7px;
    border-radius: var(--mm-radius-sm) !important;
    background-color: var(--mm-accent);
    border-color: var(--mm-accent);
    color: #FFFFFF;
}

.page-header .header-buttons > .main-header-manu-action[data-action="create"]:hover,
.page-header .header-buttons > .main-header-manu-action[data-action="quickCreate"]:hover {
    background-color: var(--mm-accent-d);
}

/* Give the label back. The theme zeroes it to leave only the glyph. */
.page-header .header-buttons > .main-header-manu-action[data-action="create"] span:not(.fas):not(.fa),
.page-header .header-buttons > .main-header-manu-action[data-action="quickCreate"] span:not(.fas):not(.fa) {
    font-size: 13px;
    line-height: 1;
}

.page-header .header-buttons > .main-header-manu-action[data-action="create"] span.fas,
.page-header .header-buttons > .main-header-manu-action[data-action="create"] span.fa,
.page-header .header-buttons > .main-header-manu-action[data-action="quickCreate"] span.fas,
.page-header .header-buttons > .main-header-manu-action[data-action="quickCreate"] span.fa {
    font-size: 13px;
    color: #FFFFFF;
}

.btn:focus-visible {
    outline: 2px solid var(--mm-accent);
    outline-offset: 2px;
}


/* -----------------------------------------------------------------------------
   7. PAGE HEADER
   -----------------------------------------------------------------------------
   DOM: `.page-header .header-title` (an `<h3>`) whose first child is
   `span.color-icon.fas.fa-square` carrying an INLINE per-entity colour.
   The square is replaced by a 3px accent lane marker on the heading itself.
   Scoped to `.page-header` so `.color-icon` keeps working in link fields,
   breadcrumbs elsewhere and dropdowns.
   -------------------------------------------------------------------------- */

.page-header {
    border-bottom: 0 none;
}

/* ALIGNMENT. Measured on `#Pallet` at 1280: `.page-header` starts on the content
   column (245) like `.search-container`, `.list-container` and `.list > table`,
   but the HEADING started at 253 and the header buttons ended at 1237 instead of
   1245 — the block was inset 8px on both sides while nothing below it was.

   The source is the theme's own grid-gutter emulation, ONE rule that applies to
   every child of the header row:
       autoerp.css  `.page-header .page-header-row > div
                     { position: relative; min-height: 1px;
                       padding-left: 8px; padding-right: 8px }`
   (`client/css/espo/espo.css` cancels it with `padding-left: unset !important`,
   but that file is NOT loaded — the AutoERP theme replaces it wholesale.)

   So it is removed at that selector, at equal specificity (0,2,1) and from a
   later sheet, and on BOTH sides: the heading, the breadcrumbs and the header
   buttons are all children of that row and were all inset by the same rule.
   Doing it here rather than pulling the marker out with a negative margin is
   what makes it hold on detail views, the dashboard and every other screen that
   renders a `.page-header` — the marker is positioned at the heading's own
   `left: 0`, so once the heading sits on the content column, so does it. */
.page-header .page-header-row > div {
    padding-left: 0;
    padding-right: 0;
}

.page-header .header-title {
    position: relative;
    padding-left: 14px;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--mm-ink);
    /* RHYTHM. Bootstrap's `h3` margin-top is a full line (21px) and it opened a
       51px hole between the top bar and the heading. 2px puts the heading 32px
       below the bar, which is still a clear break and 19px less air. The
       bottom margin is left at the theme's 7px: with `.page-header`'s own 10px
       it makes the 17px step down to the search row, which reads correctly. */
    margin-top: 2px;
}

.page-header .header-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 3px;
    border-radius: 2px;
    background-color: var(--mm-accent);
}

.page-header .header-title .color-icon {
    display: none;
}

/* The other 20px of the loose header block. `.search-container` renders four
   children; on a list with no advanced filter applied, `.advanced-filters` is a
   ZERO-HEIGHT element that still spends its `margin-bottom: 20px`. It cannot be
   caught with `:empty` — the template leaves a newline text node inside it — so
   it is matched by "has no element children". `:has()` is already the mechanism
   section 8 uses for checked rows, so this adds no new browser requirement.
   The margin comes back the moment a filter is added. */
.search-container > .advanced-filters:not(:has(> *)) {
    margin-bottom: 0;
}


/* -----------------------------------------------------------------------------
   8. LIST
   -----------------------------------------------------------------------------
   DOM CORRECTION vs the draft: the list table carries class `table` only, inside
   `div.list` — `table.list` never matches. Everything below is keyed on
   `.list > table`, and the header cells are `th.checkbox-cell` /
   `th.field-header-cell`.

   White surface, hairline frame, 8px radius, pale header, hairline row
   separators — no zebra, no per-row card, no shadow.

   DROPPED vs the draft: right-aligned numeric cells with tabular figures.
   Espo emits every body cell as a bare `<td class="cell" data-name="...">` with
   no type marker, so "numeric" cannot be selected without hardcoding field
   names per entity. Tabular figures are delivered globally instead, via
   `font-feature-settings: 'tnum'` in section 2.
   -------------------------------------------------------------------------- */

.list > table {
    background-color: var(--mm-surface);
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

/* Header row: the theme paints it dark slate with LITERAL white text
   (`table.table > thead th { color: rgb(255,255,255) }`), so both the cell and
   its sort anchor must be recoloured, not just the background variable. */
.list > table > thead > tr > th,
.list > table > thead > tr > th > a,
.list > table > thead > tr > th.field-header-cell,
.list > table > thead > tr > th.checkbox-cell {
    background-color: var(--mm-surface-2);
    color: var(--mm-steel-2);
    font-family: var(--mm-cond);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* The hairline belongs to the cell, not to the sort anchor inside it. */
.list > table > thead > tr > th {
    border-bottom: 1px solid var(--mm-line);
}

.list > table > thead > tr > th:hover,
.list > table > thead > tr > th:hover > a {
    background-color: var(--mm-surface-2);
    color: var(--mm-ink);
}

/* Body rows: hairline separators only. */
.list > table > tbody > tr > td.cell {
    border-top: 1px solid var(--mm-line);
    background-color: transparent;
    vertical-align: middle;
}

.list > table > tbody > tr:first-child > td.cell {
    border-top: 0 none;
}

.list > table > tbody > tr.list-row {
    transition: background-color .1s ease;
}

.list > table > tbody > tr.list-row:hover > td.cell {
    background-color: #F6F8FA;
}

/* 2px accent inset on the first cell of the hovered row. */
.list > table > tbody > tr.list-row:hover > td.cell:first-child {
    box-shadow: inset 2px 0 0 0 var(--mm-accent);
}

/* Checked rows read as selected. */
.list > table > tbody > tr.list-row:has(input.record-checkbox:checked) > td.cell {
    background-color: var(--mm-accent-pale);
}

.list > table input[type="checkbox"] {
    accent-color: var(--mm-accent);
}


/* -----------------------------------------------------------------------------
   9. STATUS LABELS — the pills
   -----------------------------------------------------------------------------
   DOM CORRECTION vs the draft: the draft's whole section targeted `.label-badge`
   and `.label-style-*`. Neither class exists in this build. A status cell renders
   as:
       <td class="cell" data-name="status"><span class="text-success" title="...">…</span></td>

   The AutoERP theme already paints these via
       table.table > tbody > tr > td[data-name="status"] > span      (base pill)
       table.table > tbody > tr > td[data-name="status"] .text-*     (colour pair)
   ...but with `display: inline`, which is exactly why a two-word status wraps
   onto two lines and reads as broken. The fix is the theme's own selector plus
   `white-space: nowrap`.

   `.text-default` and the five `.text-*` variants below are the complete set the
   theme styles; `.label-*` twins are matched too because the theme pairs them.
   The full value stays available on hover — Espo already emits `title="…"` — so
   the ellipsis in a narrow column loses nothing.

   debt: a long status still ellipsises. Measured on `#Pallet` at 1600px: the
   pill gets 98px because `Resources/layouts/Pallet/list.json` gives the `status`
   column `width: 10%`; "ZABALENÁ / KOMPLETNÍ" needs 133px at this size, and no
   legible type size closes a 35px gap. Condensed 10.5px / .04em tracking / 7px
   side padding is the tightest setting that still fits every single-word status
   ("ROZPRACOVANÁ" = 94px). CEILING: the column width. UPGRADE PATH: widen the
   `status` column in the entity's list layout — a layout change, deliberately
   out of scope for a CSS-only facelift.
   -------------------------------------------------------------------------- */

table.table > tbody > tr > td[data-name="status"] > span {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-family: var(--mm-cond);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 16px;
    padding: 3px 7px;
    border-radius: 4px;
    color: var(--mm-idle);
    background-color: var(--mm-idle-bg);
}

table.table > tbody > tr > td[data-name="status"] > span.text-success,
table.table > tbody > tr > td[data-name="status"] > span.label-success {
    color: var(--mm-ok);
    background-color: var(--mm-ok-bg);
}

table.table > tbody > tr > td[data-name="status"] > span.text-warning,
table.table > tbody > tr > td[data-name="status"] > span.label-warning {
    color: var(--mm-wip);
    background-color: var(--mm-wip-bg);
}

table.table > tbody > tr > td[data-name="status"] > span.text-danger,
table.table > tbody > tr > td[data-name="status"] > span.label-danger {
    color: var(--mm-err);
    background-color: var(--mm-err-bg);
}

table.table > tbody > tr > td[data-name="status"] > span.text-primary,
table.table > tbody > tr > td[data-name="status"] > span.label-primary,
table.table > tbody > tr > td[data-name="status"] > span.text-info,
table.table > tbody > tr > td[data-name="status"] > span.label-info {
    color: var(--mm-note);
    background-color: var(--mm-note-bg);
}


/* -----------------------------------------------------------------------------
   10. PANELS, DETAIL, FORM CONTROLS
   -----------------------------------------------------------------------------
   NOTE: `custom.css` owns the detail-view field boxes, the field labels
   (`.record .detail .label-text`) and every inline-edit affordance, and loads
   AFTER this file — so those keep the last word by design. Only the panel
   frame and the panel title are shaped here.
   -------------------------------------------------------------------------- */

.panel {
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-radius);
    box-shadow: none;
}

.panel > .panel-heading {
    font-family: var(--mm-cond);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mm-steel);
    background-color: transparent;
    border-bottom: 1px solid var(--mm-line);
}

.panel > .panel-heading .panel-title,
.panel > .panel-heading .panel-heading-title {
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* Form controls: one height, one radius, accent focus. */
.form-control {
    height: var(--mm-control-h);
    border-radius: var(--mm-radius-sm);
    box-shadow: none;
    font-size: 13.5px;
}

textarea.form-control {
    height: auto;
}

.form-control:focus {
    border-color: var(--mm-accent);
    box-shadow: none;
    outline: 0;
}

/* Input-group merging: the date-picker toggle and the link field's "^"/"x"
   buttons (`.input-group > .input-group-btn > .btn`) must read as part of the
   SAME control as the `.form-control` beside them.

   BUG FOUND, 2026-07-26 (the second half of the seam — height was the theme
   variable fixed in section 1). The trailing button's outer corner is rounded
   by the theme itself, at higher specificity than a plain `.btn`:
       autoerp.css  `.input-group>.input-group-btn:not(:first-child)>.btn:last-child
                     { border-top-right-radius: var(--border-radius);
                       border-bottom-right-radius: var(--border-radius) }`
   `--border-radius` is the theme's global PILL radius (25px) — the same one
   section 5 already fights on the search input — so every trailing button
   rendered as a half-circle notch. Matched here at equal specificity, restated
   in all four contexts `custom.css` styles `.form-control` in (edit, detail
   inline-edit, modal, fullscreen quotation dialog), since that is where these
   buttons actually appear.

   The background/border restate `custom.css`'s own field-box literals
   (`#F4F9FF` / `#B9D4F0`, `custom.css` ~line 78-82) rather than this file's own
   surface tokens, because the visible seam is a colour join against THAT
   box, not against a plain `.form-control`. debt: this duplicates two literals
   `custom.css` owns; ceiling is `custom.css`'s field-box colours changing
   without this file changing too. Upgrade path: `custom.css` exposes them as
   CSS variables this file can read instead of restating. */
.record .edit .input-group > .input-group-btn > .btn,
.record .detail .input-group > .input-group-btn > .btn,
.modal-body .input-group > .input-group-btn > .btn,
.dialog-fullscreen-quotation .input-group > .input-group-btn > .btn {
    background-color: #F4F9FF;
    border-color: #B9D4F0;
}

.record .edit .input-group > .input-group-btn:not(:first-child) > .btn:last-child,
.record .detail .input-group > .input-group-btn:not(:first-child) > .btn:last-child,
.modal-body .input-group > .input-group-btn:not(:first-child) > .btn:last-child,
.dialog-fullscreen-quotation .input-group > .input-group-btn:not(:first-child) > .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Required-field marker. AUDIT FINDING: `.required-sign` is a bare `<span>
   class="required-sign"> *</span>` sibling of `.label-text` inside
   `<label class="control-label">` — `custom.css` styles `.label-text` (11px,
   `#777`, weight 600) but has no rule for its sibling, so the asterisk falls
   back to the label's own inherited body size/colour and renders visibly
   larger and darker than the label it marks, on every required field
   (`Název stánku`, `Stav stánku`, `Primární měna`, `Projektový manažer`, …).
   Restated here at the same literals as `custom.css`'s label-text rule
   (`custom.css:178-184`) so the marker reads as part of the label rather
   than as stray dark text. */
.record .detail .required-sign,
.record .edit .required-sign,
.modal-body .required-sign {
    font-size: 11px;
    font-weight: 600;
    color: #777;
}


/* -----------------------------------------------------------------------------
   11. MODALS, DROPDOWNS, RECORD TABS
   -------------------------------------------------------------------------- */

.modal-content {
    border: 0 none;
    border-radius: var(--mm-radius);
    box-shadow: var(--modal-box-shadow);
    overflow: hidden;
}

.dropdown-menu {
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-radius-sm);
    box-shadow: var(--dropdown-box-shadow);
    padding: 4px;
}

.dropdown-menu > li > a {
    border-radius: 4px;
    padding: 6px 10px;
}

/* Record tabs ("Detail / Plán / Tabule / Gantt", "Přehled / Montáže / ...").
   DOM CORRECTION vs the draft: these are NOT `ul.nav-tabs` — `ul.nav-tabs`
   does not occur once on a record page in this build. They are
   `<div class="tabs middle-tabs btn-group"><button class="btn btn-text active">`,
   and the theme already draws the active underline as a `::after` pseudo-element
   (1px on the top row, 2px on the middle tabs). So only its colour changes here;
   the geometry is left to the theme. */
.btn.btn-text.active::after {
    background-color: var(--mm-accent);
}

.btn.btn-text.active {
    color: var(--mm-ink);
}


/* -----------------------------------------------------------------------------
   12. QUALITY FLOOR
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    #navbar li.tab > a.nav-link,
    #navbar li.tab > a.nav-link .short-label,
    #navbar .global-search-container .form-control.global-search-input,
    #navbar .navbar-right > ul > li > a,
    .btn,
    .list > table > tbody > tr.list-row {
        transition: none;
    }

    .btn:active,
    .btn.active {
        transform: none;
    }
}


/* -----------------------------------------------------------------------------
   13. NAVBAR ICON SET — Tabler, remapped onto the Font Awesome classes
   -----------------------------------------------------------------------------
   THE ASK
   The customer called the icons ugly and asked for THIN ones. Font Awesome 5/6
   FREE cannot deliver that: stroke weight is baked into the glyph outline, so no
   CSS thins it, and the Free tier ships no Light or Thin family at all.

   WHY NOT FA REGULAR (the zero-asset option)
   The theme does bundle `fa-regular-400.woff2`. Counted from
   `fa-regular-400.svg`: 151 glyphs — and of the 67 classes the sidebar rendered
   before this change, only NINE have a Regular cut (bookmark, building, calendar-check, comment-dots,
   credit-card, envelope, file-alt, file-code, id-card). The other 58 — pallet,
   warehouse, hard-hat, truck, store-alt, boxes-stacked, cash-register, … — are
   Solid-only. A nine-of-67 swap leaves the sidebar visibly half-thin and
   half-heavy, which is worse than leaving it alone.

   WHAT THIS IS INSTEAD
   Tabler Icons (MIT), the stroke-1.5 cut, SUBSET to the 86 glyphs this navbar
   actually uses: 11.6 KB, self-hosted next to the IBM Plex files (the full
   Tabler webfont is 453 KB / 5,175 glyphs; none of the rest ships).
   Rejected: Phosphor (1,530 glyphs, no forklift / building-warehouse /
   building-store — this domain is made of warehouse nouns) and Lucide (SVG only:
   it needs a template change, which this layer does not do).

   This REMOVES a network dependency rather than adding one. `autoerp.css:1`
   `@import`s Font Awesome 5.15.4 AND 6.5.1 from cdnjs.cloudflare.com, and five
   of the classes below (`fa-boxes-stacked`, `fa-folder-tree`, `fa-hard-hat`,
   `fa-phone-alt`, `fa-right-left`) are FA6 names absent from the LOCAL FA5 font
   — StockItem, StockCategory, InstallationEvent, Call and StockTransaction
   render an icon today only while cdnjs is reachable from the browser.

   SCOPE
   `#navbar` only — the tab column and the utility strip above it: 95 elements,
   86 distinct classes, all enumerated from the live DOM and all mapped below.
   Font Awesome classes are used app-wide on buttons, panels, fields, dropdowns
   and dashlets; those are deliberately untouched, because a blanket family
   override changes hundreds of icons in one step that cannot be verified in one
   pass.

   SAFETY NET
   The family list falls back to Font Awesome. Font matching is per GLYPH, so an
   `fa-` class that appears in some state this pass did not enumerate keeps its
   Font Awesome glyph instead of rendering tofu.

   VERIFICATION
   All 86 mappings were rendered side by side against their entity label before
   this shipped, and again in the live navbar. A wrong codepoint renders a
   plausible-but-wrong glyph — a box where a truck should be — which review does
   not catch.

   DELIBERATE SUBSTITUTIONS (no exact Tabler equivalent; flagged, not silent)
     Pallet            `ti-forklift`      Tabler has no pallet glyph. Forklift is
                                          the warehouse verb for one and sits next
                                          to Truck, so it reads immediately.
     Attendance        `ti-calendar-user` `ti-clock-user` does not exist.
     ProformaInvoice   `ti-file-pencil`   no `ti-file-signature`; a proforma is
                                          the draft document of that family.
     HumanResource     `ti-id-badge-2`    no `ti-user-tie`.
     Contact           `ti-address-book`  `ti-id` is a card with no person on it.
     "Clear cache"     `ti-brush`         no `ti-broom`.

   Icon colour and opacity stay where section 4 put them; only the family, the
   size and the codepoints are set here.
   -------------------------------------------------------------------------- */

/* PROVENANCE — `fonts/mm-icons.woff2` is not hand-made and is rebuildable:
       npm pack @tabler/icons-webfont@3.45.0        (MIT, LICENSE beside the font)
       pyftsubset dist/fonts/tabler-icons-300.ttf \
           --flavor=woff2 --layout-features= --no-hinting --desubroutinize \
           --unicodes=<the 86 codepoints listed below> \
           --output-file=mm-icons.woff2
   `-300` is the stroke-1.5 cut (the family also ships 200 = stroke 1, which
   turns to grey mush at the 17px this renders at, and the 2.0 default, which is
   not what "thin" meant). The codepoints ARE the map below — nothing else is
   needed to rebuild it. */
@font-face {
    font-family: 'MM Icons';
    font-style: normal;
    font-weight: 400;
    /* `block`, not `swap`: the fallback for a private-use codepoint is tofu, so a
       brief blank is right and a flash of boxes is not. 11.6 KB, same origin. */
    font-display: block;
    src: url(fonts/mm-icons.woff2) format('woff2');
}

/* Family. No type selector: the tab icons are `<span>` but the six admin
   actions in the top strip (log out, clear caches, rebuild, requirements, quick
   create) are `<i>`, and a `span`-qualified rule silently skipped them.
   Specificity (1,1,0) still beats Font Awesome's own `.fas` (0,1,0), and the two
   Font Awesome families stay in the list as the per-glyph safety net described
   above. */
#navbar [class*="fa-"] {
    font-family: 'MM Icons', 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 400;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* The icon column. `.short-label` is `position: absolute; left: 12px` in the
   theme and sizes to its content — 25px with an icon, 20px when a tab has no
   `iconClass` and Espo falls back to a two-letter `.short-label-text`. Holding
   it at one width means a future entity shipped without an icon cannot pull its
   row out of line (the five that did are fixed in `clientDefs` metadata; this is
   the guard, not the fix). The 20px box on the glyph itself centres every icon
   on one axis regardless of its own advance width. */
#navbar li.tab > a.nav-link .short-label {
    width: 25px;
    text-align: center;
}

#navbar li.tab > a.nav-link .short-label > span[class*="fa-"] {
    font-size: 17px;
    line-height: 1;
    display: inline-block;
    width: 20px;
    text-align: center;
}

/* The Home tab is the one icon the theme addresses by name:
       autoerp.css  `body[data-navbar=side] #navbar .navbar li.tab[data-name=Home]
                     .short-label > span:before { content: "\f015" }`
   at (1,5,4). A plain `#navbar span.fa-th-large::before` (1,1,2) loses to it and
   would leave one heavy house among 66 thin glyphs, so this one is restated at
   equal specificity — `body` stands in for their `body[data-navbar=side]`, which
   keeps the count identical without tying the rule to the navbar position. */
body #navbar .navbar li.tab[data-name="Home"] .short-label > span[class*="fa-"]::before {
    content: "\EDBA";
}

/* The map. One line per DISTINCT Font Awesome class the navbar renders; the
   comment names the Tabler glyph and what uses it. GENERATED, then verified by
   eye — never hand-edit a codepoint without re-rendering it. */
/* --- entity tabs --- */
#navbar .fa-th-large::before { content: "\EDBA"; }         /* ti-layout-grid — Home */
#navbar .fa-user-plus::before { content: "\EB4B"; }        /* ti-user-plus — Lead */
#navbar .fa-building::before { content: "\EA4F"; }         /* ti-building — Account */
#navbar .fa-id-card::before { content: "\F021"; }          /* ti-address-book — Contact */
#navbar .fa-file-invoice-dollar::before { content: "\EFE0"; } /* ti-file-dollar — Quotation, Quote, SupplierInvoice, WorkerInvoice */
#navbar .fa-file-contract::before { content: "\FEFB"; }    /* ti-contract — Contract */
#navbar .fa-ticket-alt::before { content: "\EB3D"; }       /* ti-ticket — Exhibition */
#navbar .fa-store-alt::before { content: "\EA4E"; }        /* ti-building-store — Project */
#navbar .fa-hard-hat::before { content: "\EFCA"; }         /* ti-helmet — InstallationEvent */
#navbar .fa-user-check::before { content: "\EB49"; }       /* ti-user-check — EventNomination */
#navbar .fa-bed::before { content: "\EB5C"; }              /* ti-bed — Accommodation */
#navbar .fa-cubes::before { content: "\EFA5"; }            /* ti-components — Assembly, EstComponent */
#navbar .fa-puzzle-piece::before { content: "\EB10"; }     /* ti-puzzle — Part */
#navbar .fa-boxes-stacked::before { content: "\F2C9"; }    /* ti-packages — StockItem */
#navbar .fa-right-left::before { content: "\F1F4"; }       /* ti-arrows-exchange — StockTransaction */
#navbar .fa-clipboard-list::before { content: "\EA6D"; }   /* ti-clipboard-list — MaterialRequest, Inventory, WorkRecord */
#navbar .fa-pallet::before { content: "\EBE9"; }           /* ti-forklift — Pallet */
#navbar .fa-truck::before { content: "\EBC4"; }            /* ti-truck — Truck */
#navbar .fa-file-invoice::before { content: "\EB67"; }     /* ti-file-invoice — Invoice */
#navbar .fa-credit-card::before { content: "\EA84"; }      /* ti-credit-card — VirtualCard */
#navbar .fa-exchange-alt::before { content: "\FC1F"; }     /* ti-transfer — BankTransaction, TransferRequest */
#navbar .fa-user-tie::before { content: "\F076"; }         /* ti-id-badge-2 — HumanResource */
#navbar .fa-user-clock::before { content: "\FD1F"; }       /* ti-calendar-user — Attendance */
#navbar .fa-file-alt::before { content: "\EAA2"; }         /* ti-file-text — Document, OstatnyDoklad */
#navbar .fa-funnel-dollar::before { content: "\F9FF"; }    /* ti-filter-dollar — Opportunity */
#navbar .fa-shopping-bag::before { content: "\F5F8"; }     /* ti-shopping-bag — SalesOrder */
#navbar .fa-list::before { content: "\EB6B"; }             /* ti-list — AllegroCodebook */
#navbar .fa-tasks::before { content: "\F074"; }            /* ti-checklist — Task */
#navbar .fa-clipboard-check::before { content: "\EA6C"; }  /* ti-clipboard-check — HandoverProtocol */
#navbar .fa-palette::before { content: "\EB01"; }          /* ti-palette — StandColor */
#navbar .fa-print::before { content: "\EB0E"; }            /* ti-printer — Printer */
#navbar .fa-list-ul::before { content: "\EF40"; }          /* ti-list-details — PrintJob */
#navbar .fa-folder-tree::before { content: "\FAFA"; }      /* ti-list-tree — StockCategory */
#navbar .fa-minus-circle::before { content: "\EA68"; }     /* ti-circle-minus — StockWriteOff */
#navbar .fa-warehouse::before { content: "\EBE3"; }        /* ti-building-warehouse — CustomerReservedItem */
#navbar .fa-cube::before { content: "\FA97"; }             /* ti-cube — LooseItem */
#navbar .fa-toolbox::before { content: "\EBCA"; }          /* ti-tools — Asset */
#navbar .fa-bookmark::before { content: "\EA3A"; }         /* ti-bookmark — AssetReservation */
#navbar .fa-file-download::before { content: "\EA9D"; }    /* ti-file-download — ReceivedProformaInvoice */
#navbar .fa-file-import::before { content: "\EDEA"; }      /* ti-file-import — ReceivedTaxDocument */
#navbar .fa-receipt::before { content: "\EDFD"; }          /* ti-receipt — ExpenseReceipt */
#navbar .fa-file-signature::before { content: "\F039"; }   /* ti-file-pencil — ProformaInvoice */
#navbar .fa-stamp::before { content: "\F5AB"; }            /* ti-rubber-stamp — IssuedTaxDocument */
#navbar .fa-undo-alt::before { content: "\EDFC"; }         /* ti-receipt-refund — CreditNote */
#navbar .fa-university::before { content: "\EBE2"; }       /* ti-building-bank — BankAccount */
#navbar .fa-money-bill-wave::before { content: "\EE25"; }  /* ti-cash-banknote — CashTransaction */
#navbar .fa-ban::before { content: "\EA2E"; }              /* ti-ban — UnreliablePayer */
#navbar .fa-graduation-cap::before { content: "\ECF7"; }   /* ti-school — EducationAndTrainingRecord */
#navbar .fa-user-shield::before { content: "\F7D0"; }      /* ti-user-shield — User */
#navbar .fa-users::before { content: "\EBF2"; }            /* ti-users — Team */
#navbar .fa-file-code::before { content: "\EBD0"; }        /* ti-file-code — Template */
#navbar .fa-envelope::before { content: "\EAE5"; }         /* ti-mail — Email */
#navbar .fa-calendar-check::before { content: "\F824"; }   /* ti-calendar-check — Meeting */
#navbar .fa-phone-alt::before { content: "\EB09"; }        /* ti-phone — Call */
#navbar .fa-coins::before { content: "\F65D"; }            /* ti-coins — BudgetItem */
#navbar .fa-file-upload::before { content: "\EC91"; }      /* ti-file-upload — ContractAmendment */
#navbar .fa-pen-fancy::before { content: "\EEE0"; }        /* ti-signature — ElectronicSignature */
#navbar .fa-check-double::before { content: "\EBAA"; }     /* ti-checks — DocumentApproval */
#navbar .fa-comment-dots::before { content: "\EAEE"; }     /* ti-message-dots — Comment */
#navbar .fa-shopping-basket::before { content: "\EBE1"; }  /* ti-basket — PurchaseInquiry */
#navbar .fa-shopping-cart::before { content: "\EB25"; }    /* ti-shopping-cart — PurchaseOrder */
#navbar .fa-cash-register::before { content: "\FEE6"; }    /* ti-cash-register — CashRegister */
#navbar .fa-sliders-h::before { content: "\EC38"; }        /* ti-adjustments-horizontal — WorkTimeType */
#navbar .fa-notes-medical::before { content: "\EECC"; }    /* ti-report-medical — MedicalExamination */
#navbar .fa-calculator::before { content: "\EB80"; }       /* ti-calculator — Estimate */
#navbar .fa-boxes::before { content: "\EE17"; }            /* ti-box-multiple — EstMaterial */
#navbar .fa-box-open::before { content: "\EAFF"; }         /* ti-package — Product */
#navbar .fa-tag::before { content: "\10096"; }             /* ti-tag — PriceListItem */
#navbar .fa-tags::before { content: "\EF86"; }             /* ti-tags — PriceListCategory */
#navbar .fa-folder::before { content: "\EAAD"; }           /* ti-folder — DocumentFolder */
#navbar .fa-percent::before { content: "\ECF4"; }          /* ti-percentage — SummaryVatRates */
#navbar .fa-check-circle::before { content: "\EA67"; }     /* ti-circle-check — VatNumberValidation */

/* --- navbar utility strip --- */
#navbar .fa-bars::before { content: "\EC42"; }             /* ti-menu-2 — hamburger / side-menu button */
#navbar .fa-ellipsis-h::before { content: "\EA95"; }       /* ti-dots — "more" tab group */
#navbar .fa-chevron-right::before { content: "\EA61"; }    /* ti-chevron-right — sidebar minimizer */
#navbar .fa-chevron-left::before { content: "\EA60"; }     /* ti-chevron-left — sidebar minimizer */
#navbar .fa-search::before { content: "\EB1C"; }           /* ti-search — global search */
#navbar .fa-question::before { content: "\EABF"; }         /* ti-help — help */
#navbar .fa-power-off::before { content: "\EB0D"; }        /* ti-power — log out */
#navbar .fa-eraser::before { content: "\EB8B"; }           /* ti-eraser — clear browser cache */
#navbar .fa-broom::before { content: "\EBB8"; }            /* ti-brush — clear cache */
#navbar .fa-hammer::before { content: "\EF91"; }           /* ti-hammer — rebuild */
#navbar .fa-server::before { content: "\EB1F"; }           /* ti-server — system requirements */
#navbar .fa-plus::before { content: "\EB0B"; }             /* ti-plus — quick create */
#navbar .fa-bell::before { content: "\EA35"; }             /* ti-bell — notifications */
#navbar .fa-ellipsis-v::before { content: "\EA94"; }       /* ti-dots-vertical — navbar menu */

/* Logo at 1.5x (customer request, 2026-07-26).
   The image renders 63x39 inside .navbar-brand, capped by max-height:100% of
   the brand box — so raising the height alone would just hit that cap. The cap
   is lifted and the box allowed to grow with it. */
#navbar .navbar .navbar-brand img.logo {
    height: 58px;
    max-height: none;
}

#navbar .navbar .navbar-brand {
    height: auto;
}

/* ── Kanban board — the home dashlet and the full-screen board ────────────────────────
   The board reads at a glance or it is decoration. Measured problems, in the order they
   hurt: the due date is `position: absolute` in the theme (`.field-right-align`), so it
   landed ON TOP of the stand name on every card with two lines of parent; each card
   repeated the priority even when it is the default "Normální"; and the column heads were
   pastel ribbons carrying 14px text at contrast the WCAG AA body-text threshold (4.5:1)
   does not accept.

   Kept, because they carry information: the status colour per column, the parent stand,
   the due date and its overdue red, and the same-parent tint that shows two cards belong
   to one stand. Dropped: the ribbon shape, the repeated default priority, and the pastel
   fills that made all eight columns look equally important. */

/* 1. The date is a line of its own, not an overlay. */
.list-kanban .item .field-right-align {
    /* !important because the theme pins this cell with `position: absolute; right: 0`
       at higher specificity — that absolute box is the overlap itself. */
    position: static !important;
    display: block !important;
    float: none !important;
    text-align: right;
}

/* 2. "Normální" on every card is noise; High and Urgent are the signal. The panel already
      carries the value as a class, so this needs no data change and no view code. */
.list-kanban .item .panel.priority-normal .field[data-name="priority"],
.list-kanban .item .panel.priority-low .field[data-name="priority"] {
    display: none;
}

/* 3. Column heads: flat, dark, readable. #24313E on #FBFCFD is 12.6:1 — AA and AAA for
      body text, where the pastel ribbons sat near 3:1. The status colour survives as the
      accent rule under the label, which is what the eye actually scans for.

      The ribbon is NOT drawn on `th.group-header`: measured in the browser, the `th` is
      transparent and the shape lives one level down —
      `frontend/less/espo/misc/kanban.less:24` fills `th.group-header > div` with
      `--label-default-bg` (or a `--brand-*` for the status variants), and the theme adds
      the two 20px arrow caps as `::before` / `::after` with `clip-path: polygon(…)`. So the
      fill, the chevron and the white text all have to be answered on that inner div — the
      earlier rule on the `th` alone changed nothing visible.

      Anchor: `.list-kanban`, the wrapper the record template always emits
      (`client/res/templates/record/kanban.tpl:30`). The earlier `.kanban` anchor matched
      NOTHING — no view emits that class — and the `.dashlet` twin restricted the same rules
      to dashboard boards, which is why the full-page board kept the pastel chevrons.
      One anchor covers both contexts. */
.list-kanban .group-header {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    clip-path: none !important;
}

.list-kanban th.group-header > div {
    background: var(--mm-surface-2) !important;
    color: var(--mm-ink-2) !important;
    border-radius: 0 !important;
    padding: 0 10px !important;
    /* The column's status colour, reduced from a full pastel fill to the rule under the
       label. Default is the neutral hairline; the variants below repaint just this line. */
    box-shadow: inset 0 -2px 0 var(--mm-line);
}

/* The chevron caps. Both are pure decoration — they carry no state the label does not. */
.list-kanban th.group-header > div::before,
.list-kanban th.group-header > div::after {
    display: none !important;
}

.list-kanban th.group-header-success > div { box-shadow: inset 0 -2px 0 var(--mm-ok); }

.list-kanban th.group-header-danger > div { box-shadow: inset 0 -2px 0 var(--mm-err); }

.list-kanban th.group-header-warning > div { box-shadow: inset 0 -2px 0 var(--mm-wip); }

.list-kanban th.group-header-primary > div,
.list-kanban th.group-header-info > div { box-shadow: inset 0 -2px 0 var(--mm-note); }

.list-kanban .group-header .kanban-group-label {
    color: var(--mm-ink-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* Collapse chevron and the "+" create button inherited `--text-white-color`, which was
   readable on the pastel ribbon and invisible on the flat head. */
.list-kanban .group-header .fas,
.list-kanban .group-header .create-button {
    color: var(--mm-steel-2) !important;
}

/* 4. Cards: one clear edge, room to breathe, and the same-parent tint reduced from a block
      of colour to the 3px rule it always meant to be. */
.list-kanban .item .panel {
    border: 1px solid var(--mm-line);
    border-radius: 6px;
    box-shadow: none;
    margin-bottom: 8px;
}

.list-kanban .item.kanban-same-parent .panel {
    border-left: 3px solid var(--same-parent-border-color, var(--mm-line));
}

.list-kanban .item .panel-body {
    padding: 10px 12px;
}

.list-kanban .item .field[data-name="name"] a {
    color: var(--mm-ink-2);
    font-weight: 600;
    line-height: 1.35;
}

.list-kanban .item .field[data-name="parent"] {
    font-size: 11px;
    color: var(--mm-steel);
    margin-top: 2px;
}

/* A card title is a headline, not a paragraph. Four columns inside a half-width dashlet
   leave ~150px per card, and a stand name ("drupa Düsseldorf 2026 – Králův Textil a.s.
   (15-C61) - request 2026-07-26 15:16") ran to six lines and pushed every other card off
   the visible area. Two lines, then ellipsis; the record is one click away. Long unbroken
   tokens (invoice numbers, IBANs) break instead of widening the column. */
.list-kanban .item .field[data-name="name"] a,
.list-kanban .item .field[data-name="name"] {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.list-kanban .item .field {
    overflow-wrap: anywhere;
}

/* One hairline between columns instead of four tinted lanes: the eye needs the boundary,
   not the colour. */
.list-kanban td.group-column + td.group-column {
    border-left: 1px solid var(--mm-line);
}

/* 5. The board must END inside its box. The dashlet body scrolls, so a card straddling the
      bottom edge is normal scrolling — but a column whose tint stops higher than its
      neighbour's reads as broken alignment, and a card sliced exactly at the frame reads as
      a rendering fault. Columns share one baseline, and the list gets bottom room so the
      last card closes before the frame instead of on it. */
.list-kanban td.group-column {
    vertical-align: top;
}

.list-kanban .group-column-list {
    padding-bottom: 10px;
}

/* ── Zebra rows ───────────────────────────────────────────────────────────────────────
   Wide tables (Smlouvy carries eleven columns, several of them wrapping to three lines)
   lose the eye between "Partner" and "Cena" on the same row. One tint every other row is
   the cheapest fix there is, and it stays out of the way of everything that already means
   something: hover, the checked row and the pink "current" marker all paint over it.

   #F6F8FA against white is a ~1.05:1 step: visible when the eye tracks across eleven
   columns, gone when it reads one. `--mm-surface-2` was tried first and measured 1.02:1 —
   invisible at a glance, which is the same as not doing it. Text contrast is untouched, so
   every AA/AAA ratio measured for this theme still holds. It is a background, not
   information: nothing here encodes state. */
.list > table > tbody > tr:nth-of-type(even) > td,
.list-container .list > table > tbody > tr:nth-of-type(even) > td {
    background-color: #F6F8FA;
}

/* Hover and selection must outrank the stripe, or a striped row would look "less
   selected" than its neighbour. */
.list > table > tbody > tr:hover > td,
.list > table > tbody > tr.list-row:hover > td {
    background-color: var(--mm-accent-pale) !important;
}

.list > table > tbody > tr.checked > td,
.list > table > tbody > tr.list-row.checked > td {
    background-color: var(--mm-accent-pale) !important;
}

/* ── Record header actions: the glyph, and the word on hover ──────────────────────────
   The strip above the view-mode tabs carried up to five full-width labelled buttons
   ("Synchronizovat s Allegrem", "Vytvořit výrobní příkazy", "Generovat Revolut kartu",
   "Nový Pre-estimate"), each in its own semantic colour — measured 211 + 192 + 199 + 157
   px of coloured chrome above a record whose own actions ("Upravit") sit one row lower in
   plain grey. The theme's only answer is `max-width` with an ellipsis
   (`.page-header .header-buttons>.btn`), which truncates the words instead of the noise.

   These buttons ship a glyph — `menu.detail.buttons[].iconHtml` renders `<i class="fas fa-…">`
   (the core follow button uses `<span class="fas">`, hence both in the `:has()`), followed by
   `<span>` with the label. So the label is IN the DOM and needs no `title` attribute and no
   JS: it moves out of the flow and comes back on hover as the tooltip. Nothing about
   behaviour, ACL or visibility changes — a button that was hidden is still hidden.

   BUT NOT EVERY header action has a glyph. Measured 2026-07-27 on `#SupplierInvoice`:
   „Šablony" and „Import z Allegro" carry no icon element at all, and the earlier
   unconditional rule squeezed them into 34px blank circles — a control with no label and no
   glyph, which is worse than the pill it replaced. Hence `:has()`: the icon-only treatment
   applies only where an icon exists to carry the meaning; a glyphless action keeps its word.
   `unfollow` is listed explicitly because its glyph comes from our own `::before`, not from
   a child element `:has()` could see.

   The colour moves from the fill to the glyph. Five saturated pills read as five warnings;
   one quiet row of squares with a coloured mark reads as what it is — a toolbar. The
   list-header create action keeps its magenta pill and its word: it is the primary action
   of that screen, not a toolbar item. */
.page-header .header-buttons > .btn.main-header-manu-action:not([data-action="create"]):not([data-action="quickCreate"]):has(> i[class*="fa-"], > span[class*="fa-"]),
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"] {
    position: relative;
    width: var(--mm-control-h);
    min-width: var(--mm-control-h);
    max-width: none;
    padding: 0;
    text-align: center;
    /* the theme sets `overflow: hidden` here, which would clip the tooltip away */
    overflow: visible;
    background-color: var(--mm-surface);
    border: 1px solid var(--mm-line);
    color: var(--mm-steel);
}

.page-header .header-buttons > .btn.main-header-manu-action:not([data-action="create"]):not([data-action="quickCreate"]):has(> i[class*="fa-"], > span[class*="fa-"]):hover,
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"]:hover {
    background-color: var(--mm-accent-pale);
    border-color: var(--mm-accent);
    color: var(--mm-accent-d);
}

.page-header .header-buttons > .btn.main-header-manu-action > i[class*="fa-"],
.page-header .header-buttons > .btn.main-header-manu-action > span[class*="fa-"] {
    font-size: 14px;
    line-height: calc(var(--mm-control-h) - 2px);
}

/* The glyph keeps the meaning the fill used to carry. */
.page-header .header-buttons > .btn.btn-primary.main-header-manu-action > i[class*="fa-"] { color: var(--mm-accent); }
.page-header .header-buttons > .btn.btn-warning.main-header-manu-action > i[class*="fa-"] { color: var(--mm-wip); }
.page-header .header-buttons > .btn.btn-danger.main-header-manu-action  > i[class*="fa-"] { color: var(--mm-err); }
.page-header .header-buttons > .btn.btn-success.main-header-manu-action > i[class*="fa-"],
.page-header .header-buttons > .btn.btn-success.main-header-manu-action::before { color: var(--mm-ok); }

.page-header .header-buttons > .btn.main-header-manu-action:hover > i[class*="fa-"],
.page-header .header-buttons > .btn.main-header-manu-action:hover > span[class*="fa-"] {
    color: var(--mm-accent-d);
}

/* The label, parked below the button until the pointer or the keyboard asks for it. */
.page-header .header-buttons > .btn.main-header-manu-action:not([data-action="create"]):not([data-action="quickCreate"]):has(> i[class*="fa-"], > span[class*="fa-"]) > span:not([class]),
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"] > span:not([class]) {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-3px);
    z-index: 1030;
    padding: 4px 8px;
    border-radius: var(--mm-radius-sm);
    background-color: var(--mm-ink);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
}

.page-header .header-buttons > .btn.main-header-manu-action:not([data-action="create"]):not([data-action="quickCreate"]):has(> i[class*="fa-"], > span[class*="fa-"]):hover > span:not([class]),
.page-header .header-buttons > .btn.main-header-manu-action:not([data-action="create"]):not([data-action="quickCreate"]):has(> i[class*="fa-"], > span[class*="fa-"]):focus-visible > span:not([class]),
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"]:hover > span:not([class]),
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"]:focus-visible > span:not([class]) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* "Sledováno" is the only one of these that ships no glyph — core renders the followed
   state as a bare green word — so it gets the same rss mark as "Sledovat" and the state
   stays in the colour. Font Awesome, not `MM Icons`: that subset is Tabler in the private
   use area and carries no `\f09e`. */
.page-header .header-buttons > .btn.main-header-manu-action[data-action="unfollow"]::before {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f09e';
    font-size: 14px;
    line-height: calc(var(--mm-control-h) - 2px);
}

/* ── Kanban cards: one anchor, then context ───────────────────────────────────────────
   Measured before: all four lines rendered at 12px / 400, two of them in the same steel,
   and every link carried the dotted rule from our own list-link style. Four equal lines
   means no entry point — the eye lands nowhere and re-reads the card.

   The scale keys ONLY on what is true on every board: the first field is the record link
   (all five kanban layouts start with `name`), the remaining left-aligned fields are
   context, and the right-aligned ones are the value column. It deliberately does NOT read
   `.text-muted` or guess which field is money — the first attempt did, and it broke the
   Task board on contact with reality: `dateEnd` there is right-aligned and NOT muted, so
   the "this is the amount" rule blew the due date up to 15px and repainted `.text-danger`
   overdue red into plain ink. A rule that has to know what each entity means is per-entity
   CSS wearing a generic selector.

   So: colour on the value column is never touched here. Overdue red, muted grey and every
   other state class keep working, and emphasis is carried by weight and tabular figures.

   Contrast: ink-2 #24313E on white is 13.6:1, steel #5C6B7C 5.6:1 — both AA at these
   sizes. `--mm-steel-2` (#7B8896, 3.8:1) is deliberately unused: it fails AA this small.

   Specificity: the theme pins card text twice — once at
   `div.list-kanban > div > table .item .panel .form-group .field` and again, higher, at
   `.dashlet[data-name="Kanban"] div.list-kanban > … .field`. Nothing reasonable outranks
   the second, so the four `font-size` declarations carry `!important` and nothing else
   does. */

/* The dotted link rule is OURS (`#main a.link`) and earns its keep in a table, where a
   link must announce itself among plain cells. On a card every line is a link target, so
   the rules are just texture. `#main` appears here for specificity only. */
#main .item .panel-body .field a {
    border-bottom: 0 none;
}

/* 1. The anchor: what this card IS.

   Keyed on the card's first row, not on `.form-group:first-child` — measured, the row
   holding the title ALSO holds the row-menu caret, so the title's `.form-group` is the
   second child there and `:first-child` silently selected the priority and the stand
   instead. The row wrapper is the stable hook: `.panel-body > div` in layout order. */
.item .panel-body > div:first-child .field,
.item .panel-body > div:first-child .field a {
    font-size: 13px !important;
    font-weight: 650;
    color: var(--mm-ink-2);
    letter-spacing: -.1px;
}

/* 2. Context lines — stand, supplier, priority. Present, not competing. */
.item .panel-body > div:not(:first-child) .field:not(.field-right-align),
.item .panel-body > div:not(:first-child) .field:not(.field-right-align) a {
    font-size: 12px !important;
    font-weight: 400;
    color: var(--mm-steel);
}

/* 3. The value column: amount, due date, whatever the layout right-aligns. Weight and
      tabular figures carry the emphasis; the colour belongs to the field's own state. */
.item .panel-body .field.field-right-align {
    margin-top: 6px;
    font-size: 12px !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.item .panel-body .field.field-right-align.text-muted {
    margin-top: 2px;
    font-weight: 500;
}

/* The stand colour is already the card's left edge (`.item.kanban-same-parent`), and the
   theme paints it a SECOND time as a 20×10 chip in the top-right corner
   (`.panel-body::after`, measured). One fact, two marks, and the chip is the one that
   collides with the row-menu caret. The edge stays; the chip goes. */
.list-kanban .item.kanban-same-parent .panel-body::after {
    /* the theme draws it at `div.list-kanban .kanban-same-parent .panel-body:after`
       — three classes plus a type selector, so the class here is what wins */
    display: none;
}
