/* ========================================
   AntDesign Override CSS
   This file MUST load after ant-design-blazor.css
   Using custom .mlekerp-menu class for maximum specificity
   ======================================== */

/* ========================================
   Global Text + Icon Color Defaults — TASK_04 systemic fix.
   AntDesign's bundled CSS sets `body { color: rgba(0, 0, 0, 0.85) }` which
   leaks light-theme text into any element rendered outside an AntDesign
   component class chain. We override here (loads AFTER ant-design-blazor.css)
   so every text element on a dark surface inherits white/secondary by default.
   Component-specific rules later in this file remain authoritative.
   ======================================== */
body {
    color: var(--text-primary);
    font-family: var(--font-body);
    /* Body text 15px / 1.5 (I-051 AD-6, prototype F body; Evidens I-041 Decision 9, I-048). AntD's body rule sets 14px
       and loads before this sheet; its components (controls, tables, menu, cards) set their own 14px, as F does */
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

/* B-051 AD1: AntD's link colours (#1890ff / #40a9ff / #096dd9, plain and inside Typography) load after app.css, so
   the brand link colours live here. Equal specificity, later sheet wins — no !important. */
a,
a.ant-typography,
.ant-typography a {
    color: var(--color-primary);
}

/* Loading last, the bare a:hover / a:active (0,1,1) also beat AntD's later equal-specificity anchor colours that have no
   :hover / :active counterpart of their own — a[disabled] and .ant-radio-button-wrapper a (.ant-tabs-tab-disabled a is
   pointer-events: none) — so those (and the .chip-danger / .chip-muted anchors, which keep their own colour) are excluded inside :where() (zero specificity: the rule stays (0,1,1) and still
   beats AntD's own a:hover).
   B-054 run 14, measured: do NOT add `[class]` to this guard. AntD's own `a:hover { color: #40a9ff }` is also (0,1,1)
   and beats any single-class anchor colour (0,1,0), so excluding classed anchors does not hand them their own colour —
   it hands them AntD blue (a.status-indicator and the pagination jump link on /design-system went from the brand light
   colour to rgb(64, 169, 255)). A class that needs its own hover colour sets it with a `.cls:hover` rule ((0,2,0) beats
   both) — the chip anchors below do (the template pins it with E2E CssFoundation_ClassedAnchor_ShouldNotFallBackToAntdBlueOnHover). */
a:hover:where(:not([disabled], .chip-danger, .chip-muted, .ant-radio-button-wrapper a)),
a:active:where(:not([disabled], .chip-danger, .chip-muted, .ant-radio-button-wrapper a)),
a.ant-typography:hover,
.ant-typography a:hover,
a.ant-typography:focus-visible,
.ant-typography a:focus-visible,
a.ant-typography:active,
.ant-typography a:active {
    color: var(--color-primary-text);
}

/* The chip anchors excluded above keep their own colour on hover / press: without these (0,2,1) rules AntD's
   a:hover (0,1,1) beats the chips' (0,1,0) colour and turns them #40a9ff (B-054 run 14 port re-check). */
a.chip-danger:hover,
a.chip-danger:active {
    color: var(--color-error);
}

a.chip-muted:hover,
a.chip-muted:active {
    color: var(--text-muted);
}

.anticon,
.material-icons {
    color: currentColor;
}

/* ========================================
   Sidebar Navigation - Override AntDesign Blue
   Using custom class + AntDesign selectors for MAXIMUM specificity
   ======================================== */

/* HIGHEST SPECIFICITY: Custom class + doubled AntDesign class + element */
ul.mlekerp-menu.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) li.ant-menu-item-selected,
ul.mlekerp-menu.ant-menu.ant-menu-dark .ant-menu-item-selected,
.mlekerp-menu.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected,
.mlekerp-menu.ant-menu.ant-menu-dark .ant-menu-item-selected {
    background-color: var(--color-nav-active-bg) !important;
    color: var(--color-nav-active) !important;
}

/* Override selected item text color */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item-selected {
    color: var(--color-nav-active) !important;
    border-right: 0;
}

/* Override link colors inside selected item */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected > a,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected > span > a,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected > a:hover,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected > span > a:hover,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item-selected a {
    color: var(--color-nav-active) !important;
}

/* Override icon colors inside selected item */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .anticon,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item-selected .anticon {
    color: var(--color-nav-active) !important;
}

/* Override icon + span colors */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon + span,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .anticon + span,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item-selected span {
    color: var(--color-nav-active) !important;
}

/* Override menu title content */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content a,
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content span {
    color: var(--color-nav-active) !important;
}

/* Override SVG fill */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected svg,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item-selected svg {
    fill: var(--color-nav-active) !important;
}

/* Quad class specificity for extra safety */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item.ant-menu-item-selected,
ul.mlekerp-menu.ant-menu.ant-menu-root.ant-menu-dark li.ant-menu-item.ant-menu-item-selected {
    background-color: var(--color-nav-active-bg) !important;
    color: var(--color-nav-active) !important;
}

ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item.ant-menu-item-selected .anticon,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item.ant-menu-item-selected a,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item.ant-menu-item-selected span {
    color: var(--color-nav-active) !important;
}

/* ========================================
   Menu Item Styling - Border Radius, Height, Indicator
   ======================================== */

/* Menu container - constrain overflow. F .nav (I-051 AD-4): 8px in from the sidebar, 4px above the first row, 16px
   below the last */
.mlekerp-menu.ant-menu,
ul.mlekerp-menu.ant-menu {
    overflow: hidden !important;
    padding: 4px 8px 16px !important;
}

/* All menu items - F .nav a (I-051 AD-4, values from Evidens I-041): 14px / 500, 40px, 8px radius, 2px apart, as wide
   as the menu */
.mlekerp-menu.ant-menu-dark .ant-menu-item,
ul.mlekerp-menu.ant-menu.ant-menu-dark .ant-menu-item,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item {
    border-radius: 8px !important;
    /* min-height, not height, and a unitless-ish line-height (F-213): labels wrap to a
       second line, and a fixed height here would leave the inherited line-height
       rendering a double-height span inside the box, overlapping the neighbouring items.
       Vertical centring does not depend on line-height — AntDesign already sets
       display:flex + align-items:center on inline root items. */
    min-height: 40px !important;
    line-height: 1.4 !important;
    font-size: 14px;
    font-weight: 500;
    margin: 2px 0 !important;
    width: 100% !important;
    transition: all 150ms ease !important;
}

/* F .nav a: 12px in on both sides. AntDesign writes the inline indent as a style attribute, hence !important; the
   icon rail (inline-collapsed) keeps AntDesign's centring */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline:not(.ant-menu-inline-collapsed) li.ant-menu-item {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Selected item: F's tinted ground and the nav-active text (the rules above), no indicator bar (I-051 AD-4) */

/* Hide the default right border indicator */
.mlekerp-menu.ant-menu-dark .ant-menu-item-selected::after,
ul.mlekerp-menu.ant-menu.ant-menu-dark .ant-menu-item-selected::after {
    display: none !important;
    border-right: none !important;
}

/* ========================================
   Nav Menu — full label visibility (F-213)

   AntDesign truncates inline menu labels in two places:
     .ant-menu-inline .ant-menu-item              → overflow:hidden; text-overflow:ellipsis
     .ant-menu-inline.ant-menu-root .ant-menu-item > .ant-menu-title-content
                                                  → min-width:0; overflow:hidden; text-overflow:ellipsis
   Serbian nav labels run to 24 chars ("Predlozi funkcionalnosti"), which no
   reasonable sidebar width fits at indent level 3. Let them wrap instead of
   cutting them. The item's min-height/line-height are set in the height block
   above, NOT here: that block's `ul...li.ant-menu-item` selector outranks these
   (0-5-2 vs 0-4-0), so setting them here would silently lose the cascade.

   Scoped to :not(.ant-menu-inline-collapsed) deliberately: collapsed mode hides
   labels with `opacity: 0` while leaving them IN FLOW, so wrapping there would
   grow every 80px icon tile to multi-line height.
   ======================================== */
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-item,
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-submenu-title {
    height: auto !important;
    min-height: 40px !important;
    line-height: 1.4 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

/* Same declarations at a specificity that outranks the height block's
   `ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item` (0-5-2),
   so a wrapped item actually grows instead of inheriting a fixed height. */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline:not(.ant-menu-inline-collapsed) li.ant-menu-item {
    height: auto !important;
    min-height: 40px !important;
    line-height: 1.4 !important;
}

/* AntDesign Blazor 1.6.0 wraps the icon AND the label in a single
   .ant-menu-title-content span, which is the item's only child — verified in the
   DOM on 2026-09-22, so a `> span` companion selector would be pure duplication. */
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-title-content {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: break-word;
}

/* Wrapped labels keep a hanging indent (I-010): the icon is a fixed flex column
   and the label a growing one, so a label's second line starts under its first
   line rather than back under the icon. Covers the item anchor (icon + label
   inside .ant-menu-title-content > a) and the submenu title (TitleTemplate
   content inside .ant-menu-title-content) — AntDesign Blazor 1.6.0 DOM, checked
   via a bUnit render on 2026-10-02. */
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-title-content > a,
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-submenu-title > .ant-menu-title-content {
    display: flex !important;
    align-items: center;
    min-width: 0;
}

.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-title-content > a > .anticon,
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-submenu-title > .ant-menu-title-content > .anticon {
    flex: none;
}

.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-title-content > a > .anticon + span,
.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-submenu-title > .ant-menu-title-content > .anticon + span {
    flex: 1 1 auto;
    min-width: 0;
}

/* F .nav a svg (I-051 AD-4): an 18px icon, 12px before the label — in the labelled menu and in the icon rail */
.mlekerp-menu.ant-menu .ant-menu-item .anticon {
    font-size: 18px !important;
}

.mlekerp-menu.ant-menu:not(.ant-menu-inline-collapsed) .ant-menu-title-content > a > .anticon + span {
    margin-left: 12px;
}

/* ========================================
   Sidebar & Menu - Full Glassy Dark Theme
   ======================================== */

/* Sidebar container - matches main app dark theme with subtle orange tint */
.main-sider.ant-layout-sider,
.main-sider.ant-layout-sider-dark,
aside.main-sider.ant-layout-sider,
aside.main-sider.ant-layout-sider-dark,
.ant-layout-sider.main-sider,
.ant-layout-sider-dark.main-sider {
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-dark-secondary) 100%) !important;
    border-right: 1px solid var(--color-fg-08) !important;
}

/* Sider children container — flex column that owns the scroll-pin trio:
   children flex-column + min-height:0 + overflow:hidden lets the inner <nav>
   shrink correctly. */
.main-sider .ant-layout-sider-children,
aside.main-sider .ant-layout-sider-children {
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Sidebar scroll formula (F-174 — lifted from mlekerp). The <nav> child owns
   the actual scroll; the logo and the chooser stay pinned outside the scroll region. */
.main-sider .ant-layout-sider-children > nav,
aside.main-sider .ant-layout-sider-children > nav,
.main-sider .main-sider-body > nav {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-fg-15) transparent;
}

.main-sider .ant-layout-sider-children > nav::-webkit-scrollbar,
.main-sider .main-sider-body > nav::-webkit-scrollbar {
    width: 6px;
}

.main-sider .ant-layout-sider-children > nav::-webkit-scrollbar-track,
.main-sider .main-sider-body > nav::-webkit-scrollbar-track {
    background: transparent;
}

.main-sider .ant-layout-sider-children > nav::-webkit-scrollbar-thumb,
.main-sider .main-sider-body > nav::-webkit-scrollbar-thumb {
    background: var(--color-fg-12);
    border-radius: 3px;
    transition: background var(--transition-base);
}

.main-sider .ant-layout-sider-children > nav::-webkit-scrollbar-thumb:hover,
.main-sider .main-sider-body > nav::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-primary-rgb), 0.4);
}

/* Override AntDesign's default dark sider background - MAXIMUM SPECIFICITY */
.ant-layout-sider.ant-layout-sider-dark.main-sider,
aside.ant-layout-sider.ant-layout-sider-dark.main-sider,
aside.main-sider.ant-layout-sider.ant-layout-sider-dark,
aside.main-sider.ant-layout-sider.ant-layout-sider-dark.ant-layout-sider-has-trigger,
.ant-layout-has-sider aside.main-sider,
section.ant-layout aside.main-sider {
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-dark-secondary) 100%) !important;
    border-right: 1px solid var(--color-fg-08) !important;
}

/* Menu container - transparent to show sider background */
.mlekerp-menu.ant-menu-dark,
.mlekerp-menu.ant-menu.ant-menu-dark,
.mlekerp-menu.ant-menu-dark.ant-menu-inline,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline {
    background: transparent !important;
    flex: 1;
}

/* ========================================
   NON-SELECTED Menu Items - Override AntDesign Blue
   Using high specificity with mlekerp-menu class
   ======================================== */

/* Non-selected items - base styling (exclude selected). F --sider-text: the island's secondary text (.78) */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected),
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected),
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) {
    color: var(--text-secondary) !important;
    background: transparent !important;
    margin: 2px 0 !important;
    border-radius: 8px !important;
    transition: all 150ms ease !important;
}

/* Non-selected items - icons */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected) .anticon,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected) .anticon,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .anticon {
    color: var(--text-secondary) !important;
}

/* Non-selected items - links and text */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected) a,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected) span,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected) a,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected) span,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) a,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) span,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content {
    color: var(--text-secondary) !important;
}

/* Non-selected items - HOVER state (glassy) */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected):hover,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected):hover,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected):hover {
    background: var(--color-fg-08) !important;
    color: var(--text-primary) !important;
}

ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected):hover .anticon,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected):hover a,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item:not(.ant-menu-item-selected):hover span,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected):hover .anticon,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected):hover a,
ul.mlekerp-menu.ant-menu-dark li.ant-menu-item:not(.ant-menu-item-selected):hover span,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected):hover .anticon,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected):hover a,
.mlekerp-menu.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected):hover span {
    color: var(--text-primary) !important;
}

/* ========================================
   Grouped Navigation (I-024) - SubMenu toggle, static group heading, items in a group
   Everything under the .mlekerp-menu marker class, so no other menu changes.
   Own classes (.nav-group-count, .nav-badge, .nav-rail-divider) are in app.css.
   ======================================== */

/* A group's list sits on the sider ground, not on AntDesign's darker inset panel */
.mlekerp-menu.ant-menu-dark .ant-menu-sub.ant-menu-inline,
ul.mlekerp-menu.ant-menu.ant-menu-dark ul.ant-menu-sub.ant-menu-inline {
    background: transparent !important;
}

/* Group toggle (SubMenu title) and static group heading (MenuItemGroup title): one typography */
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-submenu > .ant-menu-submenu-title,
.mlekerp-menu.ant-menu-dark .ant-menu-item-group-title {
    height: auto !important;
    line-height: 1.35 !important;
    color: var(--color-nav-muted) !important;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* The toggle: F .nav-toggle — 30px, 4px in from the menu and 8px of its own, so the title lines up with the item
   icons; AntDesign's inline indent is replaced. The right padding leaves the chevron its room */
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-submenu > .ant-menu-submenu-title {
    display: flex !important;
    align-items: center !important;
    min-height: 30px !important;
    width: calc(100% - 8px) !important;
    margin: 10px 4px 2px !important;
    padding: 0 30px 0 8px !important;
    border-radius: 6px !important;
    background: transparent !important;
    transition: all 150ms ease !important;
}

.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title:hover,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-submenu > .ant-menu-submenu-title:hover {
    background: var(--color-fg-08) !important;
    color: var(--text-primary) !important;
}

/* Title text on the left, the item count (.nav-group-count) pushed to the chevron */
.mlekerp-menu.ant-menu .ant-menu-submenu-title > .ant-menu-title-content {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* A title longer than the row gives way to its count: the text ellipsises, the count stays beside the chevron */
.mlekerp-menu.ant-menu .ant-menu-submenu-title > .ant-menu-title-content > :first-child {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chevron: the title's colour. AntDesign turns it from down to up when the group opens. */
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow {
    right: 12px !important;
    color: inherit !important;
    opacity: 1 !important;
}

.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow::before,
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow::after {
    background: currentColor !important;
}

/* Static group heading: F .nav-group */
.mlekerp-menu.ant-menu-dark .ant-menu-item-group-title {
    margin: 14px 12px 4px;
    padding: 0 !important;
}

/* Items in a group: F .nav-sub a — 36px, the top-level item's 12px indent, no extra one */
.mlekerp-menu.ant-menu-dark .ant-menu-sub .ant-menu-item,
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline ul.ant-menu-sub li.ant-menu-item {
    min-height: 36px !important;
    padding: 6px 12px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

/* Selected item in a group (the list of a SubMenu, the inner list of a MenuItemGroup): the look of a root-level
   selected item. The rules above use descendant combinators and reach it; these forms pin it against
   AntDesign's own .ant-menu-sub rules. */
ul.mlekerp-menu.ant-menu.ant-menu-dark ul.ant-menu-sub > li.ant-menu-item.ant-menu-item-selected,
ul.mlekerp-menu.ant-menu.ant-menu-dark ul.ant-menu-item-group-list > li.ant-menu-item.ant-menu-item-selected {
    background-color: var(--color-nav-active-bg) !important;
    color: var(--color-nav-active) !important;
}

/* Count pill on an item: the item rules above colour every span in an item and stretch the label span, so the
   pill takes back its ink and its size here */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-item a > span.nav-badge.nav-badge {
    flex: none;
    min-width: 20px;
    margin-left: 8px;
    color: var(--color-on-attention) !important;
}

/* A link that carries a pill fills the item, so the pill reaches the right edge */
.mlekerp-menu.ant-menu .ant-menu-item .ant-menu-title-content > a:has(> .nav-badge) {
    flex: 1 1 auto;
}

/* Beside a pill a label still wraps between words; a single word longer than the room ellipsises instead of
   running under the pill */
.mlekerp-menu.ant-menu .ant-menu-item .ant-menu-title-content > a:has(> .nav-badge) > span:not(.anticon):not(.nav-badge) {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Keyboard focus: the ring on the toggle and on the item that holds the focused link */
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title:focus-visible,
.mlekerp-menu.ant-menu-dark .ant-menu-submenu-title:has(.nav-group-toggle:focus-visible),
.mlekerp-menu.ant-menu-dark .ant-menu-item:focus-visible,
.mlekerp-menu.ant-menu-dark .ant-menu-item:has(a:focus-visible) {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.mlekerp-menu.ant-menu-dark .ant-menu-item a:focus-visible {
    outline: none;
}

/* Touch targets at <=480px: the group toggle and every item are 44px high, like every other control (F's 40 / 36px rows
   are desktop sizes) */
@media (max-width: 480px) {
    ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline:not(.ant-menu-inline-collapsed) li.ant-menu-item,
    .mlekerp-menu.ant-menu-dark .ant-menu-submenu-title,
    ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline li.ant-menu-submenu > .ant-menu-submenu-title,
    .mlekerp-menu.ant-menu-dark .ant-menu-sub .ant-menu-item,
    ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline ul.ant-menu-sub li.ant-menu-item {
        min-height: 44px !important;
    }
}

/* Icon rail outside an AntDesign Sider (AntDesign fixes a collapsed menu at 80px; in a Sider it is already auto) */
.mlekerp-menu.ant-menu.ant-menu-inline-collapsed {
    width: auto;
}

/* Rail items are as high as labelled top-level items: AntDesign gives a collapsed item's icon a 40px line box,
   which the item's own padding would stack on */
.mlekerp-menu.ant-menu.ant-menu-inline-collapsed > .ant-menu-item .anticon {
    line-height: 1;
}

/* A collapsible group's rows in the rail are 36px, as in the labelled menu (F .rail .nav-sub a); plain rows and the
   rows under a static heading keep 40px (I-051 TASK_05). NavMenu marks the 36px ones .nav-rail-sub */
ul.mlekerp-menu.ant-menu.ant-menu-dark.ant-menu-inline-collapsed > li.ant-menu-item.nav-rail-sub {
    min-height: 36px !important;
    height: 36px;
}

/* Shell modes (I-024). The sidebar is fixed, so the content keeps a left margin as wide as the sidebar the layout
   shows. B-009: these rules name .ant-layout-* and so live here, not in MainLayout.razor.css. The two breakpoints are
   the ones of ShellModes (App/Services/Layout) and they are media queries, so the first paint is right before the
   viewport is measured. !important on the widths: an AntDesign Sider carries its width as an inline style. */
.main-sider ~ .content-layout {
    margin-left: var(--sider-width);
    transition: margin-left 0.2s;
}

.main-sider.ant-layout-sider-collapsed ~ .content-layout {
    margin-left: var(--sider-rail-width);
}

/* Over the content the sidebar slides in (app.css); its width does not animate as well */
.main-sider.main-sider--overlay {
    transition: none;
}

/* 641-999px: the icon rail - also while the labelled sidebar is open over the content, which it covers and does
   not push */
@media (max-width: 999.98px) {
    .main-sider:not(.main-sider--overlay) {
        flex: 0 0 var(--sider-rail-width) !important;
        width: var(--sider-rail-width) !important;
        min-width: var(--sider-rail-width) !important;
        max-width: var(--sider-rail-width) !important;
    }

    .main-sider ~ .content-layout {
        margin-left: var(--sider-rail-width);
    }
}

/* 640px and narrower: no rail; the sidebar exists only as the overlay */
@media (max-width: 640px) {
    .main-sider:not(.main-sider--overlay) {
        display: none;
    }

    .main-sider ~ .content-layout,
    .main-sider.ant-layout-sider-collapsed ~ .content-layout {
        margin-left: 0;
    }
}

/* Remove the default blue right border */
.main-sider .ant-menu-item-selected::after,
.ant-menu-dark .ant-menu-item-selected::after,
.ant-menu.ant-menu-dark .ant-menu-item-selected::after {
    border-right-color: transparent !important;
    display: none !important;
}

/* Hover state */
.main-sider .ant-menu-dark .ant-menu-item:hover,
.ant-menu-dark .ant-menu-item:hover:not(.ant-menu-item-selected) {
    color: var(--text-primary) !important;
}

.main-sider .ant-menu-dark .ant-menu-item:hover .anticon,
.ant-menu-dark .ant-menu-item:hover:not(.ant-menu-item-selected) .anticon {
    color: var(--text-primary) !important;
}

/* Non-selected items - default styling */
.main-sider .ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content,
.main-sider .ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content a,
.main-sider .ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) a,
.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content,
.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .ant-menu-title-content a,
.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) a {
    color: var(--color-fg-70) !important;
}

.main-sider .ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .anticon,
.ant-menu-dark .ant-menu-item:not(.ant-menu-item-selected) .anticon {
    color: var(--color-fg-70) !important;
}

/* ========================================
   Dropdown Overrides (Select panel + items)
   ======================================== */

/* Dropdown panel — matches .ant-dropdown-menu recipe (showcase "Dropdown Menu"
   section) so Select panels and menu panels share the same chrome. */
/* CF-099 F-b7-01: a searchable selector draws its no-match face under the menu itself (DropdownRender) and keeps its
   NotFoundContent for the empty source only; AntD still renders its empty-row wrapper when a search hides every option,
   so the wrapper with no element in it (Blazor leaves only its markers and whitespace) takes no room — no 32px row
   above the face */
.ant-select-item-empty:not(:has(*)) {
    display: none;
}

.ant-select-dropdown {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-panel) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 4px !important;
}

/* Dropdown items — prototype F .ddp-o (I-036): 34px rows, 10px sides, radius 6, 14px --text-primary. The selected
   option keeps its ink and takes the primary tint, 600 and a check in the accent colour; the keyboard / hover row is
   a neutral wash, so it never reads as a second selection. */
.ant-select-item {
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    min-height: 34px;
    padding: 6px 10px;
    transition: background var(--transition-fast) !important;
}

.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background: var(--color-fg-06) !important;
    color: var(--text-primary) !important;
}

.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background: var(--color-primary-bg) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state {
    color: var(--color-primary-text) !important;
}

/* A single Select leaves the state cell empty, so F's check is drawn in it (an L turned 45deg in the accent colour).
   Multiple fills the cell with AntD's own check icon, coloured above. */
.ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state:empty::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    margin: 0 3px 3px 8px;
    border: solid var(--color-primary-text);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Clear button */
.ant-select-clear {
    background: transparent !important;
    color: var(--text-muted) !important;
}

.ant-select-clear:hover {
    color: var(--text-secondary) !important;
}

/* Hide clear when empty, hide arrow when value selected */
.ant-select:not(:has(.ant-select-selection-item)) .ant-select-clear {
    display: none !important;
}

.ant-select:has(.ant-select-selection-item) .ant-select-arrow {
    display: none !important;
}

/* ========================================
   Calendar (full-page <Calendar>) - Dark Theme
   ======================================== */

/* Default AntD Calendar bg is solid white. Inherit the parent glass-card surface. */
.ant-picker-calendar,
.ant-picker-calendar-full,
.ant-picker-calendar .ant-picker-panel {
    background: transparent !important;
    color: var(--text-primary) !important;
}

.ant-picker-calendar-header {
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Year/Month switch — AntD renders this as an internal RadioGroup. We can't swap
   the component without overriding the whole HeaderRender, so we restyle the
   wrapper + buttons to be visually identical to .ant-segmented (matching every
   other variant switcher in the project). */
.ant-picker-calendar-mode-switch {
    background: var(--color-fg-06) !important;
    border-radius: var(--radius-md) !important;
    padding: 2px !important;
    display: inline-flex !important;
}

.ant-picker-calendar-mode-switch .ant-radio-button-wrapper {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-base) !important;
    box-shadow: none !important;
}

.ant-picker-calendar-mode-switch .ant-radio-button-wrapper::before {
    display: none !important;
}

.ant-picker-calendar-mode-switch .ant-radio-button-wrapper:hover {
    color: var(--text-primary) !important;
}

.ant-picker-calendar-mode-switch .ant-radio-button-wrapper-checked {
    background: var(--color-primary) !important;
    color: var(--color-on-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3) !important;
}

.ant-picker-calendar-mode-switch .ant-radio-button-wrapper-checked:hover {
    color: var(--color-on-primary) !important;
}

/* Year/Month select dropdowns in the header */
.ant-picker-calendar-header .ant-select-selector {
    background: var(--glass-bg-light) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-primary) !important;
}

/* Day-of-week column headers */
.ant-picker-calendar thead th,
.ant-picker-calendar .ant-picker-content thead th {
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Cell separators */
.ant-picker-calendar-full .ant-picker-cell {
    border-bottom: 1px solid var(--glass-border) !important;
}

.ant-picker-calendar-date,
.ant-picker-calendar-date-today {
    border-top-color: var(--glass-border) !important;
    background: transparent !important;
}

.ant-picker-calendar-date:hover {
    background: var(--color-fg-04) !important;
}

.ant-picker-calendar-date-value {
    color: var(--text-primary) !important;
}

/* B-009: the full calendar's selected day is a calm tint, not a solid block. !important
   beats the transparent .ant-picker-calendar-date rule above. */
.ant-picker-calendar-full .ant-picker-cell-selected .ant-picker-calendar-date {
    background: rgba(var(--color-primary-rgb), 0.12) !important;
}

.ant-picker-calendar-full .ant-picker-cell-selected .ant-picker-calendar-date-value {
    color: var(--color-primary) !important;
}

/* Out-of-month cells — muted */
.ant-picker-cell:not(.ant-picker-cell-in-view) .ant-picker-calendar-date-value {
    color: var(--text-muted) !important;
}

/* ========================================
   DatePicker Dropdown (Calendar Panel) - Dark Theme
   ======================================== */

.ant-picker-dropdown {
    background: transparent !important;
}

.ant-picker-panel-container {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-panel-soft) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.ant-picker-panel {
    background: transparent !important;
    border: none !important;
}

.ant-picker-header {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* F .dpk-h: the month / year title is 14px / 600 in the display face, capitalised. The title is
   AntD's month / year buttons, and AntD's reset sets `button { text-transform: none }`, so the
   buttons are named too — on the view alone "okt" stayed lower case (I-036 TASK_09) */
.ant-picker-header-view,
.ant-picker-header-view button {
    font: 600 14px var(--font-display);
    text-transform: capitalize;
}

.ant-picker-header button {
    color: var(--color-fg-50) !important;
}

.ant-picker-header button:hover {
    color: var(--color-primary) !important;
}

.ant-picker-content th {
    color: var(--color-fg-50) !important;
}

.ant-picker-cell {
    color: var(--color-fg-35) !important;
}

.ant-picker-cell-in-view {
    color: var(--text-primary) !important;
}

/* F .dpk-g span: 6px corners on the day / month / year cells and the today ring */
.ant-picker-cell .ant-picker-cell-inner,
.ant-picker-cell-today .ant-picker-cell-inner::before {
    border-radius: 6px !important;
}

.ant-picker-cell:hover:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end) .ant-picker-cell-inner {
    background: var(--color-fg-08) !important;
}

.ant-picker-cell-today .ant-picker-cell-inner::before {
    border-color: var(--color-primary) !important;
}

/* B-009: solid primary only in the DatePicker dropdown and the mini calendar — the
   full-page <Calendar> gets a calm tint instead (Calendar block above). */
.ant-picker-dropdown .ant-picker-cell-selected .ant-picker-cell-inner,
.ant-picker-calendar-mini .ant-picker-cell-selected .ant-picker-cell-inner {
    background: var(--gradient-primary) !important;
    color: var(--color-on-primary) !important;
    font-weight: 700;
}

/* ----- RangePicker cell states — brand tint instead of AntD default blue ----- */

/* Confirmed range endpoints (start / end / single-confirmed) */
.ant-picker-cell-range-start .ant-picker-cell-inner,
.ant-picker-cell-range-end .ant-picker-cell-inner,
.ant-picker-cell-range-start-single .ant-picker-cell-inner,
.ant-picker-cell-range-end-single .ant-picker-cell-inner {
    background: var(--gradient-primary) !important;
    color: var(--color-on-primary) !important;
    font-weight: 700;
}

/* Connected fill spanning between confirmed start and end cells */
.ant-picker-cell-in-range::before,
.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before,
.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before {
    background: var(--color-primary-bg) !important;
}

/* Hover preview fill (after start is picked, before end is committed) */
.ant-picker-cell-range-hover::before,
.ant-picker-cell-range-hover-start::before,
.ant-picker-cell-range-hover-end::before {
    background: rgba(var(--color-primary-rgb), 0.08) !important;
}

/* Dashed edge markers on the hover-preview endpoints */
.ant-picker-cell-range-hover::after,
.ant-picker-cell-range-hover-start::after,
.ant-picker-cell-range-hover-end::after,
.ant-picker-cell-range-hover-edge-start::after,
.ant-picker-cell-range-hover-edge-end::after {
    border-color: var(--color-primary) !important;
}

/* Hovering a confirmed endpoint while picking the second — keep brand tint */
.ant-picker-cell-range-start.ant-picker-cell-range-hover-end::before,
.ant-picker-cell-range-end.ant-picker-cell-range-hover-start::before {
    background: var(--color-primary-bg) !important;
}

.ant-picker-footer {
    border-top: 1px solid var(--glass-border) !important;
}

.ant-picker-today-btn {
    color: var(--color-primary) !important;
}

.ant-picker-today-btn:hover {
    color: var(--color-primary-text) !important;
}

/* ========================================
   Message/Notification Overrides
   ======================================== */

/* Prototype F .ev-toast (I-036): solid elevated chip, 1px --glass-border-light, radius 8, padding 9 14, 14px; the
   icon carries the status in the F status inks (info neutral, Decision 4). Global — every message is meant to change. */
.ant-message-notice-content {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 8px !important;
    padding: 9px 14px !important;
    box-shadow: var(--shadow-panel-soft) !important;
    font-size: 14px;
}

.ant-message-success .anticon {
    color: var(--color-success-hover) !important;
}

.ant-message-error .anticon {
    color: var(--color-error-light) !important;
}

.ant-message-warning .anticon {
    color: var(--color-warning-light) !important;
}

.ant-message-info .anticon {
    color: var(--color-info) !important;
}

.ant-message-loading .anticon {
    color: var(--color-primary) !important;
}

.ant-message-notice-content .ant-message-custom-content span:last-child {
    color: var(--text-primary) !important;
}

/* ========================================
   Notification Overrides - Dark Theme
   ======================================== */

.ant-notification-notice {
    background: var(--color-bg-elevated) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--color-fg-10) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-panel-soft) !important;
    padding: 16px 20px !important;
}

.ant-notification-notice-message {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.ant-notification-notice-description {
    color: var(--text-secondary) !important;
}

.ant-notification-notice-icon-success {
    color: var(--color-success) !important;
}

.ant-notification-notice-icon-error {
    color: var(--color-error) !important;
}

.ant-notification-notice-icon-warning {
    color: var(--color-warning) !important;
}

.ant-notification-notice-icon-info {
    color: var(--color-primary) !important;
}

.ant-notification-notice-close {
    color: var(--color-fg-45) !important;
}

.ant-notification-notice-close:hover {
    color: var(--text-primary) !important;
}

/* ========================================
   Table Overrides - Dark Theme
   ======================================== */

.ant-table {
    background: transparent !important;
    color: var(--color-fg-70) !important;
}

.ant-table-container,
.ant-table-content,
.ant-table table {
    background: transparent !important;
}

.ant-table-thead > tr > th {
    background: var(--color-fg-03) !important;
    border-bottom: 1px solid var(--color-fg-10) !important;
    color: var(--color-fg-70) !important;
}

.ant-table-tbody > tr > td {
    background: transparent !important;
    border-bottom: 1px solid var(--color-fg-05) !important;
    color: var(--color-fg-70) !important;
}

.ant-table-tbody > tr {
    background: transparent !important;
}

.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr:hover > td {
    background: var(--color-fg-08) !important;
}

/* ========================================
   Card Overrides - Dark Theme
   ======================================== */

.ant-card {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-10) !important;
    color: var(--color-fg-85) !important;
}

.ant-card-body {
    background: transparent !important;
}

.ant-card-head {
    background: transparent !important;
    border-bottom: 1px solid var(--color-fg-10) !important;
    color: var(--text-primary) !important;
}

.ant-card-head-title {
    color: var(--text-primary) !important;
}

/* ========================================
   Empty State Overrides
   ======================================== */

.ant-empty-description {
    color: var(--color-fg-45) !important;
}

.ant-empty-image svg {
    fill: var(--color-fg-25) !important;
}

/* ========================================
   Spin/Loading Overrides
   ======================================== */

.ant-spin-text {
    color: var(--color-fg-70) !important;
}

/* Prototype F .spin (I-036): a 22px ring in --color-primary with an open right side (34px / 3px large, 16px / 2px
   small), drawn on .ant-spin-dot; AntD's four dots are hidden. Global — every Spin is meant to change. The nested
   loading margins re-centre the ring (AntD's are for 20 / 14 / 32px). */
.ant-spin-dot {
    font-size: 22px;
    box-sizing: border-box;
    border: 2.5px solid var(--color-primary);
    border-right-color: transparent;
    border-radius: 50%;
}

.ant-spin-dot-spin {
    animation: evSpinRing 0.8s linear infinite;
}

.ant-spin-dot-item {
    display: none !important;
}

.ant-spin-sm .ant-spin-dot {
    font-size: 16px;
    border-width: 2px;
}

.ant-spin-lg .ant-spin-dot {
    font-size: 34px;
    border-width: 3px;
}

.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
    margin: -11px;
}

.ant-spin-nested-loading > div > .ant-spin-sm .ant-spin-dot {
    margin: -8px;
}

.ant-spin-nested-loading > div > .ant-spin-lg .ant-spin-dot {
    margin: -17px;
}

@keyframes evSpinRing {
    to { transform: rotate(360deg); }
}

/* Reduced motion: the ring keeps turning (it is the only loading signal) but at a calm pace */
@media (prefers-reduced-motion: reduce) {
    .ant-spin-dot-spin {
        animation-duration: 2.4s;
    }
}

/* ========================================
   Alert Overrides — prototype F .alert (I-036)
   One recipe, one hue per type: border at 45 % and tint at 10 % of the status ink (warning 50 / 11), radius 12,
   padding 14 16, 20px icon in the hue, title bold in --text-primary, description --text-secondary. Info is
   neutral (--color-info, I-036 Decision 4); `.alert--tint` on an Info alert is F's primary-tinted variant. Global —
   every Alert is meant to change. The alert's text is the body size (F's .alert inherits 15px; its title is that
   size, the description 14px) and the warning hue is the mark (F's --warn: the frame, tint and icon are marks, not
   text — light --color-warning-light is the darker running-text shade) — CF-096 TASK_09, pair O81.
   ======================================== */

.ant-alert {
    --alert-hue: var(--color-info);
    --alert-border: 45%;
    --alert-tint: 10%;
    background: color-mix(in srgb, var(--alert-hue) var(--alert-tint), transparent) !important;
    border: 1px solid color-mix(in srgb, var(--alert-hue) var(--alert-border), transparent) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: var(--font-size-base);
}

.ant-alert-success {
    --alert-hue: var(--color-success-hover);
}

.ant-alert-warning {
    --alert-hue: var(--color-warning-mark);
    --alert-border: 50%;
    --alert-tint: 11%;
}

.ant-alert-error {
    --alert-hue: var(--color-error-light);
}

.ant-alert-icon {
    margin-right: 12px;
    font-size: 20px !important;
    color: var(--alert-hue) !important;
}

.ant-alert.alert--tint {
    background: var(--color-primary-bg) !important;
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent) !important;
}

.ant-alert.alert--tint .ant-alert-icon {
    color: var(--color-primary-text) !important;
}

.ant-alert-message {
    color: var(--text-primary) !important;
    font-weight: var(--font-weight-bold);
}

.ant-alert-with-description .ant-alert-message {
    font-size: 14px;
}

.ant-alert-description {
    color: var(--text-secondary) !important;
    font-size: 14px;
}

/* F .alert .x: a 24px muted square; hover inks it */
.ant-alert-close-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.ant-alert-close-icon .anticon-close {
    color: var(--text-muted);
}

.ant-alert-close-icon:hover {
    background: var(--color-fg-06);
}

.ant-alert-close-icon:hover .anticon-close {
    color: var(--text-primary);
}

.ant-alert-close-icon:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 0;
}

/* ========================================
   Tag Overrides - Glassy Dark Theme
   ======================================== */

.ant-tag {
    background: var(--color-fg-08) !important;
    border: 1px solid var(--color-fg-12) !important;
    border-radius: 6px !important;
    color: var(--color-fg-70) !important;
    /* Prototype F .tag (I-036): 22px high (20px line + border), 12px / 600, 8px sides. Not !important: this sheet
       loads after AntD's, so the tie is won by order and a page's scoped tag size still applies. */
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
}

/* Prototype F .tag--lg: the large status tag that sums up a section (Evidens I-041 TASK_11, ported by I-048) — 30px
   high (28px line + border), 13.5px, 12px sides. Opt-in by class, the base tag is unchanged. */
.ant-tag.tag--lg {
    padding: 0 12px;
    font-size: 0.84375rem;
    line-height: 28px;
}

/* Semantic tag colours (B-001). They must follow the base .ant-tag rule above: every tag rule is
   single-class with !important, so the later rule wins. Every tag colour rule, semantic and named,
   lives in this Tag Overrides section — app.css has none. Each puts its text on its own 15 % tint inside
   a 38 % border (prototype F .tag); processing reads --color-info, which is neutral (I-036). */
.ant-tag-success {
    background: rgba(var(--color-success-rgb), 0.15) !important;
    border-color: rgba(var(--color-success-rgb), 0.38) !important;
    color: var(--color-success-light) !important;
}

.ant-tag-error {
    background: rgba(var(--color-error-rgb), 0.15) !important;
    border-color: rgba(var(--color-error-rgb), 0.38) !important;
    color: var(--color-error-light) !important;
}

.ant-tag-warning {
    background: rgba(var(--color-warning-rgb), 0.15) !important;
    border-color: rgba(var(--color-warning-rgb), 0.38) !important;
    color: var(--color-warning-light) !important;
}

.ant-tag-processing {
    background: rgba(var(--color-info-base-rgb), 0.15) !important;
    border-color: rgba(var(--color-info-base-rgb), 0.38) !important;
    color: var(--color-info-light) !important;
}

/* Color="default" is F's plain neutral tag (Nacrt, Arhiviran, Neplaćeno, Pending documents): the neutral hue at
   .15 / .38 like every other tag colour — the .tag-neutral tokens. It was a fg-06 wash with the .10 glass border,
   which hardly showed on a card (I-036 TASK_09) */
.ant-tag-default {
    background: var(--color-neutral-bg) !important;
    border-color: var(--color-neutral-border) !important;
    color: var(--color-neutral-text) !important;
}

.ant-tag-green {
    background: rgba(var(--color-success-rgb), 0.15) !important;
    border-color: rgba(var(--color-success-rgb), 0.38) !important;
    color: var(--color-success-light) !important;
}

.ant-tag-blue {
    background: rgba(var(--color-info-base-rgb), 0.15) !important;
    border-color: rgba(var(--color-info-base-rgb), 0.38) !important;
    color: var(--color-info-light) !important;
}

.ant-tag-orange {
    background: rgba(var(--color-warning-rgb), 0.15) !important;
    border-color: rgba(var(--color-warning-rgb), 0.38) !important;
    color: var(--color-warning-light) !important;
}

.ant-tag-red {
    background: rgba(var(--color-error-rgb), 0.15) !important;
    border-color: rgba(var(--color-error-rgb), 0.38) !important;
    color: var(--color-error-light) !important;
}

.ant-tag-cyan {
    background: rgba(var(--color-tag-cyan-rgb), 0.15) !important;
    border-color: rgba(var(--color-tag-cyan-rgb), 0.38) !important;
    color: var(--color-tag-cyan-text) !important;
}

.ant-tag-purple {
    background: rgba(var(--color-accent-purple-rgb), 0.15) !important;
    border-color: rgba(var(--color-accent-purple-rgb), 0.38) !important;
    color: var(--color-accent-purple-light) !important;
}

.ant-tag-magenta,
.ant-tag-pink {
    background: rgba(var(--color-tag-magenta-rgb), 0.15) !important;
    border-color: rgba(var(--color-tag-magenta-rgb), 0.38) !important;
    color: var(--color-tag-magenta-text) !important;
}

.ant-tag-gold {
    background: rgba(var(--color-warning-rgb), 0.15) !important;
    border-color: rgba(var(--color-warning-rgb), 0.38) !important;
    color: var(--color-warning-light) !important;
}

.ant-tag-lime {
    background: rgba(var(--color-tag-lime-rgb), 0.15) !important;
    border-color: rgba(var(--color-tag-lime-rgb), 0.38) !important;
    color: var(--color-tag-lime-text) !important;
}

.ant-tag-volcano {
    background: rgba(var(--color-tag-volcano-rgb), 0.15) !important;
    border-color: rgba(var(--color-tag-volcano-rgb), 0.38) !important;
    color: var(--color-tag-volcano-text) !important;
}

.ant-tag-geekblue {
    background: rgba(var(--color-tag-geekblue-rgb), 0.15) !important;
    border-color: rgba(var(--color-tag-geekblue-rgb), 0.38) !important;
    color: var(--color-tag-geekblue-text) !important;
}

/* Neutral informational tag (I-045): a semantic marker class like .tag-wrap — Class="tag-neutral" with Color="default"
   or no Color. Two classes with !important beat the base and status rules. The hue is a fork brand value
   (--color-neutral, app.css § FORK BRAND VALUES). */
.ant-tag.tag-neutral {
    background: var(--color-neutral-bg) !important;
    border-color: var(--color-neutral-border) !important;
    color: var(--color-neutral-text) !important;
}

/* ========================================
   Steps (I-036, prototype F .steps--flat; README Decision 10) — every AntD Steps: InvoiceDetail's SEF steps, the
   fixed-asset import, the showcase. F's general strip is the wizard strip's anatomy without its card: 28px bullets
   with a 1.5px outline and the 13px / 600 display-font number, 14 / 500 labels 10px after the bullet, a 2px rail
   12px either side. Current: filled primary bullet, 600 label. Done: primary tint, primary outline, the check in
   --color-primary-text, primary rail. Error: --color-error outline on a 12 % error tint. Upcoming: outlined. The
   bullet outline and the rails are --color-fg-45 (as the wizard strip: >= 3:1 in both themes). The I-033
   .wizard-progress rules below are not edited and keep winning: they repeat or out-weigh every property here.
   ======================================== */

/* Steps container */
.ant-steps {
    color: var(--color-fg-70) !important;
}

/* Step titles */
.ant-steps-item-title {
    color: var(--color-fg-65) !important;
}

/* CF-099 F-b7-06: --text-muted, not --color-fg-45 — a finished step's date under the rail's Tok statusa read 4.46 : 1 on
   the dark glass card; --text-muted clears 4.5 : 1 in both themes (dark 0.55, light 0.62 — the light ground unchanged in
   kind: fg-45 is tuned to 0.6 there) */
.ant-steps-item-description {
    color: var(--text-muted) !important;
}

/* Sizes: (0,2,0) and (0,3,0) out-rank AntD's small / horizontal rules (the SEF steps and the import are Size=Small) */
.ant-steps .ant-steps-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    margin: 0 10px 0 0;
    border-width: 1.5px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.ant-steps .ant-steps-item-icon .ant-steps-icon {
    top: 0;
    font-size: 13px;
    line-height: 1;
}

.ant-steps .ant-steps-item-icon .anticon {
    font-size: 14px;
}

.ant-steps .ant-steps-item-title {
    padding-right: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 28px;
}

.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item {
    padding-left: 12px;
}

.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child {
    padding-left: 0;
}

/* The rail is AntD's title ::after: 2px, centred on the 28px bullet. Upcoming and current rails are --color-fg-45
   (AntD draws #f0f0f0 / #ff4d4f literals there), a done step's rail is the primary. */
.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-title::after {
    top: 13px;
    height: 2px;
    border-radius: 1px;
}

.ant-steps-item-title::after,
.ant-steps-item-tail::after {
    background-color: var(--color-fg-45) !important;
}

.ant-steps-item-finish .ant-steps-item-title::after,
.ant-steps-item-finish .ant-steps-item-tail::after {
    background-color: var(--color-primary) !important;
}

/* Upcoming: outlined bullet, muted number and label */
.ant-steps-item-wait .ant-steps-item-icon {
    background: transparent !important;
    border-color: var(--color-fg-45) !important;
}

.ant-steps-item-wait .ant-steps-item-icon .ant-steps-icon,
.ant-steps-item-wait .ant-steps-item-title {
    color: var(--text-muted) !important;
}

/* Current: filled primary bullet, 600 label */
.ant-steps-item-process .ant-steps-item-icon {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.ant-steps-item-process .ant-steps-item-icon .ant-steps-icon {
    color: var(--color-on-primary) !important;
}

.ant-steps-item-process .ant-steps-item-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.ant-steps-item-process .ant-steps-item-description {
    color: var(--color-fg-65) !important;
}

/* Done: primary-tinted bullet with the check */
.ant-steps-item-finish .ant-steps-item-icon {
    background: var(--color-primary-bg) !important;
    border-color: var(--color-primary) !important;
}

.ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon {
    color: var(--color-primary-text) !important;
}

.ant-steps-item-finish .ant-steps-item-title {
    color: var(--text-secondary) !important;
}

/* Error: --color-error on a 12 % error tint (AntD's #ff4d4f literal before), 600 label */
.ant-steps-item-error .ant-steps-item-icon {
    background: color-mix(in srgb, var(--color-error) 12%, transparent) !important;
    border-color: var(--color-error) !important;
}

.ant-steps-item-error .ant-steps-item-icon .ant-steps-icon,
.ant-steps-item-error .ant-steps-item-title,
.ant-steps-item-error .ant-steps-item-description {
    color: var(--color-error) !important;
}

.ant-steps-item-error .ant-steps-item-title {
    font-weight: 600;
}

/* Vertical (F .steps--v): a column; between two bullets a 2px rail of 18px, 2px clear of each bullet, centred at
   13px. The rail is AntD's tail from 30px to 2px above the item's end, so a 28px title + one description line
   (50px) gives F's 18px; a step without a description keeps the same pitch through min-height. */
.ant-steps-vertical > .ant-steps-item .ant-steps-item-icon {
    margin-right: 10px;
}

.ant-steps-vertical > .ant-steps-item .ant-steps-item-content {
    min-height: 50px;
}

.ant-steps-vertical > .ant-steps-item .ant-steps-item-container .ant-steps-item-title {
    line-height: 28px;
}

.ant-steps-vertical > .ant-steps-item .ant-steps-item-description {
    padding-bottom: 0;
}

.ant-steps-vertical > .ant-steps-item > .ant-steps-item-container > .ant-steps-item-tail {
    left: 13px;
    width: 2px;
    padding: 30px 0 2px;
}

.ant-steps-vertical > .ant-steps-item > .ant-steps-item-container > .ant-steps-item-tail::after {
    width: 2px;
    border-radius: 1px;
}

/* Error step (I-033): <Step Status="StepsStatus.Error"> — a step the user tried to leave with invalid input.
   Error-coloured outline on the error tint, the close icon and the label in the error colour. Scoped to the wizard
   strip (I-033); since I-036 every other Steps takes the general error rules above. */
.wizard-progress .ant-steps-item-error .ant-steps-item-icon {
    background: var(--color-error-bg) !important;
    border-color: var(--color-error) !important;
}

.wizard-progress .ant-steps-item-error .ant-steps-item-icon .ant-steps-icon {
    color: var(--color-error) !important;
}

.wizard-progress .ant-steps-item-error .ant-steps-item-title,
.wizard-progress .ant-steps-item-error .ant-steps-item-description {
    color: var(--color-error) !important;
}

/* --- Wizard step strip (I-033, prototype F .steps): AntD Steps inside .wizard-progress ---
   F's sizes: 28px bullets with a 1.5px outline and the 13px display-font number, 14px labels 10px after the
   bullet, a 2px rail 12px either side. Sizes need no !important (two classes out-rank AntD); the colours repeat
   the !important of the global rules above because they replace them. */
.wizard-progress .ant-steps {
    align-items: center;
}

.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item {
    padding-top: 0;
    padding-left: 12px;
}

.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child {
    padding-left: 0;
}

/* F's strip sizes each step by its label and lets the rails take the rest (F .step / .rail-h): AntD's equal
   flex: 1 items clipped a long label mid-word and squeezed its rail to nothing when the labels did not fit (a
   five-step wizard at any width). A step shrinks only when the strip is full, its label then ends in an ellipsis;
   the current and the error step never shrink, so their label always reads whole (I-033 TASK_08). */
.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item {
    flex: 1 1 auto;
}

.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:last-child {
    flex: 0 1 auto;
}

.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-active,
.wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-error {
    flex-shrink: 0;
}

.wizard-progress .ant-steps-item-container {
    display: flex;
    align-items: center;
}

.wizard-progress .ant-steps-item-icon {
    flex: none;
}

.wizard-progress .ant-steps-item-content {
    flex: 0 1 auto;
    min-width: 0;
}

.wizard-progress .ant-steps-item-active .ant-steps-item-content,
.wizard-progress .ant-steps-item-error .ant-steps-item-content {
    flex-shrink: 0;
}

.wizard-progress .ant-steps-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    margin: 0 10px 0 0;
    border-width: 1.5px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.wizard-progress .ant-steps-item-icon .ant-steps-icon {
    top: 0;
    line-height: 1;
}

.wizard-progress .ant-steps-item-icon .anticon {
    font-size: 14px;
}

/* An IconTemplate step (.ant-steps-item-custom) keeps the bullet instead of AntD's bare custom icon */
.wizard-progress .ant-steps-item-custom .ant-steps-item-icon {
    width: 28px;
    height: 28px;
    border: 1.5px solid;
    border-radius: 50%;
}

.wizard-progress .ant-steps-item-custom .ant-steps-item-icon > .ant-steps-icon {
    top: 0;
    font-size: 14px;
    line-height: 1;
}

.wizard-progress .ant-steps-item-title {
    display: block;
    overflow: hidden;
    padding-right: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 28px;
    text-overflow: ellipsis;
}

.wizard-progress .ant-steps-item:last-child .ant-steps-item-title {
    padding-right: 0;
}

/* The ellipsis is drawn by the label span that carries the full text as its title (WizardSteps), so a cut label names
   its tooltip — the title div around it (AntD's, no attribute) ended in "…" with none (I-060, Evidens I-044 Decision
   30, VR6) */
.wizard-progress .ant-steps-item-title > span[title] {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The strip has no subtitles; AntD's empty subtitle element would still add its 8px margin before the rail */
.wizard-progress .ant-steps-item-subtitle {
    display: none;
}

/* The rail (F .rail-h): a flex child after the label, 2px, at least 12px, centred on the bullet. It gives up its
   space (down to 12px) before its label loses a letter. AntD's own rail is the title's ::after, which the title's
   ellipsis clip would cut, so it is not drawn. */
.wizard-progress .ant-steps-item-title::after {
    display: none !important;
}

.wizard-progress .ant-steps-item:not(:last-child) > .ant-steps-item-container::after {
    content: '';
    flex: 1 1000 20px;
    min-width: 12px;
    height: 2px;
    border-radius: 1px;
    background-color: var(--color-fg-45);
}

/* Upcoming: outlined bullet, muted number and label. The outline and the rails use --color-fg-45, not F's fainter
   border tint, so a bullet and a bar reach 3:1 against the strip in both themes (I-033 TASK_08) */
.wizard-progress .ant-steps-item-wait .ant-steps-item-icon {
    background: transparent !important;
    border-color: var(--color-fg-45) !important;
}

.wizard-progress .ant-steps-item-wait .ant-steps-item-icon .ant-steps-icon,
.wizard-progress .ant-steps-item-wait .ant-steps-item-title {
    color: var(--text-muted) !important;
}

/* Current: filled primary bullet, bold label */
.wizard-progress .ant-steps-item-process .ant-steps-item-icon {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.wizard-progress .ant-steps-item-process .ant-steps-item-title {
    font-weight: 600;
}

/* Done: primary-tinted bullet with the check, a primary rail after it */
.wizard-progress .ant-steps-item-finish .ant-steps-item-icon {
    background: var(--color-primary-bg) !important;
    border-color: var(--color-primary) !important;
}

.wizard-progress .ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon {
    color: var(--color-primary-text) !important;
}

.wizard-progress .ant-steps-item-finish .ant-steps-item-title {
    color: var(--text-secondary) !important;
}

.wizard-progress .ant-steps-item-finish:not(:last-child) > .ant-steps-item-container::after {
    background-color: var(--color-primary);
}

/* Error: semibold label (the colours are the error rules above) */
.wizard-progress .ant-steps-item-error .ant-steps-item-title {
    font-weight: 600;
}

/* Five or more steps never fit their labels in the 720px column (OD: ~830px of labels, bullets and rails): instead
   of clipping every label to a stub and the rails to a dash, the strip takes F's phone treatment at every width —
   only the current and the error labels stay visible (the others collapse to zero size and are still read by
   assistive technology) and the rails take the freed space (I-033 merge
   gate, README Decision 26). Fewer steps keep every label, ending in an ellipsis when the strip is full. */
.wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-error) .ant-steps-item-title {
    font-size: 0;
}

.wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(:last-child) {
    min-width: 64px;
}

.wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item-active:not(:last-child),
.wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item-error:not(:last-child) {
    flex: 1 0 auto;
}

/* Desktop (>= 1100px): a rail is at least 24px, a visible line between every two steps as in F (it gave up its
   space down to 12px before; a label now ends in its ellipsis first). */
@media (min-width: 1100px) {
    .wizard-progress .ant-steps-item:not(:last-child) > .ant-steps-item-container::after {
        min-width: 24px;
    }
}

/* Phone (F <= 640px): tighter strip; only the current and the error labels stay visible. The other labels
   collapse to zero size (still read by assistive technology), their rail starts after the bullet. */
@media (max-width: 640px) {
    .wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item {
        padding-left: 8px;
    }

    .wizard-progress .ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child {
        padding-left: 0;
    }

    .wizard-progress .ant-steps-item-icon {
        margin-right: 8px;
    }

    .wizard-progress .ant-steps-item-title {
        padding-right: 8px;
    }

    .wizard-progress .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-error) .ant-steps-item-title {
        font-size: 0;
    }

    /* The labelled steps keep their label's width; the others shrink to bullet + a 12px rail (never below it).
       The last step has no rail, so it keeps its own width (no empty space after its bullet). */
    .wizard-progress .ant-steps-item:not(:last-child) {
        min-width: 56px;
    }

    .wizard-progress .ant-steps-item-active:not(:last-child),
    .wizard-progress .ant-steps-item-error:not(:last-child) {
        flex: 1 0 auto;
    }

    /* Five or more steps (I-040 Decision 47): the 64px floor of the five-step rule above out-weighs the 56px one here,
       so at 390 a five-step wizard's steps needed 352px of a 328px strip and the fifth bullet ran out of the card. On a
       phone the collapsed steps drop the floor and tighten (4px before and after the bullet, an 8px rail) and the
       current / error label may end in its ellipsis as the last resort, so the strip never leaves its card. */
    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(:first-child) {
        padding-left: 4px;
    }

    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(:last-child) {
        min-width: auto;
    }

    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-error) .ant-steps-item-icon {
        margin-right: 4px;
    }

    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-error) .ant-steps-item-title {
        padding-right: 0;
    }

    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item:not(:last-child) > .ant-steps-item-container::after {
        min-width: 8px;
    }

    /* A near-zero factor: the collapsed steps give up their space down to their floor first; only then does the
       current label shrink into its ellipsis. */
    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item.ant-steps-item-active,
    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item.ant-steps-item-error {
        min-width: 0;
        flex-shrink: 0.01;
    }

    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item-active .ant-steps-item-content,
    .wizard-progress .ant-steps:has(> .ant-steps-item:nth-child(5)) > .ant-steps-item-error .ant-steps-item-content {
        flex-shrink: 1;
    }
}

/* ========================================
   Buttons (I-036, prototype F .btn) — the one source for every AntD Button
   app.css has no button rule left. The type looks are here (primary + primary-danger) and in "Default / Dashed /
   Danger / Text / Link Buttons" below; contextual rules (modal footer, popconfirm, plan card, …) stay next to their
   component and out-weigh these. Sizes follow F (README Decision 6): default 36px / small 28px, radius 8 / 6,
   icon-only square. Table cells keep AntD's compact 32 / 24px (I-028): every size rule carries
   :where(:not(:is(td, th, .ant-table-cell) *)), which adds no weight, so AntD's own size rules (same weight, earlier
   sheet) lose by order and the I-012 <=480px 44px lift (app.css, a 0,2,0 min-height) still wins on a phone.
   ======================================== */

/* Shape=Circle / Shape=Round keep AntD's own 50 % / pill radius (#10935); :where() keeps these at 0,1,0 so the
   contextual radius rules below still out-weigh them */
.ant-btn:where(:not(.ant-btn-circle, .ant-btn-round)) {
    border-radius: var(--radius-sm) !important;
}

.ant-btn {
    font-weight: 500;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, color 150ms ease !important;
}

.ant-btn:where(:not(:is(td, th, .ant-table-cell) *)) {
    height: 36px;
    padding: 0 16px;
}

.ant-btn-sm:where(:not(.ant-btn-circle, .ant-btn-round)) {
    border-radius: 6px !important;
}

.ant-btn-sm:where(:not(:is(td, th, .ant-table-cell) *)) {
    height: 28px;
    padding: 0 10px;
    font-size: 13px;
}

.ant-btn-lg:where(:not(:is(td, th, .ant-table-cell) *)) {
    height: 40px;
    padding: 0 16px;
}

/* Icon-only: square at every size (AntD's own large icon button is already 40 x 40) */
.ant-btn-icon-only:where(:not(:is(td, th, .ant-table-cell) *)) {
    width: 36px;
    padding: 0;
}

.ant-btn-icon-only.ant-btn-sm:where(:not(:is(td, th, .ant-table-cell) *)) {
    width: 28px;
    height: 28px;
}

/* Text button: F .btn--text sides (8px) unless it is icon-only */
.ant-btn-text:where(:not(.ant-btn-icon-only)):where(:not(:is(td, th, .ant-table-cell) *)) {
    padding: 0 8px;
}

/* Loading: AntD's spinner icon before the label, nothing else — AntD's white ::before wash is off (F .is-loading) */
.ant-btn.ant-btn-loading::before {
    display: none;
}

/* Button group: inner corners square */
.ant-btn-group .ant-btn:first-child:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.ant-btn-group .ant-btn:last-child:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.ant-btn-group .ant-btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Primary: F .btn--primary — the brand fill and --color-on-primary 600, no glow at rest; hover lifts and glows */
.ant-btn-primary,
button.ant-btn-primary,
.ant-btn.ant-btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--color-on-primary) !important;
    font-weight: 600;
}

/* B-009: a disabled primary never lights up on hover/focus - the disabled rule below owns it.
   B-028 (1349): the guard also excludes [disabled] (the disabled rule matches it: <a disabled>, fieldset).
   :where() keeps the guard at zero specificity so contextual (danger) hovers still win. */
.ant-btn-primary:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
button.ant-btn-primary:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
button.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-primary:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%) !important;
    border: none !important;
    box-shadow: 0 6px 18px var(--color-primary-glow) !important;
    color: var(--color-on-primary) !important;
    transform: translateY(-1px);
}

.ant-btn-primary:active:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
button.ant-btn-primary:active:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-primary:active:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%) !important;
    box-shadow: 0 2px 8px var(--color-primary-glow) !important;
    transform: translateY(0);
}

/* B-051 AD4 (b): keyboard focus appends the brand focus ring (.impeccable.md) to the hover glow. Same weights as the
   hover/active copies above ((0,3,0) for the .ant-btn form), placed after both so a keyboard press keeps the ring. */
.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
button.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-primary:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    box-shadow: 0 6px 18px var(--color-primary-glow), 0 0 0 2px var(--color-primary-glow) !important;
}

/* Disabled primary: F .btn:disabled — the whole button at .55, no lift or glow.
   B-028 (1349): :disabled listed too, so the disabled look and the hover guard agree */
.ant-btn-primary[disabled],
.ant-btn-primary:disabled,
.ant-btn-primary.ant-btn-disabled,
button.ant-btn-primary[disabled],
button.ant-btn-primary:disabled,
button.ant-btn-primary.ant-btn-disabled {
    background: var(--gradient-primary) !important;
    box-shadow: none !important;
    color: var(--color-on-primary) !important;
    cursor: not-allowed !important;
    opacity: 0.55;
    transform: none !important;
}

/* Dropdown trigger button styling */
.ant-btn-primary .anticon,
button.ant-btn-primary .anticon {
    color: var(--color-on-primary) !important;
}

/* Primary + Danger: F .btn--danger-solid — the error fill with --color-on-error ink in both themes (ink on the dark
   theme's light red, white on the light theme's deep red). (0,3,0)/(0,4,0) over the primary rules above, so a
   disabled one keeps the error fill under the disabled rule's .55. */
.ant-btn.ant-btn-primary.ant-btn-dangerous {
    background: var(--color-error) !important;
    box-shadow: none !important;
    color: var(--color-on-error) !important;
}

.ant-btn.ant-btn-primary.ant-btn-dangerous:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-primary.ant-btn-dangerous:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: var(--color-error-light) !important;
    box-shadow: 0 6px 18px rgba(var(--color-error-rgb), 0.35) !important;
    color: var(--color-on-error) !important;
}

.ant-btn.ant-btn-primary.ant-btn-dangerous:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    box-shadow: 0 6px 18px rgba(var(--color-error-rgb), 0.35), 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-btn-primary.ant-btn-dangerous .anticon {
    color: var(--color-on-error) !important;
}

/* A non-primary danger button in a modal footer is an error tint with --color-error-light text: the icon and the
   loading spinner follow that text, or they vanish on the tint. (Primary + Danger keeps the on-error ink above.) */
.ant-modal-footer .ant-btn.ant-btn-dangerous:not(.ant-btn-primary) .anticon {
    color: var(--color-error-light) !important;
}

/* The same in the inline footer of a form-submit modal (app.css .modal-actions-footer, I-031) */
.modal-actions-footer .ant-btn.ant-btn-dangerous:not(.ant-btn-primary) .anticon {
    color: var(--color-error-light) !important;
}

/* A disabled primary button dims its label: the icon follows it, not the on-primary ink */
.ant-btn-primary[disabled] .anticon,
.ant-btn-primary:disabled .anticon,
.ant-btn-primary.ant-btn-disabled .anticon {
    color: inherit !important;
}

/* ========================================
   Dropdown Menu Overrides - Dark Theme
   ======================================== */

/* Prototype F .ddp (I-036): panel --glass-border-light, radius 12, padding 4; items 34px, padding 0 10, radius 6,
   14px --text-primary; active / hover a neutral wash, selected the primary tint. Disabled is --text-muted (rule in
   the "Disabled states" block below); a danger item (`Class="ant-dropdown-menu-item-danger"` — AntD Blazor's MenuItem
   has no Danger parameter, so the hook is AntD's own class) keeps --color-error-light at rest and on hover.
   Global — every Dropdown menu is meant to change (PortalLayout, the report pages' action menus). */
.ant-dropdown-menu {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-panel) !important;
    padding: 4px !important;
}

.ant-dropdown-menu-item {
    min-height: 34px;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 0 10px !important;
    font-size: 14px;
    transition: background var(--transition-fast), color var(--transition-fast) !important;
}

.ant-dropdown-menu-item:hover,
.ant-dropdown-menu-item-active {
    background: var(--color-fg-06) !important;
    color: var(--text-primary) !important;
}

.ant-dropdown-menu-item-selected,
.ant-dropdown-menu-item-selected:hover {
    background: var(--color-primary-bg) !important;
    color: var(--text-primary) !important;
    font-weight: var(--font-weight-semibold);
}

/* AntD Blazor puts a leading <Icon> inside .ant-menu-title-content, where AntD's own icon margin does not reach: an
   item that starts with an icon lays out as F's icon + 8px + label row */
.ant-dropdown-menu-item .ant-menu-title-content:has(> .anticon:first-child) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Icons take the item's ink (F .ddp-o), so danger and disabled icons follow their row */
.ant-dropdown-menu-item .anticon {
    color: inherit !important;
}

.ant-dropdown-menu-item.ant-dropdown-menu-item-danger {
    color: var(--color-error-light) !important;
}

.ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover,
.ant-dropdown-menu-item.ant-dropdown-menu-item-danger.ant-dropdown-menu-item-active {
    background: color-mix(in srgb, var(--color-error-light) 12%, transparent) !important;
}

.ant-dropdown-menu-item-divider {
    margin: 4px 0 !important;
    background: var(--glass-border) !important;
}

/* A disabled item stays flat (no hover wash) and reads muted (I-036) */
.ant-dropdown-menu-item.ant-dropdown-menu-item-disabled,
.ant-dropdown-menu-item.ant-dropdown-menu-item-disabled:hover,
.ant-dropdown-menu-submenu-title-disabled {
    background: transparent !important;
    color: var(--text-muted) !important;
}

/* ========================================
   ImageCard Overrides - Dark Theme
   ======================================== */

/* Image filename - white text */
.image-card .filename {
    color: var(--text-primary) !important;
}

/* More platforms badge (+2) - dark theme */
.image-card .more-platforms {
    color: var(--color-fg-85) !important;
    background-color: var(--color-fg-10) !important;
}

/* Download button - dark glass with orange hover */
.image-card .download-btn,
.image-card .download-btn.ant-btn {
    background: rgba(var(--surface-overlay-strong-rgb), 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-fg-10) !important;
    box-shadow: 0 2px 8px rgba(var(--color-shadow-rgb), 0.3) !important;
    color: var(--color-fg-85) !important;
}

.image-card .download-btn:hover,
.image-card .download-btn.ant-btn:hover {
    background: rgba(var(--color-primary-rgb), 0.2) !important;
    border-color: rgba(var(--color-primary-rgb), 0.4) !important;
    color: var(--color-primary) !important;
}

.image-card .download-btn .anticon,
.image-card .download-btn.ant-btn .anticon {
    color: inherit !important;
}

/* Image thumbnail background - dark */
.image-card .image-thumbnail {
    background-color: var(--color-fg-05) !important;
}

/* Image placeholder icon - muted */
.image-card .image-placeholder {
    color: var(--color-fg-35) !important;
}

/* Compliance icon background - dark */
.image-card .compliance-icon {
    background: rgb(var(--surface-overlay-strong-rgb)) !important;
}

/* ========================================
   Subscription Tag Overrides
   ======================================== */

/* Base subscription-tag — pill shape, neutral muted glass. Tier variants override
   background + border + color; expiring-* variants add animation on top. */
.subscription-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
    background: var(--glass-bg-subtle);
    color: var(--text-secondary);
}

.subscription-tag.tier-free {
    background: var(--glass-bg-subtle);
    color: var(--text-muted);
    border-color: var(--glass-border);
}

.subscription-tag.tier-starter {
    background: var(--color-tier-starter-bg);
    color: var(--color-tier-starter);
    border-color: rgba(var(--color-tier-starter-rgb), 0.3);
}

.subscription-tag.tier-pro {
    background: var(--color-tier-pro-bg);
    color: var(--color-tier-pro);
    border-color: rgba(var(--color-tier-pro-rgb), 0.3);
}

.subscription-tag.tier-enterprise {
    background: rgba(var(--color-tier-enterprise-rgb), 0.12);
    color: var(--color-tier-enterprise);
    border-color: rgba(var(--color-tier-enterprise-rgb), 0.3);
}

/* tier-max — gradient gold + glow (digidok-grade flagship polish). The gold values
   are the --color-gold* tokens of app.css. */
.subscription-tag.tier-max,
.ant-tag.subscription-tag.tier-max {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-bright) 50%, var(--color-gold-deep) 100%) !important;
    color: var(--color-on-gold) !important;
    border-color: rgba(var(--color-gold-bright-rgb), 0.5) !important;
    box-shadow: 0 0 12px rgba(var(--color-gold-rgb), 0.4);
    font-weight: 700;
}

/* Expiring status indicators — apply on top of any tier variant. */
.subscription-tag.expiring-warning {
    border-color: var(--color-warning) !important;
    color: var(--color-warning-light) !important;
}

@keyframes expiring-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-error-rgb), 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(var(--color-error-rgb), 0); }
}

.subscription-tag.expiring-critical {
    border-color: var(--color-error) !important;
    color: var(--color-error-light) !important;
    animation: expiring-pulse 1.5s ease-in-out infinite;
}

/* The top header's plan tag (MainLayout) is F's neutral .plan whatever the tier (I-051 AD-5, Evidens I-041 Decision 7):
   12px / 600, 2px 8px, radius 6, the neutral info hue for its text, fill and hairline. Scoped to the header — a page's
   own .subscription-tag (Settings) keeps the tier colours above; above the tier-max / expiring !important rules
   too: in the header the plan name is a label, the tier styling belongs to the Settings plan display.
   .shell-header-actions: the same cluster in the /design-system#app-shell cut-out (I-048) */
.main-header .ant-tag.subscription-tag,
.main-header .ant-tag.subscription-tag[class*="tier-"],
.shell-header-actions .ant-tag.subscription-tag,
.shell-header-actions .ant-tag.subscription-tag[class*="tier-"] {
    margin-inline-end: 0;
    padding: 2px var(--space-sm);
    border: 1px solid color-mix(in srgb, var(--color-info) 35%, transparent) !important;
    border-radius: 6px;
    background: color-mix(in srgb, var(--color-info) 14%, transparent) !important;
    color: color-mix(in srgb, var(--color-info) 78%, var(--text-primary)) !important;
    box-shadow: none;
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.5;
    animation: none;
}

/* ========================================
   Dashboard Plan Value Styling
   ======================================== */

/* Free plan - default muted styling */
.stat-value.plan-free {
    color: var(--text-muted) !important;
}

/* Pro plan - blue */
.stat-value.plan-pro {
    color: var(--color-tier-starter) !important;
}

/* Plus plan - purple */
.stat-value.plan-plus {
    color: var(--color-tier-pro) !important;
}

/* Max plan - orange gradient with glow effect */
.stat-value.plan-max {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.4);
}

/* ========================================
   Upgrade Page Button Overrides
   ======================================== */

/* Plan card body - flex layout to push button to bottom */
.plan-card .ant-card-body,
.plan-card.ant-card .ant-card-body {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* All plan card buttons - pill shape, pushed to bottom */
.plan-card .ant-btn,
.plan-card.ant-card .ant-btn {
    height: 48px !important;
    font-weight: 600 !important;
    border-radius: 24px !important;
    font-size: 0.9375rem !important;
    transition: all 200ms ease !important;
    margin-top: auto !important;
}

/* Default button (Free plan) */
.plan-card .ant-btn-default,
.plan-card.ant-card .ant-btn-default {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-10) !important;
    color: var(--color-fg-70) !important;
}

.plan-card .ant-btn-default:hover:not(:disabled),
.plan-card.ant-card .ant-btn-default:hover:not(:disabled) {
    background: var(--color-fg-10) !important;
    border-color: var(--color-fg-15) !important;
    color: var(--text-primary) !important;
}

/* Disabled "Current Plan" button - green indicator style */
.plan-card .ant-btn-default[disabled],
.plan-card .ant-btn-default.ant-btn-disabled,
.plan-card.ant-card .ant-btn-default[disabled],
.plan-card.ant-card .ant-btn-default.ant-btn-disabled {
    background: rgba(var(--color-success-rgb), 0.1) !important;
    border: 1px solid rgba(var(--color-success-rgb), 0.25) !important;
    color: var(--color-success) !important;
    opacity: 1 !important;
    cursor: default !important;
}

/* Primary button (Subscribe) */
.plan-card .ant-btn-primary,
.plan-card.ant-card .ant-btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35) !important;
}

.plan-card .ant-btn-primary:hover:not(:disabled),
.plan-card.ant-card .ant-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45) !important;
}

/* ========================================
   Billing Toggle - Save Badge
   ======================================== */

/* Save percentage badge - make it stand out */
.billing-toggle .ant-tag {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: var(--color-on-primary) !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.4) !important;
    animation: pulse-glow 2s ease-in-out infinite !important;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.4);
    }
    50% {
        box-shadow: 0 2px 16px rgba(var(--color-primary-rgb), 0.6), 0 0 20px rgba(var(--color-primary-rgb), 0.3);
    }
}

/* ========================================
   Checkbox Overrides - Orange Theme
   ======================================== */

/* Checkbox inner box - dark glass background */
.ant-checkbox .ant-checkbox-inner,
.ant-checkbox-wrapper .ant-checkbox .ant-checkbox-inner {
    background: var(--color-fg-05) !important;
    border-color: var(--color-fg-25) !important;
    border-radius: 4px !important;
}

/* Checkbox hover state */
.ant-checkbox:hover .ant-checkbox-inner,
.ant-checkbox-wrapper:hover .ant-checkbox .ant-checkbox-inner {
    border-color: var(--color-primary) !important;
}

/* Checkbox checked state - orange */
.ant-checkbox-checked .ant-checkbox-inner,
.ant-checkbox-wrapper .ant-checkbox-checked .ant-checkbox-inner {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

/* Check mark: ink on the primary fill (AntD draws it as a white border, 2.92 : 1 on the dark theme's orange).
   A disabled checkbox keeps AntD's muted mark. */
.ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner::after {
    border-color: var(--color-on-primary) !important;
}

/* Checkbox checked hover - lighter orange */
.ant-checkbox-checked:hover .ant-checkbox-inner,
.ant-checkbox-wrapper:hover .ant-checkbox-checked .ant-checkbox-inner {
    background: var(--color-primary-light) !important;
    border-color: var(--color-primary-light) !important;
}

/* Checkbox indeterminate state - orange */
.ant-checkbox-indeterminate .ant-checkbox-inner::after,
.ant-checkbox-wrapper .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    background-color: var(--color-primary) !important;
}

/* Checkbox focus ring - orange glow */
.ant-checkbox-input:focus + .ant-checkbox-inner,
.ant-checkbox-wrapper .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2) !important;
}

/* Checkbox label text color (F .chk label: --text) */
.ant-checkbox-wrapper {
    color: var(--text-primary) !important;
}

/* Checkbox wrapper hover */
.ant-checkbox-wrapper:hover {
    color: var(--text-primary) !important;
}

/* ========================================
   Radio Button Overrides - Orange Theme
   ======================================== */

/* Radio inner circle - dark glass background */
.ant-radio .ant-radio-inner,
.ant-radio-wrapper .ant-radio .ant-radio-inner {
    background: var(--color-fg-05) !important;
    border-color: var(--color-fg-25) !important;
}

/* Radio hover state */
.ant-radio:hover .ant-radio-inner,
.ant-radio-wrapper:hover .ant-radio .ant-radio-inner {
    border-color: var(--color-primary) !important;
}

/* Radio checked state: F's native radio — a primary ring around a primary dot on the control surface (I-036) */
.ant-radio-checked .ant-radio-inner,
.ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
    background: var(--control-bg) !important;
    border-color: var(--color-primary) !important;
}

/* Radio checked inner dot */
.ant-radio-checked .ant-radio-inner::after,
.ant-radio-wrapper .ant-radio-checked .ant-radio-inner::after {
    background-color: var(--color-primary) !important;
}

/* Radio checked hover - the lighter primary ring */
.ant-radio-checked:hover .ant-radio-inner,
.ant-radio-wrapper:hover .ant-radio-checked .ant-radio-inner {
    border-color: var(--color-primary-light) !important;
}

/* Radio focus ring - orange glow */
.ant-radio-input:focus + .ant-radio-inner,
.ant-radio-wrapper .ant-radio-input:focus + .ant-radio-inner {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2) !important;
}

/* Radio label text color (F: --text) */
.ant-radio-wrapper {
    color: var(--text-primary) !important;
}

/* Radio wrapper hover */
.ant-radio-wrapper:hover {
    color: var(--text-primary) !important;
}

/* Button-style RadioGroups (Radio RadioButton) — the .ant-segmented look (I-036, README Decision 8: the two share one
   recipe). AntD's default is white chrome + blue selection (light-theme leakage). Applies to every RadioButton group:
   view toggles, report filter pickers (Saldo / +/- / Type), modal option pickers, etc. Plain (dot) radios are
   untouched. */
.ant-radio-group:has(> .ant-radio-button-wrapper) {
    background: var(--control-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 3px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
}

.ant-radio-button-wrapper {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    transition: color var(--transition-base), background var(--transition-base) !important;
}

/* F .seg button: 28px, 12px sides (AntD's small / large groups keep their own, heavier size rules) */
.ant-radio-button-wrapper:where(:not(:is(td, th, .ant-table-cell) *)) {
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
}

.ant-radio-button-wrapper::before {
    display: none !important;
}

.ant-radio-button-wrapper:hover {
    color: var(--text-primary) !important;
}

.ant-radio-button-wrapper-checked {
    background: var(--color-bg-dark-tertiary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 1px 2px var(--glass-shadow) !important;
}

.ant-radio-button-wrapper-checked:hover {
    color: var(--text-primary) !important;
}

.ant-radio-button-wrapper:has(.ant-radio-button-input:focus-visible) {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 1px;
}

.ant-radio-button-wrapper-disabled {
    background: transparent !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

/* ========================================
   Adjustment Grid Item - Dark Theme
   ======================================== */

.adjustment-grid-item {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-10) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.adjustment-grid-item:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.15) !important;
}

.adjustment-grid-item.selected {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2) !important;
}

.adjustment-grid-item .item-preview {
    background: var(--color-fg-08) !important;
}

.adjustment-grid-item .adjustment-badge {
    background: var(--color-primary) !important;
}

.adjustment-grid-item .item-footer {
    border-top: 1px solid var(--color-fg-10) !important;
}

.adjustment-grid-item .item-name {
    color: var(--text-primary) !important;
}

.adjustment-grid-item .item-size {
    color: var(--color-fg-45) !important;
}

/* ===============================================
   Slider Overrides - Orange Theme
   =============================================== */

.ant-slider-rail {
    background: var(--color-fg-10) !important;
}

.ant-slider-track {
    background: var(--color-primary) !important;
}

.ant-slider-handle {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.ant-slider-handle:hover,
.ant-slider-handle:focus,
.ant-slider-handle-dragging {
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.2) !important;
    border-color: var(--color-primary) !important;
}

.ant-slider:hover .ant-slider-track {
    background: var(--color-primary-light) !important;
}

.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open) {
    border-color: var(--color-primary-light) !important;
}

/* ===============================================
   Modal/Drawer Overrides - Dark Theme
   I-031: header / body / footer spacing aligned to prototype F's modal (f.src.html l.556-566): no rules between the
   three, header 16 60 12 22 (F's close button sits in the header row; AntD's is absolute, so the right padding keeps
   the title clear of it), title 18px/600, body 16 22 4, footer 14 22 18 with Cancel then the action 10px apart,
   solid danger action. ModalService confirms (.ant-modal-confirm) keep their 24px body; the command palette keeps its
   own rules (Command Palette Modal). Pattern classes inside the body: app.css "Modal and error summary (I-031)".
   =============================================== */

/* F dims the page under a modal (--mask), it does not blur it: no backdrop-filter (I-041 TASK_12, global on purpose —
   every Modal, ModalService confirm and the command palette) */
.ant-modal-mask {
    background: var(--overlay-mask) !important;
}

.ant-modal-content {
    background: var(--color-bg-elevated) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--color-fg-10) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-panel-soft) !important;
    /* B-117: no overflow clip — AntD 1.6 renders the modal's popups (Select, pickers) inside this box; the radius holds without it */
    padding: 0 !important;
}

.ant-modal-header {
    background: transparent !important;
    border-bottom: none !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 16px 60px 12px 22px !important;
    /* F's header row is as tall as its 36px close button (16 + 36 + 12 = 64px); AntD's close is absolute, so the row
       keeps that height itself and centres the title in it (I-047 TASK_06 fidelity: 55px before) */
    display: flex;
    align-items: center;
    min-height: 64px;
}

.ant-modal-title {
    color: var(--text-primary) !important;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.5;
    /* F's title takes the row (o.html .md-h h2 l.562 flex: 1; min-width: 0), so a step counter after it sits at the
       row's end, 12px from the close — CF-089 TASK_10 fidelity fix F1 (the counter followed the title text before) */
    flex: 1;
    min-width: 0;
}

/* A multi-step title (ModalStepTitle: the title text, then span.modal-step): text left, counter right, centred on the
   row, F's 12px header gap between them when the title is long (o.html .md-h l.561, .md-step l.980) */
.ant-modal-title:has(> .modal-step) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
}

.ant-modal-close {
    color: var(--color-fg-45) !important;
    top: 16px !important;
    right: 12px !important;
}

/* F's 36px close button in the header row: 16px from the top, centred on the 64px header with the title */
.ant-modal-close-x {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
}

.ant-modal-close:hover {
    color: var(--text-primary) !important;
    background: var(--color-fg-08) !important;
    border-radius: 8px;
}

.ant-modal-body {
    padding: 16px 22px 4px !important;
    color: var(--color-fg-70) !important;
}

/* CF-089 AD-4: below 768px a modal keeps F's 16px on each side (o.html .md-mask padding 16, .md max-width 100%, l.558
   -559) instead of AntD 1.6.0's calc(100vw - 16px) / 8px; a wide modal is therefore the viewport minus 32px there. The
   command palette's own placement (Command Palette Modal, heavier and later) is not touched. */
@media (max-width: 767.98px) {
    .ant-modal {
        max-width: calc(100vw - 32px);
        margin: 16px auto;
    }
}

/* CF-089 AD-2: a modal whose step switches to ModalWidth.Wide (BulkPriceUpdateModal step 2). AntD 1.6.0 writes the
   dialog's width inline once, on first render, so the wide step widens the same dialog through its wrap class instead
   of remounting it; the mobile max-width above still applies. */
.ant-modal-wrap.modal-wrap--wide .ant-modal {
    width: 720px !important;
}

/* CF-089 AD-3: a Centered modal is centred by AntD's inline-block + a zero-width ::before; the whitespace Blazor renders
   between the two is a space of the wrap's font and pushed the dialog half a space right (58 / 56px at 834). The
   dialog sets its own font-size (AntD .ant-modal 14px), so nothing inside inherits the zero. */
.ant-modal-wrap.ant-modal-centered {
    font-size: 0;
}

/* I-031: ModalService confirms keep their look (no header / footer of their own, buttons inside the body) */
.ant-modal-confirm .ant-modal-body {
    padding: 24px !important;
}

.ant-modal-body p {
    color: var(--color-fg-70);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

/* B-009: AntD's dark heading colour is near-invisible on the dark modal. No !important and
   :where() keeps it at (0,0,1), so a heading class (.section-title-sm, …) still decides its own colour.
   B-028 (1342): the drawer body has the same problem, so it shares the rule. */
:where(.ant-modal-body, .ant-drawer-body) :is(h1, h2, h3, h4, h5, h6) {
    color: var(--text-primary);
}

/* ModalService.ConfirmAsync — AntD's light-theme text colours are black on the dark surface */
.ant-modal-confirm-body .ant-modal-confirm-title {
    color: var(--text-primary) !important;
    font-family: var(--font-display);
    font-weight: 600;
}

.ant-modal-confirm-body .ant-modal-confirm-content {
    color: var(--text-secondary) !important;
}

.ant-modal-footer {
    background: transparent !important;
    border-top: none !important;
    padding: 14px 22px 18px !important;
    text-align: right;
}

/* I-031: a footer made of buttons (ModalActionsFooter, with its optional reason / left-aligned extra action) is a
   row: right-aligned, F's 10px gap, wrapping; the reason / extra take the left (app.css .modal-actions-footer__*).
   A footer fragment with a wrapper of its own keeps AntD's text-align layout. */
.ant-modal-footer:not(:has(> :not(.ant-btn, .modal-actions-footer__reason, .modal-actions-footer__extra))) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.ant-modal-footer:not(:has(> :not(.ant-btn, .modal-actions-footer__reason, .modal-actions-footer__extra))) > .ant-btn + .ant-btn {
    margin-left: 0 !important;
}

/* The footer button look, also for the inline footer of a form-submit modal (app.css .modal-actions-footer) */
:is(.ant-modal-footer, .modal-actions-footer) .ant-btn {
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-default {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-15) !important;
    color: var(--color-fg-70) !important;
}

/* CF-099 F-b7-07: the footer's own hover ink (text-primary on the fg-10 ground) must out-rank the general default-button
   hover below (primary-text ink, the same (0,3,0) weight and later in the file): it did not, so a hovered / focused Otkaži
   read the orange ink on the grey ground — 4.17 : 1 in light (measured at 390 in Potvrditi otpremu?) */
:is(.ant-modal-footer, .modal-actions-footer) .ant-btn.ant-btn-default:is(:hover, :focus-visible):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled):not(.ant-btn-dangerous)) {
    background: var(--color-fg-10) !important;
    border-color: var(--color-fg-25) !important;
    color: var(--text-primary) !important;
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-primary {
    font-weight: 600; /* F .btn--primary; the footer's default button stays 500 (I-047 TASK_06 fidelity) */
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35) !important;
}

/* B-008 (2606): :not([disabled]) so an attribute-disabled anchor button never lights up */
:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-primary:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45) !important;
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-dangerous {
    background: rgba(var(--color-error-rgb), 0.15) !important;
    border: 1px solid rgba(var(--color-error-rgb), 0.25) !important;
    color: var(--color-error-light) !important;
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-dangerous:hover {
    background: rgba(var(--color-error-rgb), 0.25) !important;
    border-color: rgba(var(--color-error-rgb), 0.4) !important;
}

/* Closed AntDesign drawers keep their full DOM rendered off-screen
   (transform: translateX(100%), z-index: -9999) and stay exposed in the
   accessibility tree, so Playwright/a11y snapshots list every field and button
   of a drawer that is not actually open. Clicking those phantom elements can
   never succeed — they sit outside the viewport behind a transform no scroll
   can reach ("element is outside of the viewport", retried until timeout).
   visibility:hidden removes the closed drawer from hit-testing and the a11y
   tree; the 0.3s delay matches the wrapper's slide transition so the close
   animation still plays before the drawer disappears. */
.ant-drawer:not(.ant-drawer-open) {
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
}

/* I-031 (README Decision 6): the destructive action is solid (F .btn--danger-solid) — Primary + Danger */
:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-primary.ant-btn-dangerous:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: var(--color-error) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--color-on-error) !important;
    font-weight: 600;
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-primary.ant-btn-dangerous:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: var(--color-error-light) !important;
    color: var(--color-on-error) !important;
    transform: translateY(-1px);
}

:is(.ant-modal-footer, .modal-actions-footer) .ant-btn-primary.ant-btn-dangerous:is(:disabled, [disabled], .ant-btn-disabled) {
    background: rgba(var(--color-error-rgb), 0.3) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--color-fg-50) !important;
}

/* Same as the modal mask: F's drawer .mask dims, no blur (I-041 TASK_12, every Drawer) */
.ant-drawer-mask {
    background: var(--overlay-mask) !important;
}

.ant-drawer-content {
    background: var(--color-bg-elevated) !important;
    backdrop-filter: blur(24px);
}

.ant-drawer-header {
    background: transparent !important;
    border-color: var(--color-fg-10) !important;
    position: relative;
    padding-right: 56px !important;
}

.ant-drawer-title {
    color: var(--text-primary) !important;
}

.ant-drawer-close {
    color: var(--color-fg-65) !important;
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border-radius: 8px;
}

.ant-drawer-close:hover {
    color: var(--text-primary) !important;
    background: var(--color-fg-08) !important;
}

.ant-drawer-body {
    background: transparent !important;
    color: var(--text-primary) !important;
}

.ant-drawer-body p {
    color: var(--text-secondary) !important;
}

/* EntityFormDrawer — full-bleed body so footer can sit sticky at bottom.
   The drawer body is a flex column; the inner body grows to fill the
   remaining space (and scrolls when content overflows) so the footer
   stays pinned to the bottom of the drawer. */
.entity-drawer .ant-drawer-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden !important;
}

.entity-drawer .entity-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-lg);
}

.entity-drawer .entity-drawer-footer.form-actions-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: var(--space-md) var(--space-lg);
}

.entity-drawer .entity-drawer-footer__start {
    margin-right: auto;
}

@media (max-width: 480px) {
    .entity-drawer .entity-drawer-footer__start {
        margin-right: 0;
    }

    .entity-drawer .entity-drawer-footer__start .ant-btn {
        width: 100%;
    }
}

/* Mobile (≤768px): a plain .entity-drawer (history, fiscal-year drawers) expands to full viewport width.
   EntityFormDrawer (.form-drawer--medium) goes full width only at ≤640px, as the prototype (app.css, CF-088 AD-1a). */
@media (max-width: 768px) {
    .entity-drawer.ant-drawer-right:not(.form-drawer--medium) .ant-drawer-content-wrapper,
    .entity-drawer:not(.form-drawer--medium) .ant-drawer-content-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* ===============================================
   Image Adjustment Editor - Dark Theme
   =============================================== */

.image-adjustment-editor {
    background: var(--color-bg-elevated) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--color-fg-10) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-panel-soft) !important;
}

.image-adjustment-editor .editor-header {
    border-bottom: 1px solid var(--color-fg-10) !important;
}

.image-adjustment-editor .editor-title {
    color: var(--text-primary) !important;
}

.image-adjustment-editor .editor-header .ant-btn-text {
    color: var(--color-fg-65) !important;
}

.image-adjustment-editor .editor-header .ant-btn-text:hover {
    color: var(--text-primary) !important;
    background: var(--color-fg-10) !important;
}

/* Platform tabs */
.image-adjustment-editor .platform-tabs .ant-tabs-nav::before {
    border-color: var(--color-fg-10) !important;
}

.image-adjustment-editor .platform-tabs .ant-tabs-tab {
    color: var(--color-fg-65) !important;
}

.image-adjustment-editor .platform-tabs .ant-tabs-tab:hover {
    color: var(--color-primary) !important;
}

.image-adjustment-editor .platform-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
    color: var(--color-primary) !important;
}

.image-adjustment-editor .platform-tabs .ant-tabs-ink-bar {
    background: var(--color-primary) !important;
}

/* Preview container */
.image-adjustment-editor .preview-container {
    background-color: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-10) !important;
    border-radius: 12px !important;
}

.image-adjustment-editor .preview-wrapper {
    background-color: var(--color-fg-08) !important;
}

/* Controls panel */
.image-adjustment-editor .controls-panel {
    background-color: var(--color-fg-03) !important;
    border: 1px solid var(--color-fg-08) !important;
    border-radius: 12px !important;
}

.image-adjustment-editor .controls-panel .ant-divider {
    border-color: var(--color-fg-10) !important;
}

/* Slider labels */
.image-adjustment-editor .slider-label,
.image-adjustment-editor .control-label {
    color: var(--text-primary) !important;
}

.image-adjustment-editor .slider-value {
    color: var(--color-primary) !important;
}

/* Offset controls */
.image-adjustment-editor .offset-label {
    color: var(--color-fg-45) !important;
}

.image-adjustment-editor .offset-header .ant-btn {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-15) !important;
    color: var(--color-fg-85) !important;
}

.image-adjustment-editor .offset-header .ant-btn:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* InputNumber styling */
.image-adjustment-editor .ant-input-number {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-15) !important;
    color: var(--text-primary) !important;
}

.image-adjustment-editor .ant-input-number:hover,
.image-adjustment-editor .ant-input-number:focus,
.image-adjustment-editor .ant-input-number-focused {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2) !important;
}

.image-adjustment-editor .ant-input-number-input {
    color: var(--text-primary) !important;
}

.image-adjustment-editor .ant-input-number-handler-wrap {
    background: var(--color-fg-05) !important;
    border-left: 1px solid var(--color-fg-15) !important;
}

.image-adjustment-editor .ant-input-number-handler {
    border-color: var(--color-fg-10) !important;
}

.image-adjustment-editor .ant-input-number-handler:hover {
    background: rgba(var(--color-primary-rgb), 0.15) !important;
}

.image-adjustment-editor .ant-input-number-handler-up-inner,
.image-adjustment-editor .ant-input-number-handler-down-inner {
    color: var(--color-fg-65) !important;
}

.image-adjustment-editor .ant-input-number-handler:hover .ant-input-number-handler-up-inner,
.image-adjustment-editor .ant-input-number-handler:hover .ant-input-number-handler-down-inner {
    color: var(--color-primary) !important;
}

/* Control hint */
.image-adjustment-editor .control-hint {
    color: var(--color-fg-65) !important;
    background-color: rgba(var(--color-primary-rgb), 0.1) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.2) !important;
    border-radius: 8px !important;
}

.image-adjustment-editor .control-hint .anticon {
    color: var(--color-primary) !important;
}

/* Quick buttons */
.image-adjustment-editor .quick-buttons .ant-btn,
.image-adjustment-editor .scale-presets .ant-btn {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-15) !important;
    color: var(--color-fg-85) !important;
}

.image-adjustment-editor .quick-buttons .ant-btn:hover,
.image-adjustment-editor .scale-presets .ant-btn:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* Toolbar */
.image-adjustment-editor .adjustment-toolbar {
    background-color: var(--color-fg-03) !important;
    border-top: 1px solid var(--color-fg-10) !important;
    border-radius: 0 0 16px 16px !important;
}

.image-adjustment-editor .adjustment-toolbar .ant-btn-default {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--color-fg-15) !important;
    color: var(--color-fg-85) !important;
}

.image-adjustment-editor .adjustment-toolbar .ant-btn-default:hover:not(:disabled) {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.image-adjustment-editor .adjustment-toolbar .ant-btn-default:disabled {
    background: var(--color-fg-03) !important;
    border-color: var(--color-fg-08) !important;
    color: var(--color-fg-25) !important;
}

.image-adjustment-editor .adjustment-toolbar .ant-btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35) !important;
}

.image-adjustment-editor .adjustment-toolbar .ant-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45) !important;
}

/* Platform overlay - Orange crop guide */
.platform-overlay .margin-guide {
    border-color: rgba(var(--color-primary-rgb), 0.6) !important;
}

/* Platform label tag - Orange theme */
.platform-overlay .platform-label .ant-tag,
.platform-overlay .platform-label .ant-tag-blue {
    background: rgba(var(--color-primary-rgb), 0.15) !important;
    color: var(--color-primary-text) !important;
    border-color: rgba(var(--color-primary-rgb), 0.25) !important;
}

/* ===============================================
   Progress Bar Overrides — prototype F .prog (I-036)
   Solid --color-primary fill (no gradient), track --color-fg-10 (F's 10 % ink), radius 4, label 13px secondary.
   The status classes AntD puts on the root win over the fill, so Status=Success / Exception render green / red.
   Global — every Progress is meant to change.
   =============================================== */

.ant-progress-bg {
    background: var(--color-primary) !important;
    border-radius: 4px !important;
}

.ant-progress-inner {
    background: var(--color-fg-10) !important;
    border-radius: 4px !important;
}

.ant-progress-text {
    color: var(--text-secondary) !important;
    font-variant-numeric: tabular-nums;
}

.ant-progress-line .ant-progress-text {
    font-size: 13px;
}

.ant-progress-success-bg,
.ant-progress-status-success .ant-progress-bg {
    background: var(--color-success-hover) !important;
}

.ant-progress-status-exception .ant-progress-bg {
    background: var(--color-error-light) !important;
}

.ant-progress-status-success .ant-progress-text {
    color: var(--color-success-hover) !important;
}

.ant-progress-status-exception .ant-progress-text {
    color: var(--color-error-light) !important;
}

/* Progress circle (if used) */
.ant-progress-circle-path {
    stroke: var(--color-primary) !important;
}

.ant-progress-status-success .ant-progress-circle-path {
    stroke: var(--color-success-hover) !important;
}

.ant-progress-status-exception .ant-progress-circle-path {
    stroke: var(--color-error-light) !important;
}

.ant-progress-circle-trail {
    stroke: var(--color-fg-10) !important;
}

/* ===============================================
   Result — the .wizard-result ring look (I-036 Decision 9)
   The icon sits in a 72px ring at a 14 % tint of its status (success / error / warning; info and the rest muted
   = --color-fg-08 + --text-secondary), the same tokens as app.css .wizard-result__ring*, which stays the wizard's own.
   Title 24 / 700 --text-primary, subtitle --text-secondary. Global — every AntD Result is meant to change.
   =============================================== */

.ant-result-icon {
    --result-hue: var(--text-secondary);
    width: 72px;
    height: 72px;
    margin: 0 auto 10px !important;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-fg-08);
    color: var(--result-hue);
}

.ant-result-success .ant-result-icon,
.ant-result-error .ant-result-icon,
.ant-result-warning .ant-result-icon {
    background: color-mix(in srgb, var(--result-hue) 14%, transparent);
}

.ant-result-success .ant-result-icon {
    --result-hue: var(--color-success);
}

.ant-result-error .ant-result-icon {
    --result-hue: var(--color-error);
}

.ant-result-warning .ant-result-icon {
    --result-hue: var(--color-warning);
}

.ant-result .ant-result-icon > .anticon {
    font-size: 34px !important;
    color: var(--result-hue) !important;
}

.ant-result .ant-result-icon svg {
    fill: currentColor !important;
}

.ant-result-title {
    color: var(--text-primary) !important;
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}

.ant-result-subtitle {
    color: var(--text-secondary) !important;
}

/* ===============================================
   BatchProgress Component - Dark Theme
   =============================================== */

.batch-progress {
    padding: 24px;
}

.batch-progress .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.batch-progress .progress-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin: 0 0 4px 0;
}

.batch-progress .progress-subtitle {
    font-size: 14px;
    color: var(--color-fg-65) !important;
    margin: 0;
}

.batch-progress .progress-stats {
    display: flex;
    gap: 12px;
    font-size: 14px;
}

.batch-progress .stat-completed {
    color: var(--color-primary) !important;
}

.batch-progress .stat-failed {
    color: var(--color-error-light) !important;
}

.batch-progress .stat-total {
    color: var(--color-fg-65) !important;
}

/* Connection status badges - dark theme */
.batch-progress .connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.batch-progress .connection-status.connected {
    background-color: rgba(var(--color-primary-rgb), 0.15) !important;
    color: var(--color-primary-text) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
}

.batch-progress .connection-status.connecting {
    background-color: rgba(var(--color-warning-rgb), 0.15) !important;
    color: var(--color-warning-light) !important;
    border: 1px solid rgba(var(--color-warning-rgb), 0.25);
}

.batch-progress .connection-status.disconnected {
    background-color: rgba(var(--color-error-rgb), 0.15) !important;
    color: var(--color-error-light) !important;
    border: 1px solid rgba(var(--color-error-rgb), 0.25);
}

/* Image grid - dark theme */
.batch-progress .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.batch-progress .image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.batch-progress .image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-fg-05) !important;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.batch-progress .image-item.pending .image-preview {
    border-color: var(--color-fg-15) !important;
}

.batch-progress .image-item.processing .image-preview {
    border-color: var(--color-primary) !important;
}

.batch-progress .image-item.completed .image-preview {
    border-color: var(--color-primary) !important;
}

.batch-progress .image-item.failed .image-preview {
    border-color: var(--color-error-light) !important;
}

.batch-progress .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-progress .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-fg-35) !important;
    font-size: 24px;
}

/* Status overlay - dark glass */
.batch-progress .status-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--surface-overlay-strong) !important;
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-progress .status-icon {
    font-size: 18px;
}

.batch-progress .status-icon.pending {
    color: var(--color-fg-45) !important;
}

.batch-progress .status-icon.completed {
    color: var(--color-primary) !important;
}

.batch-progress .status-icon.failed {
    color: var(--color-error-light) !important;
}

/* Step text */
.batch-progress .image-info {
    text-align: center;
}

.batch-progress .step-text {
    font-size: 12px;
    color: var(--color-fg-65) !important;
}

.batch-progress .step-text.success {
    color: var(--color-primary) !important;
    font-weight: 500;
}

.batch-progress .step-text.error {
    color: var(--color-error-light) !important;
    font-weight: 500;
}

/* Processing step - ensure full width */
.step-processing > * {
    width: 100%;
}

/* Result component in processing step - full width */
.step-processing .ant-result {
    width: 100%;
    max-width: 100%;
    padding: 48px 24px;
}

/* ===============================================
   Checkout Success Page - Dark Glassmorphism Theme
   =============================================== */

.checkout-success-page,
div.checkout-success-page,
.ant-layout-content .checkout-success-page,
.checkout-result-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: transparent !important;
    background-color: transparent !important;
    position: relative;
    overflow: hidden;
}

/* Override any Result component container */
.checkout-success-page .result-container,
.checkout-result-page .result-container,
.checkout-success-page .success-container {
    background: var(--color-fg-05) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--color-fg-10) !important;
    border-radius: 24px !important;
    padding: 48px !important;
    max-width: 500px !important;
    box-shadow: 0 4px 24px rgba(var(--color-shadow-rgb), 0.25) !important;
}

/* Background orbs */
.checkout-success-page .bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    pointer-events: none;
}

.checkout-success-page .bg-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.3) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float-slow 25s ease-in-out infinite;
}

.checkout-success-page .bg-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(var(--color-success-rgb), 0.2) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: float-slow 20s ease-in-out infinite reverse;
}

.checkout-success-page .bg-orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: success-pulse-glow 4s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

@keyframes success-pulse-glow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Success container */
.checkout-success-page .success-container {
    max-width: 500px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    box-shadow: 0 4px 24px rgba(var(--color-shadow-rgb), 0.25),
    0 1px 1px var(--color-fg-05) inset;
}

/* Success icon */
.checkout-success-page .success-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-xl);
}

.checkout-success-page .success-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--color-success) 30%, transparent);
    animation: ring-pulse 2s ease-out infinite;
}

@keyframes ring-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.checkout-success-page .success-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--color-success) 40%, transparent),
    0 0 60px color-mix(in srgb, var(--color-success) 20%, transparent);
    animation: icon-appear 0.5s ease-out 0.3s both;
}

@keyframes icon-appear {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-success-page .success-icon .anticon {
    font-size: 48px;
    color: var(--color-on-success);
    animation: checkmark 0.4s ease-out 0.6s both;
}

@keyframes checkmark {
    from {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Title and subtitle */
.checkout-success-page .success-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    letter-spacing: -0.02em;
    animation: fadeIn 0.5s ease-out 0.5s both;
}

.checkout-success-page .success-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 var(--space-xl) 0;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Plan badge */
.checkout-success-page .success-details {
    margin-bottom: var(--space-xl);
    animation: fadeIn 0.5s ease-out 0.7s both;
}

.checkout-success-page .plan-badge {
    display: inline-flex;
    flex-direction: column;
    gap: var(--space-xs);
    background: linear-gradient(135deg, rgba(var(--color-tier-enterprise-rgb), 0.15) 0%, rgba(var(--color-amber-rgb), 0.15) 100%);
    border: 1px solid rgba(var(--color-tier-enterprise-rgb), 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-xl);
}

.checkout-success-page .plan-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.checkout-success-page .plan-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-tier-enterprise);
    text-transform: capitalize;
}

/* Action buttons */
.checkout-success-page .success-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    animation: fadeIn 0.5s ease-out 0.8s both;
}

@media (min-width: 400px) {
    .checkout-success-page .success-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.checkout-success-page .success-actions .ant-btn {
    height: 48px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-base) !important;
}

.checkout-success-page .success-actions .primary-action.ant-btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35) !important;
    min-width: 180px;
}

.checkout-success-page .success-actions .primary-action.ant-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45) !important;
}

.checkout-success-page .success-actions .secondary-action.ant-btn-default {
    background: var(--color-fg-05) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    min-width: 180px;
}

.checkout-success-page .success-actions .secondary-action.ant-btn-default:hover {
    background: var(--color-fg-10) !important;
    border-color: var(--glass-border-light) !important;
    color: var(--text-primary) !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .checkout-success-page .success-container {
        padding: var(--space-xl);
        border-radius: var(--radius-lg);
    }

    .checkout-success-page .success-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .checkout-success-page .success-icon .anticon {
        font-size: 36px;
    }

    .checkout-success-page .success-title {
        font-size: 1.5rem;
    }

    .checkout-success-page .success-actions .ant-btn {
        width: 100%;
    }
}

/* ===============================================
   OTP Input - Hide placeholder (cleaner look)
   Target any input with letter-spacing in its inline style
   =============================================== */

.ant-input[style*="letter-spacing"]::placeholder {
    color: transparent !important;
}

.ant-input[style*="letter-spacing"]::-webkit-input-placeholder {
    color: transparent !important;
}

.ant-input[style*="letter-spacing"]::-moz-placeholder {
    color: transparent !important;
}

.ant-input[style*="letter-spacing"]:-ms-input-placeholder {
    color: transparent !important;
}

/* ===============================================
   Form Loading Overlay - Dark Theme
   =============================================== */

.ant-spin-nested-loading > div > .ant-spin {
    max-height: unset;
}

.ant-spin-blur {
    opacity: 0.5;
}

.ant-spin-blur::after {
    background: transparent !important;
}

.ant-spin-container::after {
    background: var(--overlay-mask-soft) !important;
}

/* ===============================================
   Change Email Modal - Input Styling
   =============================================== */

.change-email-modal .ant-form-item-label > label {
    color: var(--color-fg-70) !important;
}

.change-email-modal .ant-input {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
}

.change-email-modal .ant-input:hover {
    border-color: var(--color-fg-25) !important;
}

.change-email-modal .ant-input:focus,
.change-email-modal .ant-input-focused {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2) !important;
}

.change-email-modal .ant-input::placeholder {
    color: var(--color-fg-35) !important;
}

/* Modal description text */
.change-email-modal .ant-modal-body p {
    color: var(--color-fg-70) !important;
    margin: 0 0 24px 0 !important;
    line-height: 1.6;
}

/* Code expiry notice: the one rule for the change-email and the step-up modal. A neutral notice, so the neutral info
   face (I-036: info is neutral) — never the attention (cobalt) ground, which read 4.47 : 1 in dark (CF-099 F-b1-09) */
.change-email-modal .code-expiry,
.step-up-modal .code-expiry {
    background: var(--color-fg-04) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    margin-bottom: 24px !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    text-align: center !important;
}

/* ===============================================
   Layout Overflow Fix - Prevent body scrolling
   =============================================== */

/* Main content area - enable vertical scrolling inside content only */
.main-content.ant-layout-content,
.ant-layout-content.main-content,
main.main-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.main-content.ant-layout-content::-webkit-scrollbar,
.ant-layout-content.main-content::-webkit-scrollbar,
main.main-content::-webkit-scrollbar {
    display: none;
}

/* Content layout - fixed height, no overflow */
.content-layout.ant-layout,
.ant-layout.content-layout {
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Ensure the header does not shrink (the shell has no footer, I-051 AD-3) */
.main-header.ant-layout-header,
.ant-layout-header.main-header {
    flex-shrink: 0 !important;
}

/* ===============================================
   Help Popover Styling
   =============================================== */

.help-popover-overlay .ant-popover-inner {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.help-popover-overlay .ant-popover-arrow {
    display: none;
}

/* ===============================================
   Context Chooser Popover (I-024)
   The popover is only the positioning host of .context-chooser-panel (app.css): the panel draws its own
   surface, border and shadow, so the wrapper loses its padding, its arrow and its own surface. AntDesign
   gives every overlay the same inline z-index (9999), so with equal z-indexes the body order decided — and a
   re-shown popover can sit after the period Select's dropdown in the body, which then opened UNDER the panel
   (I-054, seen at 834). The popover takes AntDesign's own popover level (1030): still above the overlay
   sidebar (200), its mask (150) and the error bar (1000), and always under the Select's dropdown and the rail
   tooltip (9999).
   =============================================== */

.context-chooser-popover {
    z-index: 1030 !important;
}

/* AntDesign wraps the trigger in an inline-flex div: the labelled button fills its width, the rail button keeps its own */
.antblazor-overlay-trigger-wrapper:has(> .context-chooser) {
    width: 100%;
    vertical-align: top;
}

.antblazor-overlay-trigger-wrapper:has(> .context-chooser--rail) {
    width: auto;
}

.context-chooser-popover .ant-popover-inner {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.context-chooser-popover .ant-popover-inner-content {
    padding: 0;
}

.context-chooser-popover .ant-popover-arrow {
    display: none;
}

/* AntDesign already offsets the overlay by 4px: 6px between the trigger and the panel under it, 10px beside it,
   instead of the room it leaves for the arrow */
.context-chooser-popover.ant-popover-placement-bottomLeft,
.context-chooser-popover.ant-popover-placement-topLeft {
    padding-top: 2px;
    padding-bottom: 2px;
}

.context-chooser-popover.ant-popover-placement-rightTop,
.context-chooser-popover.ant-popover-placement-leftTop {
    padding-left: 6px;
    padding-right: 6px;
}

/* The list scrolls inside the panel. context-chooser.js lowers this to the room next to the trigger when there is less. */
.context-chooser-popover .context-chooser-panel {
    max-height: min(520px, calc(100vh - 32px));
}

/* A short fade instead of AntDesign's zoom: context-chooser.js measures the panel while it opens, and a scale
   would skew what it reads */
.ant-popover.context-chooser-popover.ant-zoom-big-enter {
    opacity: 1;
    transform: none;
    animation: shellMaskIn 0.14s ease-out both;
}

.ant-popover.context-chooser-popover.ant-zoom-big-leave {
    opacity: 0;
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .ant-popover.context-chooser-popover.ant-zoom-big-enter {
        animation: none;
    }
}

/* ===============================================
   Table pattern (I-028)
   The AntDesign side of the table pattern (app.css "Table pattern (I-028)"): compact selects in the bar, the
   two-line header cell that holds a header filter, the pinned actions column's edge shadow and the selected
   row. The edge shadow follows AntD's own scroll binding: the wrapper carries .ant-table-ping-right only
   while columns are hidden past the right edge, so a table that fits its card has none. I-032 adds the table
   inside a heavy-data scroll region (sticky header / group / totals rows) at the end of this block.
   =============================================== */

/* Selects in the bar have a fixed width (the cut-out's 190px), never wider than the bar. AntD Blazor writes
   width: 100% inline on every Select, which would put each one on a line of its own in the wrapping bar. */
.table-toolbar .ant-select {
    width: 190px !important;
    max-width: 100%;
}

/* Selects in the bar are compact: the bar is a strip, not a form row */
.table-toolbar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 28px;
    font-size: 0.8125rem;
}

.table-toolbar .ant-select-single .ant-select-selector .ant-select-selection-item,
.table-toolbar .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 26px;
}

/* I-034: page-scope pickers in the bar (a year / month / single DatePicker) take the bar's 28px and 13px too (F .tbar
   .sel). One class over the global 38px picker rule ("DatePicker / RangePicker field"); its border, background and
   radius stay. A picker keeps its own width. At <=480px the I-012 44px lift (app.css) still wins: it is a min-height. */
.table-toolbar .ant-picker {
    height: 28px;
    max-width: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.table-toolbar .ant-picker-input > input {
    font-size: 0.8125rem;
}

/* CF-094: a number input in the bar (PriceCalculationList's poslovna godina) is the bar's 28px / 13px too — the box and
   its inner <input>, which the global 38px rule ("InputNumber Overrides") sizes. From 481px only, so the I-012 44px lift
   (app.css) keeps the phone's touch target. */
@media (min-width: 481px) {
    .table-toolbar .ant-input-number {
        height: 28px;
        font-size: 0.8125rem;
    }

    .table-toolbar .ant-input-number .ant-input-number-input {
        height: 26px;
    }
}

/* I-034: a Segmented view toggle in the bar is 28px overall: a 2px inset and 22px items inside the 1px border (the
   global Segmented is 36px, "Segmented Overrides"). Its look is the global one. At <=480px the items take the
   I-012 44px lift (app.css). */
.table-toolbar .ant-segmented {
    padding: 2px !important;
}

.table-toolbar .ant-segmented-item-label {
    min-height: 22px;
    line-height: 22px;
}

/* I-034: a search in the bar (.table-toolbar__search, app.css) is the bar's 28px / 13px too — the affix wrapper carries
   the Prefix icon; (0,3,0) out-ranks the wrapper's height and radius rules. At <=480px the I-012 44px lift (app.css)
   still wins: it is a min-height. */
.table-toolbar .table-toolbar__search.ant-input-affix-wrapper {
    height: 28px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm) !important;
}

/* Header filter controls: full column width, 32px, 13px, the small radius (F .ct .filt .inp / .sel r8; I-041 TASK_12).
   A number input too (CF-094 TASK_07: InvoiceList's amount bounds), which AntD fixes at 90px otherwise. */
.table-header-filter__control .ant-input-affix-wrapper,
.table-header-filter__control .ant-select,
.table-header-filter__control .ant-input-number {
    width: 100%;
    font-size: 0.8125rem;
}

.table-header-filter__control .ant-input-affix-wrapper {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
}

/* F .ct .filt .inp / .sel: the header filter's controls have the small 8px radius (I-051 AD-6); !important like the
   controls' global radius it replaces */
.table-header-filter__control .ant-input-affix-wrapper,
.table-header-filter__control .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    border-radius: var(--radius-sm) !important;
}

.table-header-filter__control .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 32px;
    padding: 0 26px 0 10px; /* F .ct .filt .sel: the text runs to the arrow ("Sve kategorije" in 150px) */
}

.table-header-filter__control .ant-select-single .ant-select-selector .ant-select-selection-search {
    left: 10px;
    right: 26px;
}

.table-header-filter__control .ant-select-single .ant-select-selector .ant-select-selection-item,
.table-header-filter__control .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 30px;
    padding-right: 0;
}

/* I-034 (ported by I-048): a picker in a header filter — a RangePicker on a date column, a month / year / single
   DatePicker — is the header Input's box: full column width, 32px, 13px, the small radius. The global picker rule
   gives F's border and background (.inp) and sets no height inside a table cell. The range separator, the suffix icon
   and the active bar centre on the 32px line through AntD's own inline-flex row; the open panel is unchanged. */
.table-header-filter__control .ant-picker {
    width: 100%;
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: var(--radius-sm) !important;
}

.table-header-filter__control .ant-picker-input > input {
    font-size: 0.8125rem;
}

.table-header-filter__control .ant-picker-range-separator {
    padding: 0 6px;
}

/* A header row with a filter: every title starts on the first line (12px from the top), the controls sit
   on the second, 12px above the row's bottom edge — the prototype's two header rows in one. */
.ant-table-thead > tr:has(.table-header-filter) > th {
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: top;
}

/* The header cell of a header filter: the content overflows visibly (the control's focus ring) */
.ant-table-thead > tr > th:has(.table-header-filter) {
    overflow: visible;
}

/* The sort mark right after the label (I-051 AD-7, F .th-sort: label, 6px, arrows). A plain sortable header: the
   sorter box hugs its content (inline, so the cell's text-align still places it — a right-aligned amount column keeps
   its title on the right). A header filter: the title and the sort mark on the first line, the control under both
   across the column — the title wrapper and the filter's own column box step aside (display: contents), the control
   keeps its event-stopping wrapper */
.ant-table-thead > tr > th .ant-table-column-sorters:not(:has(.table-header-filter)) {
    display: inline-flex;
    justify-content: flex-start;
    gap: 6px;
    max-width: 100%;
}

.ant-table-thead > tr > th .ant-table-column-sorters:not(:has(.table-header-filter)) > .ant-table-column-title {
    flex: 0 1 auto;
    min-width: 0;
}

.ant-table-thead > tr > th .ant-table-column-sorters:not(:has(.table-header-filter)) > .ant-table-column-sorter {
    margin-left: 0;
}

.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-xs) 6px;
}

.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) > .ant-table-column-title,
.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) .table-header-filter {
    display: contents;
}

.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) .table-header-filter__title {
    grid-row: 1;
    grid-column: 1;
    min-width: 0;
}

.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) > .ant-table-column-sorter {
    grid-row: 1;
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
}

/* AntD lays a full-cell ::after over the sorter box (the whole header sorts on click); the control sits above it, or the
   overlay takes its clicks (I-051 TASK_05: the search in Proizvodi's Naziv header could not be clicked) */
.ant-table-thead > tr > th .ant-table-column-sorters:has(.table-header-filter) .table-header-filter__control {
    position: relative;
    z-index: 1;
    grid-row: 2;
    grid-column: 1 / -1;
}

/* Every other AntD table (I-051 AD-6; PR 705 #11118). F draws a table inside a card as its item grid (.it): 9px above
   and below, 14px in, 18px at the row's two ends — the Middle size. A dense grid is F's .it--dense: 9px above and below,
   8px in, 12px at the ends — the Small size, which stays dense (the modals' and wizards' grids, the tables playground's
   compact switch). AntD's own 12px 8px / 8px are the same weight and load first. The table pattern's 12px 16px below
   is the same weight and later, so .table-card tables keep it; the heavy-data densities (!important) and the ageing
   matrix's netting gutters (heavier, later) keep theirs. */
.ant-table.ant-table-middle .ant-table-thead > tr > th,
.ant-table.ant-table-middle .ant-table-tbody > tr > td,
.ant-table.ant-table-middle tfoot > tr > th,
.ant-table.ant-table-middle tfoot > tr > td {
    padding: 9px 14px;
}

.ant-table.ant-table-small .ant-table-thead > tr > th,
.ant-table.ant-table-small .ant-table-tbody > tr > td,
.ant-table.ant-table-small tfoot > tr > th,
.ant-table.ant-table-small tfoot > tr > td {
    padding: 9px 8px;
}

/* A ScrollX table's empty / failure row (LiteTable's AntD placeholder): the face sits in a sticky .ant-table-expanded-row-fixed
   sized (border-box) to the scroller's width. AntD pulls it back over the cell's padding with its own margin (-8px on a
   Middle table), but the cells here are padded wider (14 / 16 / 18px), so the face started 8px in and ran 8px past the
   scroller — the row scrolled sideways under a failure banner (CF-099 TASK_21, LotList's @empty / @error, the b5 reach
   of VR7). The cell keeps no side padding and the face no side margin: it spans the scroller exactly, its own 16px padding
   keeps the inset. */
.ant-table .ant-table-tbody > tr.ant-table-placeholder > td.ant-table-cell:has(> .ant-table-expanded-row-fixed) {
    padding-left: 0;
    padding-right: 0;
}

.ant-table .ant-table-tbody > tr.ant-table-placeholder > td.ant-table-cell > .ant-table-expanded-row-fixed {
    margin-left: 0;
    margin-right: 0;
}

/* The row's ends. A head / body cell's rule weighs (0,3,2) like the ones above and the table pattern's below, so the
   later .table-card shorthand still wins there */
.ant-table-middle .ant-table-thead > tr > th:first-child,
.ant-table-middle .ant-table-tbody > tr > td:first-child,
.ant-table-middle tfoot > tr > th:first-child,
.ant-table-middle tfoot > tr > td:first-child {
    padding-left: 18px;
}

.ant-table-middle .ant-table-thead > tr > th:last-child,
.ant-table-middle .ant-table-tbody > tr > td:last-child,
.ant-table-middle tfoot > tr > th:last-child,
.ant-table-middle tfoot > tr > td:last-child {
    padding-right: 18px;
}

.ant-table-small .ant-table-thead > tr > th:first-child,
.ant-table-small .ant-table-tbody > tr > td:first-child,
.ant-table-small tfoot > tr > th:first-child,
.ant-table-small tfoot > tr > td:first-child {
    padding-left: 12px;
}

.ant-table-small .ant-table-thead > tr > th:last-child,
.ant-table-small .ant-table-tbody > tr > td:last-child,
.ant-table-small tfoot > tr > th:last-child,
.ant-table-small tfoot > tr > td:last-child {
    padding-right: 12px;
}

/* Phones (CF-100 PR 710, MobileLayoutSweepTests): F's item-grid padding above is a desktop density. At 390 px its 14 px
   sides (18 px ends) took 12 px from every fixed-width column, so a seven-digit amount ("250.000,00" in 100 px) and a
   VAT rate ("20,00%" in 70 px) broke over two lines on /advance-invoices. Under 768 px these tables keep AntD's own
   padding (Middle 12px 8px, Small 8px), as before I-051. Same weight as the rules above and earlier than the table
   pattern's, so .table-card tables keep theirs. */
@media (max-width: 768px) {
    .ant-table.ant-table-middle .ant-table-thead > tr > th,
    .ant-table.ant-table-middle .ant-table-tbody > tr > td,
    .ant-table.ant-table-middle tfoot > tr > th,
    .ant-table.ant-table-middle tfoot > tr > td {
        padding: 12px 8px;
    }

    .ant-table.ant-table-small .ant-table-thead > tr > th,
    .ant-table.ant-table-small .ant-table-tbody > tr > td,
    .ant-table.ant-table-small tfoot > tr > th,
    .ant-table.ant-table-small tfoot > tr > td {
        padding: 8px;
    }
}

/* The table pattern's cells (I-051 AD-6; CF-100 TASK_05 measured F's .ct): 12px all round, the row's first cell 16px
   in from the card's edge and 0 on its right (F .ct th:first-child) — the 8px of AntD's small table made the list
   tables tighter than F, and 16px on every side made them wider (a 76px "Jedinica" header wrapped where F's fits). */
.table-card .ant-table .ant-table-thead > tr > th,
.table-card .ant-table .ant-table-tbody > tr > td,
.table-card .ant-table tfoot > tr > th,
.table-card .ant-table tfoot > tr > td {
    padding: 12px;
}

.table-card .ant-table .ant-table-thead > tr > th:first-child,
.table-card .ant-table .ant-table-tbody > tr > td:first-child,
.table-card .ant-table tfoot > tr > th:first-child,
.table-card .ant-table tfoot > tr > td:first-child {
    padding-left: 16px;
    padding-right: 0;
}

/* The selection column's checkbox sits at the row's start like F's, not centred in its 40px */
.table-card .ant-table .ant-table-selection-column {
    text-align: left;
}

/* A card that holds F's item grid, not the table pattern (CF-087 TASK_05, F .tcard > .it, the overviews' short
   tables): the Middle density above — 9px 14px, 18px at the row's two ends — where .table-card alone would give the
   pattern's 12px, and F's line box (the browser's normal, as the obligations matrix: AntD's 1.5715 made the header
   row 3.6px taller). Heavier than the .table-card rules, so it wins in both directions; under 768 px AntD's own
   Middle padding, as for every other Middle table */
.table-card.table-card--grid .ant-table .ant-table-thead > tr > th,
.table-card.table-card--grid .ant-table .ant-table-tbody > tr > td {
    padding: 9px 14px;
    line-height: normal;
}

.table-card.table-card--grid .ant-table .ant-table-thead > tr > th:first-child,
.table-card.table-card--grid .ant-table .ant-table-tbody > tr > td:first-child {
    padding-left: 18px;
}

.table-card.table-card--grid .ant-table .ant-table-thead > tr > th:last-child,
.table-card.table-card--grid .ant-table .ant-table-tbody > tr > td:last-child {
    padding-right: 18px;
}

@media (max-width: 768px) {
    .table-card.table-card--grid .ant-table .ant-table-thead > tr > th,
    .table-card.table-card--grid .ant-table .ant-table-tbody > tr > td {
        padding: 12px 8px;
    }
}

/* The select-all is F's bare 16px box in the title row: AntD's wrapper carries a 22px line box that made the row 3.6px
   taller than the titles beside it */
.table-card .ant-table .ant-table-thead .ant-table-selection-column .ant-checkbox-wrapper {
    line-height: 1;
    vertical-align: middle;
}

/* The filter row (CF-100, F .ct .filt): the header filters on a second header row (tr.table-filter-row in the
   table's HeaderTemplate), each control under its column's title, the search across two columns. The title row
   above it is 6px short at the bottom and has no rule, so the two rows read as one header (F .ct thead
   tr:first-child th); the filter row is 4px from the titles and 12px from the first data row, in body weight.
   Its pinned cell is the actions column's: AntD pins its own cells with an inline offset, this one by class. */
.table-card .ant-table .ant-table-thead > tr:has(+ tr.table-filter-row) > th {
    padding-bottom: 6px;
    border-bottom: 0;
    /* F .ct th: one line, the controls below carry the column's width; F's title is an inline-flex sort button, so a
       long one runs into the cell's padding and is clipped there, never ellipsized ("Poreska stopa" in 100px) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.table-card .ant-table .ant-table-thead > tr.table-filter-row > th {
    padding-top: 4px;
    padding-bottom: 12px;
    overflow: visible;
    font-weight: 400;
    vertical-align: top;
    /* F .filt th is start-aligned; AntD centres a thead th[colspan], so a Select spanning two columns
       (CF-094: the normatives' product, the product maps' product and type) read its text centred */
    text-align: start;
}

.table-card .ant-table .ant-table-thead > tr.table-filter-row > th.ant-table-cell-fix-right {
    position: sticky;
    right: 0;
}

/* Row actions (CF-100, F .rowacts .btn--sm): 28px buttons, 10px in, 13px; the icon button is a 28px square */
.row-actions .ant-btn.ant-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 0.8125rem;
    border-radius: 6px;
}

.row-actions .ant-btn.ant-btn-sm.row-actions__icon {
    width: 28px;
    padding: 0;
}

/* The period range on the slim bar (CF-100, F .tbar-range .inp): 32px, 13px — the bar stays 52px high */
.table-toolbar__range .ant-picker {
    height: 32px;
    font-size: 0.8125rem;
}

.table-toolbar__range .ant-picker-input > input {
    font-size: 0.8125rem;
}

/* CF-085 review 10452: a load must not lock the header filters. AntD's Spin veils the whole table while Loading:
   the spinner layer (z-index 4, the table's full height) takes every click, and .ant-spin-blur sets
   pointer-events: none on the container and lays an ::after overlay over it. Inside a .table-card the spinner lets
   clicks through, the header row takes them again (the search, the Selects, the sort titles, the select-all) and
   stays at full strength; the rows stay veiled: dimmed, and blocked by the container's pointer-events: none. */
.table-card .ant-spin-nested-loading > div > .ant-spin {
    pointer-events: none;
}

.table-card .ant-spin-container.ant-spin-blur {
    opacity: 1;
}

.table-card .ant-spin-container.ant-spin-blur::after {
    display: none;
}

.table-card .ant-spin-blur .ant-table-thead {
    pointer-events: auto;
    user-select: auto;
}

.table-card .ant-spin-blur .ant-table-tbody,
.table-card .ant-spin-blur .ant-pagination {
    opacity: 0.5;
}

/* A row's expand button (AntD ExpandTemplate): AntD paints it white with a currentColor plus, so on both themes it read
   as a blank white box beside the row checkbox. The App's control surface and border, the plus / minus in the secondary
   text (CF-098 TASK_18: the transfer job's conflicts, whose rows open the worker's explanation) */
.ant-table-row-expand-icon {
    background: var(--color-fg-05);
    border-color: var(--color-fg-25);
    color: var(--text-secondary);
}

.ant-table-row-expand-icon:hover,
.ant-table-row-expand-icon:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Pinned actions: the edge shadow on the first right-pinned cell, only while the table is scrolled away from
   its right edge. It replaces AntD's own ::after shadow, which is a light-theme value. */
.ant-table-ping-right .ant-table-cell-fix-right-first::after,
.ant-table-ping-right .ant-table-cell-fix-right-last::after,
.ant-table-ping-left .ant-table-cell-fix-left-first::after,
.ant-table-ping-left .ant-table-cell-fix-left-last::after {
    box-shadow: none;
}

.ant-table-ping-right .ant-table-thead > tr > th.ant-table-cell-fix-right-first,
.ant-table-ping-right .ant-table-tbody > tr > td.ant-table-cell-fix-right-first,
.ant-table-ping-right .ant-table-summary > tr > td.ant-table-cell-fix-right-first {
    box-shadow: -1px 0 0 var(--glass-border), -12px 0 14px -12px var(--table-pin-shadow);
}

/* I-029: the mirror for a left-pinned column (the obligations matrix's client column), only while columns hide
   past its right edge (.ant-table-ping-left) */
.ant-table-ping-left .ant-table-thead > tr > th.ant-table-cell-fix-left-last,
.ant-table-ping-left .ant-table-tbody > tr > td.ant-table-cell-fix-left-last,
.ant-table-ping-left .ant-table-summary > tr > td.ant-table-cell-fix-left-last {
    box-shadow: 1px 0 0 var(--glass-border), 12px 0 14px -12px var(--table-pin-shadow);
}

/* Opt-in on a table-pattern host whose left pin and right pin together are wider than a phone card (a 220px name and
   a 180px actions column in a ~356px card — the names sat cut under the actions with no "…"): on a phone the left
   column lets go and scrolls with the rest, the actions stay pinned — heavy-data's phone rule (F ≤ 640px) for the table
   pattern. The cell keeps AntD's sticky position; `left: auto` un-pins it sideways (I-060, Evidens I-044 README
   Decision 28). */
@media (max-width: 640px) {
    .table-card--unpin-left-phone .ant-table-thead > tr > th.ant-table-cell-fix-left,
    .table-card--unpin-left-phone .ant-table-tbody > tr > td.ant-table-cell-fix-left {
        left: auto !important;
    }

    .table-card--unpin-left-phone .ant-table-ping-left .ant-table-thead > tr > th.ant-table-cell-fix-left-last,
    .table-card--unpin-left-phone .ant-table-ping-left .ant-table-tbody > tr > td.ant-table-cell-fix-left-last {
        box-shadow: none;
    }
}

/* The selected row: the primary tint, also on hover. A pinned cell stays opaque: the tint mixed into
   --table-pinned-bg. The .ant-table prefix out-ranks the hover and pinned-cell rules of app.css and of the
   "Table" block below, which would otherwise win on source order. */
.ant-table .ant-table-tbody > tr.ant-table-row-selected > td,
.ant-table .ant-table-tbody > tr.ant-table-row-selected:hover > td {
    background: var(--color-primary-bg) !important;
}

.ant-table .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-left,
.ant-table .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-right,
.ant-table .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-left,
.ant-table .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-right {
    background: color-mix(in srgb, var(--color-primary) 14%, var(--table-pinned-bg)) !important;
}

/* -----------------------------------------------
   I-032: the table inside a heavy-data scroll region (app.css "Heavy-data pattern (I-032)").
   The wrapper is the scroll container for both axes, so AntD's own horizontal scroller must not be one: a
   sticky cell sticks to its nearest scrolling ancestor, which would otherwise be .ant-table-content.
   Stacking order (prototype F): body 0 · pinned body 2 (AntD) · group row 3 · header / totals 4 · pinned group
   cell 5 · pinned header / totals cell 6. Every sticky surface is opaque — rows scroll under them.
   ----------------------------------------------- */

/* The heavy-data toolbar's Selects are F's ledger tools (32px, up to 300px wide, never under 150px): a filter label
   such as "Klasa 2 — Kratkoročna potraživanja, plasmani i gotovina (57)" outgrows the I-028 bar's 190px. Same
   specificity as the .table-toolbar rules above, later in the file (I-032 TASK_08). */
.heavy-data-toolbar .ant-select {
    flex: 0 1 300px;
    width: auto !important;
    min-width: 150px;
}

.heavy-data-toolbar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 32px;
    border-radius: var(--radius-sm) !important;
}

/* The toolbar search is F's .lg-tools .inp too: 32px with the small radius, not the 38px form input (I-041 TASK_11).
   The search is the affix wrapper (a Prefix icon); (0,2,0) out-ranks the wrapper's height and radius rules. */
.heavy-data-toolbar .heavy-data-toolbar__search.ant-input-affix-wrapper {
    height: 32px;
    border-radius: var(--radius-sm) !important;
}

/* The heavy-data filter card's selects and pickers are F's period strip controls (.lg-period .inp, 34px), a step
   under the 38px form controls; the radius stays the form's. Scoped to the archetype, so a form page's filter card
   keeps 38px. The I-012 <=480px 44px min-height (app.css) still wins on a phone (I-041 TASK_11). */
/* CF-091 AD-10: the saved-searches strip above it (SavedSearchesDropdown, F .lg-period .sel) is the same 34px control. */
/* CF-098 TASK_06: a Filteri strip on any page (.filter-card.filter-strip — the open-items workbench) takes the same
   34px controls. */
[data-pattern="heavy-data-page"] .filter-card .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
[data-pattern="heavy-data-page"] .filter-card .ant-picker,
[data-pattern="heavy-data-page"] .saved-searches .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
.filter-card.filter-strip .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
.filter-card.filter-strip .ant-picker {
    height: 34px;
}

/* CF-091 TASK_07: a multiple select in the strip (Kartica robe's Artikli, Lager lista's Magacini) stays one 34px row
   once a chip is chosen: the chips row does not wrap, so the search caret no longer drops to a second line (58px) */
[data-pattern="heavy-data-page"] .filter-strip .ant-select-multiple .ant-select-selection-overflow {
    flex-wrap: nowrap;
    overflow: hidden;
}

/* CF-091: a number input in the strip (Uporedno za plaćanje's threshold, KEPU's year) is the same 34px control: the box
   and its inner input a step under the 38px form input */
[data-pattern="heavy-data-page"] .filter-card .ant-input-number,
.filter-card.filter-strip .ant-input-number {
    height: 34px;
}

[data-pattern="heavy-data-page"] .filter-card .ant-input-number .ant-input-number-input,
.filter-card.filter-strip .ant-input-number .ant-input-number-input {
    height: 32px;
}

[data-pattern="heavy-data-page"] .filter-card .ant-select-single .ant-select-selector .ant-select-selection-item,
[data-pattern="heavy-data-page"] .filter-card .ant-select-single .ant-select-selector .ant-select-selection-placeholder,
[data-pattern="heavy-data-page"] .saved-searches .ant-select-single .ant-select-selector .ant-select-selection-item,
[data-pattern="heavy-data-page"] .saved-searches .ant-select-single .ant-select-selector .ant-select-selection-placeholder,
.filter-card.filter-strip .ant-select-single .ant-select-selector .ant-select-selection-item,
.filter-card.filter-strip .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 32px;
}

[data-pattern="heavy-data-page"] .filter-card .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input,
[data-pattern="heavy-data-page"] .saved-searches .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input,
.filter-card.filter-strip .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {
    height: 32px;
}

.heavy-data-toolbar .ant-select-single .ant-select-selector .ant-select-selection-item,
.heavy-data-toolbar .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 30px;
}

.heavy-data-scroll .ant-table-content {
    overflow: visible !important;
}

/* The context chooser's year select (period level): F .sel--year — 30px, 10px in, 13px (I-051 TASK_05). Same
   specificity as the toolbar rules above, so it beats the default 38px below */
.context-chooser-panel__period .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 30px;
    padding-left: 10px;
    font-size: 0.8125rem;
}

.context-chooser-panel__period .ant-select-single .ant-select-selector .ant-select-selection-item,
.context-chooser-panel__period .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 28px;
}

.context-chooser-panel__period .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {
    height: 28px;
}

/* AntD makes tfoot its own stacking context (relative, z-index 2) — the totals cells must stack with the body */
.heavy-data-scroll .ant-table-summary {
    position: static;
    z-index: auto;
    background: transparent;
}

/* Header: opaque. Out-ranks the translucent .ant-table-thead rule and the pinned-cell rules of app.css */
.heavy-data-scroll .ant-table .ant-table-thead > tr > th {
    background: var(--heavy-data-solid-2) !important;
    border-bottom: 1px solid var(--glass-border-light) !important;
    white-space: normal;
}

/* Body rows: opaque on the pinned surface, as F's ledger — otherwise the pinned Šifra / Naziv cells read as a darker
   band beside cells that show the glass card through (I-032 TASK_08). (0,4,2) out-ranks the (0,3,2) pinned-cell rule
   of app.css; the group and active rows below win by source order. Hover lifts the row to the header surface. */
.heavy-data-scroll .ant-table .ant-table-tbody > tr.ant-table-row > td {
    background: var(--heavy-data-solid) !important;
}

.heavy-data-scroll .ant-table .ant-table-tbody > tr.ant-table-row:hover > td {
    background: var(--heavy-data-solid-2) !important;
}

/* Group header rows: opaque, also on hover and in the pinned cells */
.heavy-data-scroll .ant-table .ant-table-tbody > tr.heavy-data-group-row > td {
    background: var(--heavy-data-solid-2) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Totals row: opaque band with a heavier top rule */
.heavy-data-scroll .ant-table .ant-table-summary > tr > td {
    background: var(--heavy-data-solid-2) !important;
    border-top: 1px solid var(--glass-border-light);
    border-bottom: 0;
}

/* A row the page wants to stand out (the trial balance: an account with turnover while every account is shown):
   F's 9 % primary tint, mixed into the pinned surface so it stays opaque under the sticky rows */
.heavy-data-scroll .ant-table .ant-table-tbody > tr.heavy-data-row--active > td {
    background: color-mix(in srgb, var(--color-primary) 9%, var(--heavy-data-solid)) !important;
}

.heavy-data-scroll .ant-table .ant-table-tbody > tr.heavy-data-row--active:hover > td {
    background: color-mix(in srgb, var(--color-primary) 14%, var(--heavy-data-solid)) !important;
}

.heavy-data-scroll .ant-table-tbody > tr.heavy-data-row--active > td.ant-table-cell-fix-left-last {
    font-weight: var(--font-weight-semibold);
}

.heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-left,
.heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-right,
.heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-left,
.heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-right {
    z-index: 6;
}

.heavy-data-scroll .ant-table-tbody > tr.heavy-data-group-row > td.ant-table-cell-fix-left,
.heavy-data-scroll .ant-table-tbody > tr.heavy-data-group-row > td.ant-table-cell-fix-right {
    z-index: 5;
}

/* Edge shadow of the pinned columns. AntD sets .ant-table-ping-left / -right from .ant-table-content's scroll,
   which no longer scrolls inside the region, so those classes go stale; the shadow is driven by the region's
   own scroll timeline (--heavy-data-x) instead — the same semantics as I-028: left pins once scrolled away from
   the left edge, right pins until the right end. Without scroll-driven animations (Firefox today) there is no
   shadow; the pinned cells stay opaque either way. */
.heavy-data-scroll .ant-table-ping-left .ant-table-thead > tr > th.ant-table-cell-fix-left-last,
.heavy-data-scroll .ant-table-ping-left .ant-table-tbody > tr > td.ant-table-cell-fix-left-last,
.heavy-data-scroll .ant-table-ping-left .ant-table-summary > tr > td.ant-table-cell-fix-left-last,
.heavy-data-scroll .ant-table-ping-right .ant-table-thead > tr > th.ant-table-cell-fix-right-first,
.heavy-data-scroll .ant-table-ping-right .ant-table-tbody > tr > td.ant-table-cell-fix-right-first,
.heavy-data-scroll .ant-table-ping-right .ant-table-summary > tr > td.ant-table-cell-fix-right-first {
    box-shadow: none;
}

@supports (animation-timeline: scroll()) {
    .heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-left-last,
    .heavy-data-scroll .ant-table-tbody > tr > td.ant-table-cell-fix-left-last,
    .heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-left-last {
        animation: heavy-data-pin-left linear both;
        animation-timeline: --heavy-data-x;
        animation-range: 0 24px;
    }

    .heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-right-first,
    .heavy-data-scroll .ant-table-tbody > tr > td.ant-table-cell-fix-right-first,
    .heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-right-first {
        animation: heavy-data-pin-right linear both;
        animation-timeline: --heavy-data-x;
        animation-range: calc(100% - 24px) 100%;
    }
}

@keyframes heavy-data-pin-left {
    from {
        box-shadow: none;
    }
    to {
        box-shadow: 1px 0 0 var(--glass-border), 12px 0 14px -12px var(--table-pin-shadow);
    }
}

@keyframes heavy-data-pin-right {
    from {
        box-shadow: -1px 0 0 var(--glass-border), -12px 0 14px -12px var(--table-pin-shadow);
    }
    to {
        box-shadow: none;
    }
}

/* Phone: only the first (key) column stays pinned — the name column scrolls with the amounts (F ≤ 640px). The
   cell keeps AntD's `position: sticky` (a header or group cell still sticks vertically); `left: auto` un-pins it
   sideways. The edge shadow moves to the key column. */
@media (max-width: 640px) {
    .heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-left:not(:first-child),
    .heavy-data-scroll .ant-table-tbody > tr > td.ant-table-cell-fix-left:not(:first-child),
    .heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-left:not(:first-child) {
        left: auto !important;
        animation: none;
        box-shadow: none;
    }

    /* …and drops one step below the key column of its row, or (later in the DOM) it would paint over it */
    .heavy-data-scroll .ant-table-tbody > tr > td.ant-table-cell-fix-left:not(:first-child) {
        z-index: 1;
    }

    .heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-left:not(:first-child),
    .heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-left:not(:first-child) {
        z-index: 4;
    }

    .heavy-data-scroll .ant-table-tbody > tr.heavy-data-group-row > td.ant-table-cell-fix-left:not(:first-child) {
        z-index: 3;
    }

    @supports (animation-timeline: scroll()) {
        .heavy-data-scroll .ant-table-thead > tr > th.ant-table-cell-fix-left:first-child,
        .heavy-data-scroll .ant-table-tbody > tr > td.ant-table-cell-fix-left:first-child,
        .heavy-data-scroll .ant-table-summary > tr > td.ant-table-cell-fix-left:first-child {
            animation: heavy-data-pin-left linear both;
            animation-timeline: --heavy-data-x;
            animation-range: 0 24px;
        }
    }
}

/* ===============================================
   Obligations matrix (I-029)
   The AntDesign side of the obligations matrix (app.css "Obligations matrix (I-029)"): a table of status chips
   at least 1040px wide inside the I-028 scroll host, one line per cell, the pinned client (left) and Izaberi
   (right) columns, the totals row and the phone rule. The pinned background and the overflow-only edge
   shadows are the table pattern's ("Table pattern (I-028)" above).
   =============================================== */

.obligations-matrix .ant-table-content > table {
    min-width: 1040px;
}

/* F's .mx cells: 10px 9px on one line of the font's normal height (a 37px header, 41px totals). The .ant-table step
   outranks the table pattern's .table-card cell padding above (CF-100), which the matrix card also carries — without
   it the matrix took 12px cells and AntD's line boxes (CF-086 TASK_06, fidelity pair O22) */
.obligations-matrix .ant-table .ant-table-thead > tr > th,
.obligations-matrix .ant-table .ant-table-tbody > tr > td,
.obligations-matrix .ant-table .ant-table-summary > tr > td {
    padding: 10px 9px;
    line-height: normal;
    white-space: nowrap;
}

/* The client column (pinned left) and the first obligation column after it */
.obligations-matrix .ant-table .ant-table-thead > tr > th:first-child,
.obligations-matrix .ant-table .ant-table-tbody > tr > td:first-child,
.obligations-matrix .ant-table .ant-table-summary > tr > td:first-child {
    padding-left: 18px;
    padding-right: 9px;
}

.obligations-matrix .ant-table .ant-table-thead > tr > th:nth-child(2),
.obligations-matrix .ant-table .ant-table-tbody > tr > td:nth-child(2),
.obligations-matrix .ant-table .ant-table-summary > tr > td:nth-child(2) {
    padding-left: 14px;
}

/* Izaberi (pinned right) */
.obligations-matrix .ant-table .ant-table-thead > tr > th:last-child,
.obligations-matrix .ant-table .ant-table-tbody > tr > td:last-child,
.obligations-matrix .ant-table .ant-table-summary > tr > td:last-child {
    padding-right: var(--space-md);
    text-align: right;
}

/* AntD paints the summary (tfoot) white in both themes; the totals cells carry their own surface */
.obligations-matrix .ant-table-summary {
    background: transparent;
}

/* Totals row: a subtle band with a heavier top rule; its pinned cells stay opaque (the same tint mixed into
   --table-pinned-bg), also on hover when the row is the table's last body row. AntD's SummaryRow renders a bare
   <tr>, so the live matrix puts .obligations-matrix__totals on each SummaryCell (I-029 TASK_03) */
.obligations-matrix tr.obligations-matrix__totals > td,
.obligations-matrix td.obligations-matrix__totals,
.obligations-matrix .ant-table-tbody > tr.obligations-matrix__totals:hover > td {
    border-top: 1px solid var(--glass-border-light);
    border-bottom: 0;
    background: var(--glass-bg-subtle) !important;
}

.obligations-matrix tr.obligations-matrix__totals > td.ant-table-cell-fix-left,
.obligations-matrix tr.obligations-matrix__totals > td.ant-table-cell-fix-right,
.obligations-matrix td.obligations-matrix__totals.ant-table-cell-fix-left,
.obligations-matrix td.obligations-matrix__totals.ant-table-cell-fix-right,
.obligations-matrix .ant-table-tbody > tr.obligations-matrix__totals:hover > td.ant-table-cell-fix-left,
.obligations-matrix .ant-table-tbody > tr.obligations-matrix__totals:hover > td.ant-table-cell-fix-right {
    background: color-mix(in srgb, var(--text-primary) 3%, var(--table-pinned-bg)) !important;
}

/* Phone: the client column scrolls with the rest (a pinned 204px column would leave no room for the chips) */
@media (max-width: 640px) {
    .obligations-matrix .ant-table-thead > tr > th.ant-table-cell-fix-left,
    .obligations-matrix .ant-table-tbody > tr > td.ant-table-cell-fix-left,
    .obligations-matrix .ant-table-summary > tr > td.ant-table-cell-fix-left {
        position: static !important;
        box-shadow: none;
    }
}

/* ===============================================
   Command Palette Modal (I-025)
   The modal is only the host of .command-palette (app.css): it keeps the mask, the surface, the border,
   the radius and the shadow of every modal ("Modal/Drawer Overrides"), so the palette follows the page
   theme through the same tokens. These rules, all under the wrap class, place it and take away what a
   palette does not have: the padding, the title bar and the close button.
   =============================================== */

/* 92px from the top of the viewport, a 16px gutter at each side at every width */
.command-palette-modal .ant-modal {
    top: 92px;
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    padding-bottom: 0;
}

/* The footer and the first row reach the edge, so the content is clipped to the modal's radius. The palette
   opens no Select or picker, which is what the shared rule keeps visible for. */
.command-palette-modal .ant-modal-content {
    padding: 0 !important;
    overflow: hidden;
}

.command-palette-modal .ant-modal-body {
    padding: 0 !important;
}

.command-palette-modal .ant-modal-header,
.command-palette-modal .ant-modal-close {
    display: none;
}

/* The input row draws the field: an AntDesign Input in it loses its own box, in every state */
.command-palette__input .ant-input,
.command-palette__input .ant-input:hover:not(:disabled),
.command-palette__input .ant-input:focus,
.command-palette__input .ant-input-focused {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ===============================================
   Form controls (I-036, prototype F .inp / .sel) — the one source for Input, its affix wrapper, TextArea,
   Select, DatePicker / RangePicker and InputNumber (app.css has no control rule left). One recipe: 38px at the
   default size, radius 12, 1px --glass-border-light, the --control-bg surface (white in light); hover recolours the
   border (--color-primary-light, F --primary-2), focus adds the one 2px --color-primary-glow ring; disabled .6.
   Heights skip table cells (I-028 header filters and cell editors keep their sizes, README Decision 6) through
   :where(), which adds no weight, so the I-012 <=480px 44px min-height (app.css) still wins on a phone.
   FormItem error borders are at the end of this file ("FormItem error state"), after every control's hover rule.
   =============================================== */

.ant-input {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

/* textarea.ant-input (AntD, 0,1,1, height: auto) out-weighs this; the large size keeps its own rule below. The
   inner input of an affix wrapper is excluded: the 38px wrapper (1px borders) is the box, a 38px child overflowed it */
.ant-input:where(:not(.ant-input-sm):not(.ant-input-lg):not(.ant-input-affix-wrapper > *):not(:is(td, th, .ant-table-cell) *)) {
    height: 38px;
}

.ant-input::placeholder {
    color: var(--text-muted) !important;
}

.ant-input:hover:where(:not(:disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-input:focus,
.ant-input-focused {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input:disabled {
    background: var(--control-bg) !important;
    border-color: var(--glass-border-light) !important;
    color: var(--text-primary) !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* B-009: read-only is content, not a placeholder - secondary text, full opacity */
.ant-input[readonly]:not(:disabled) {
    background: var(--glass-bg) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-secondary) !important;
    cursor: default;
}

.ant-input-lg {
    height: 48px !important;
    font-size: 0.9375rem !important;
}

/* Input Affix Wrapper (prefix / suffix icons, password, allow-clear): the wrapper is the visible box */
.ant-input-affix-wrapper {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    padding: 4px 11px;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

/* 38px like a bare input; the TextArea wrapper and the small / large sizes keep their own height. AntD Blazor's
   TextArea ShowCount wrapper is a plain span.ant-input-affix-wrapper inside div.ant-input-textarea (no -textarea
   class), so it is excluded by its parent too — the fixed 38px flex box shrank every counted TextArea (62 files,
   e.g. the support ticket drawer's 8-row message) to its 32px min-height (I-036 TASK_09) */
.ant-input-affix-wrapper:where(:not(.ant-input-affix-wrapper-textarea):not(.ant-input-textarea > *):not(.ant-input-affix-wrapper-sm):not(.ant-input-affix-wrapper-lg):not(:is(td, th, .ant-table-cell) *)) {
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
}

.ant-input-affix-wrapper:hover:where(:not(.ant-input-affix-wrapper-disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-input-affix-wrapper-focused,
.ant-input-affix-wrapper:focus-within {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input-affix-wrapper-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Prefix/suffix icons (search loupe, password eye, etc.) — match placeholder color */
.ant-input-affix-wrapper .ant-input-prefix .anticon,
.ant-input-affix-wrapper .ant-input-suffix .anticon {
    color: var(--text-muted) !important;
}

/* Text prefix/suffix (a currency such as "RSD" in the mark-as-paid amount) — AntD's default
   rgba(0,0,0,.85) is unreadable on the dark surface; muted as prototype F's .suffix (I-031 TASK_19) */
.ant-input-affix-wrapper .ant-input-prefix,
.ant-input-affix-wrapper .ant-input-suffix {
    color: var(--text-muted);
}

/* Inner .ant-input inside an affix wrapper is just the text node — the wrapper
   already draws the visible surface. Keep the inner element fully transparent
   so hover/focus don't paint a second layered background or focus ring on top
   of the wrapper. Fixes the "double overlay" effect on password/affix inputs.
   A disabled inner input is not dimmed again: the wrapper already is. */
.ant-input-affix-wrapper > .ant-input,
.ant-input-affix-wrapper > .ant-input:hover:not(:disabled),
.ant-input-affix-wrapper > .ant-input:focus,
.ant-input-affix-wrapper > .ant-input-focused {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ant-input-affix-wrapper > .ant-input:disabled {
    background: transparent !important;
    opacity: 1;
}

/* ===============================================
   Textarea Overrides (I-036, prototype F .inp--area) — the input recipe, 8px 12px padding, line-height 1.45
   =============================================== */

.ant-input-textarea textarea.ant-input,
textarea.ant-input {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    color-scheme: var(--color-scheme);
    padding: 8px 12px;
    line-height: 1.45;
}

.ant-input-textarea textarea.ant-input:hover:where(:not(:disabled)),
textarea.ant-input:hover:where(:not(:disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-input-textarea textarea.ant-input:focus,
textarea.ant-input:focus {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
    outline: none;
}

.ant-input-textarea textarea.ant-input::placeholder,
textarea.ant-input::placeholder {
    color: var(--text-muted) !important;
}

.ant-input-textarea-show-count {
    background: transparent !important;
}

/* The TextArea host itself draws no box (ShowCount / in a FormItem) — the textarea or its wrapper does */
.ant-input-textarea.ant-input-textarea-show-count,
.ant-input-textarea.ant-input-textarea-in-form-item {
    border: none !important;
}

.ant-input-textarea-show-count::after,
.ant-input-data-count,
.ant-input-show-count-suffix {
    color: var(--text-muted) !important;
}

/* TextArea with ShowCount wraps the <textarea> in span.ant-input-affix-wrapper.
   Promote the wrapper to BE the glass box and make the inner textarea transparent
   so its edge aligns with inputs/selects in the same form. */
.ant-input-textarea .ant-input-affix-wrapper {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    padding: 4px 11px !important;
}

.ant-input-textarea .ant-input-affix-wrapper:hover {
    border-color: var(--color-primary-light) !important;
}

.ant-input-textarea .ant-input-affix-wrapper-focused,
.ant-input-textarea .ant-input-affix-wrapper:focus-within {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input-textarea .ant-input-affix-wrapper textarea.ant-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.ant-input-textarea .ant-input-affix-wrapper textarea.ant-input:focus,
.ant-input-textarea .ant-input-affix-wrapper textarea.ant-input-focused {
    border: none !important;
    box-shadow: none !important;
}

/* ===============================================
   Form Item Overrides - Dark Theme
   =============================================== */

.ant-form-item {
    margin-bottom: 1.25rem;
}

.ant-form-item:last-child {
    margin-bottom: 0;
}

.ant-form-item-label > label {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

/* Default help / extra text: AntD's own literal is black at 0.45 alpha, lost on dark and under 4.5 : 1 on light */
.ant-form-item-explain,
.ant-form-item-extra {
    color: var(--text-muted);
}

/* FormItem hint and messages (I-036, prototype F .hint / .ferr): the hint is 12.5px muted, the error 13px in
   --color-error-light (F's dark --err; the light theme's text-safe deep red). Error / warning help text follows the
   status tokens: AntD's own literals equal them on dark only. */
.ant-form-item-explain,
.ant-form-item-extra {
    font-size: 12.5px;
}

.ant-form-item-explain-error {
    color: var(--color-error-light) !important;
    font-size: 13px;
}

.ant-form-item-explain-warning {
    color: var(--color-warning) !important;
}

/* FormItem error state (I-036, F .fitem.is-error): the control's border and a 2px ring in the error colour, at rest,
   on hover and on focus. AntD marks the control itself (…-status-error); before I-036 the control's own
   `border … !important` hid AntD's red border. Every selector out-weighs its control's hover / focus rule above. A
   control inside an affix wrapper is skipped (the wrapper draws the box). */
:not(.ant-input-affix-wrapper) > .ant-input.ant-input-status-error,
.ant-input-affix-wrapper.ant-input-affix-wrapper-status-error,
:not(.ant-input-number-affix-wrapper) > .ant-input-number.ant-input-number-status-error,
.ant-input-number-affix-wrapper.ant-input-number-affix-wrapper-status-error,
.ant-picker.ant-picker-status-error,
.ant-select.ant-select-status-error:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {
    border-color: var(--color-error-light) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-error-light) 25%, transparent) !important;
}

/* ===============================================
   Select (I-036, prototype F .sel / .msel) — the control recipe above; the open panel is in "Dropdown Overrides"
   =============================================== */

.ant-select-selector {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

.ant-select-single:not(.ant-select-customize-input):where(:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector {
    height: 38px;
}

.ant-select-single:where(:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector .ant-select-selection-item,
.ant-select-single:where(:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector .ant-select-selection-placeholder {
    line-height: 36px;
}

.ant-select-single:not(.ant-select-customize-input):where(:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector .ant-select-selection-search-input {
    height: 36px;
}

/* Multiple: F .msel min-height 38 — AntD's 24px chips (+2px margins) with 4px above and below. The min-height rule
   weighs 0,1,0 (all in :where()), so the I-012 <=480px 44px min-height (app.css, 0,2,0) still wins on a phone; the
   padding needs 0,2,0 to beat AntD's own `.ant-select-multiple .ant-select-selector` padding. */
:where(.ant-select-multiple:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector {
    min-height: 38px;
}

.ant-select-multiple:where(:not(.ant-select-sm):not(.ant-select-lg):not(:is(td, th, .ant-table-cell) *)) .ant-select-selector {
    padding-top: 4px;
    padding-bottom: 4px;
}

.ant-select-arrow {
    color: var(--text-muted) !important;
}

.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
    border-color: var(--color-primary-light) !important;
}

.ant-select-focused .ant-select-selector,
.ant-select-open .ant-select-selector {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-select-disabled .ant-select-selector {
    cursor: not-allowed !important;
    opacity: 0.6;
}

.ant-select-selection-item {
    color: var(--text-primary) !important;
}

.ant-select-selection-placeholder {
    color: var(--text-muted) !important;
}

.ant-select-selection-search-input {
    color: var(--text-primary) !important;
}

/* ===============================================
   Default / Dashed / Danger / Text / Link Buttons (I-036, prototype F .btn)
   Rest rules are single-class, so a contextual rule (.plan-card .ant-btn-default, a modal footer, …) still wins;
   hover rules are (0,3,0), as before, so they keep beating the contextual rest rules they always beat.
   =============================================== */

/* Default: F .btn — the glass surface (white in light), 1px --glass-border-light, --text-primary ink.
   B-047 (fork B-001): a static-SSR page hand-writes <a class="ant-btn"> (no circuit, so no <Button> to emit
   ant-btn-default); a variant-less anchor gets the same look. The anchor test sits inside :where(), so the rest rule
   weighs what .ant-btn-default weighs (0,1,0). B-009 Dashed is the same button with a dashed border. */
.ant-btn-default,
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)),
.ant-btn-dashed {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    color: var(--text-primary) !important;
}

.ant-btn-dashed {
    border-style: dashed !important;
}

/* Hover and keyboard focus recolour the border and the ink only (F .btn:hover). B-028 (1340, 1341): never on a
   disabled button, and never on Dashed Danger, which keeps the danger hover below. B-008 (2608): :focus-visible,
   not :focus - a mouse click leaves no stuck highlight. */
.ant-btn.ant-btn-default:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-default:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)):hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)):focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-dashed:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled):not(.ant-btn-dangerous)),
.ant-btn.ant-btn-dashed:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled):not(.ant-btn-dangerous)) {
    border-color: var(--color-primary-light) !important;
    color: var(--color-primary-text) !important;
}

/* Danger (Default / Dashed type): F .btn--danger — the default look until hover, then border and ink in the error
   colour (--color-error-light, F's dark --err). Text and Link danger keep red ink (below); Primary danger is solid
   (Buttons block). */
.ant-btn-dangerous:where(:not(.ant-btn-primary):not(.ant-btn-text):not(.ant-btn-link)) {
    background: var(--glass-bg) !important;
    border-color: var(--glass-border-light) !important;
    color: var(--text-primary) !important;
}

.ant-btn.ant-btn-dangerous:where(:not(.ant-btn-primary):not(.ant-btn-text):not(.ant-btn-link)):hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-dangerous:where(:not(.ant-btn-primary):not(.ant-btn-text):not(.ant-btn-link)):focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    border-color: var(--color-error-light) !important;
    color: var(--color-error-light) !important;
}

/* Text: F .btn--text — no surface, --text-primary ink; hover draws F's border and the accent ink */
.ant-btn-text {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
}

.ant-btn.ant-btn-text:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-text:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    border-color: var(--color-primary-light) !important;
    color: var(--color-primary-text) !important;
}

/* Link: F .btn--link — accent ink, no surface; hover underlines (F .lnk) */
.ant-btn-link {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--color-primary-text) !important;
}

.ant-btn.ant-btn-link:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-link:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    color: var(--color-primary-text) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Text / Link danger: red ink at rest and on hover */
.ant-btn-text.ant-btn-dangerous,
.ant-btn-link.ant-btn-dangerous,
.ant-btn.ant-btn-text.ant-btn-dangerous:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-link.ant-btn-dangerous:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    color: var(--color-error-light) !important;
}

.ant-btn.ant-btn-text.ant-btn-dangerous:hover:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    border-color: var(--color-error-light) !important;
}

/* Disabled (every type but Primary, which has its own rule): F .btn:disabled — the rest look at .55 */
.ant-btn:is([disabled], :disabled, .ant-btn-disabled):not(.ant-btn-primary) {
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

/* B-051 AD4 (b): keyboard focus draws the one brand focus ring (.impeccable.md, 2px --color-primary-glow) on every
   non-primary type, on top of its hover highlight; (0,2,0) beats the Text / Link rest `box-shadow: none`. Primary
   appends the same ring to its glow (Buttons block). Hover alone draws no ring. */
.ant-btn:focus-visible:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled):not(.ant-btn-primary)) {
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

/* ===============================================
   Divider Overrides - Dark Theme
   =============================================== */

/* Prototype F .rule / .rule--t (I-036): a horizontal rule is 1px --glass-border with 14px above and below; a
   vertical divider keeps AntD's 8px side margin (the old `margin … !important` on every .ant-divider took it away).
   The text divider's label is 12.5px muted. Scoped rules (the image editor) keep their own. */
.ant-divider {
    border-color: var(--glass-border) !important;
}

.ant-divider-horizontal {
    margin: 14px 0 !important;
}

.ant-divider-inner-text {
    color: var(--text-muted) !important;
    font-size: 12.5px;
}

/* ===============================================
   Typography Overrides - Dark Theme
   =============================================== */

.ant-typography {
    color: var(--text-secondary) !important;
}

/* ===============================================
   Collapse Overrides - Dark Theme
   =============================================== */

/* Prototype F .clp (I-036): 1px --glass-border, radius 8; the header is at least 36px, 0 12px, 14 / 600
   --text-primary with a muted 14px chevron that turns (AntD rotates it inline); the body is flat — no fill, no rule —
   indented under the header text (0 12 12 36), 13.5px --text-secondary. Panels are ruled by the item separators
   further down. Every Collapse (support ticket drawer, onboarding, chart of accounts) is meant to change. */
.ant-collapse {
    background: transparent !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
}

.ant-collapse > .ant-collapse-item:last-child,
.ant-collapse > .ant-collapse-item:last-child > .ant-collapse-header {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.ant-collapse-header {
    color: var(--text-primary) !important;
}

.ant-collapse > .ant-collapse-item > .ant-collapse-header {
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
    margin-right: 10px;
    color: var(--text-muted);
    font-size: 14px;
    vertical-align: 0;
}

.ant-collapse-content {
    background: transparent !important;
    border-top: 0 !important;
    color: var(--text-secondary) !important;
}

.ant-collapse-content-box {
    padding: 0 12px 12px 36px !important;
    font-size: 13.5px;
}

/* ===============================================
   Badge Overrides - Attention colour
   =============================================== */

/* Prototype F .badge / .bdot (I-036): the attention fill with its dark ink, the count bold, no ring around either
   (AntD draws a white 1px ring, a literal that shows as a halo on dark) */
.ant-badge-count {
    background: var(--color-attention) !important;
    color: var(--color-on-attention) !important;
    box-shadow: none !important;
    font-weight: 700;
}

.ant-badge-dot {
    background: var(--color-attention) !important;
    box-shadow: none !important;
}

/* Status dots (<Badge Status>, prototype F .sdot): 8px, and the state is told by shape as well as colour —
   success a circle, error a square, warning a diamond; processing and default a neutral circle. AntD's dots are
   theme-less literals (#52c41a, #ff4d4f, #faad14, #1890ff) with a blue pulse on processing; every one reads a token. */
.ant-badge-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ant-badge-status-success {
    background: var(--color-success-hover);
}

.ant-badge-status-error {
    background: var(--color-error-light);
    border-radius: 2px;
}

.ant-badge-status-warning {
    background: var(--color-warning-light);
    border-radius: 1px;
    transform: rotate(45deg);
}

.ant-badge-status-processing {
    background: var(--color-info);
}

.ant-badge-status-processing::after {
    display: none;
}

.ant-badge-status-default {
    background: var(--text-muted);
}

.ant-badge-status-text {
    margin-left: 7px;
    color: var(--text-secondary);
}

/* ===============================================
   Avatar Overrides
   =============================================== */

/* Prototype F .av (I-036): a 32px rounded square in the primary tint with primary initials / icon, replacing AntD's
   grey #ccc circle. Shape="circle" is AntD's default, so the radius wins over .ant-avatar-circle by load order. A
   filled avatar takes a class-based variant that sets the fill AND the ink that reads on it (#10936) — never an
   inline Style background, whose ink this sheet cannot know: .avatar--primary (TicketDetail, FeatureRequestDetail:
   the support team's messages; the showcase). */
.ant-avatar {
    border-radius: 9px;
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
}

.ant-avatar.avatar--primary {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* ===============================================
   Table Overrides - Dark Theme
   =============================================== */

.ant-table {
    background: transparent !important;
    color: var(--text-secondary) !important;
}

.ant-table-container,
.ant-table-content,
.ant-table table {
    background: transparent !important;
}

.ant-table-thead > tr > th {
    background: var(--color-fg-03) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    font-weight: 600;
    /* Table-header tier (I-051 AD-7, F th): 12.5px / 600, sentence case — every table in the App */
    font-size: var(--font-size-caption);
}

.ant-table-tbody > tr > td {
    background: transparent !important;
    border-bottom: 1px solid var(--color-fg-04) !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem;
}

.ant-table-tbody > tr {
    background: transparent !important;
}

.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr:hover > td {
    background: var(--color-fg-05) !important;
}

/* Frozen columns need an opaque background or scrolling cells bleed through
   when they scroll under. Specificity must beat .ant-table-tbody > tr > td. */
.ant-table-tbody > tr > td.ant-table-cell-fix-left,
.ant-table-tbody > tr > td.ant-table-cell-fix-right,
.ant-table-thead > tr > th.ant-table-cell-fix-left,
.ant-table-thead > tr > th.ant-table-cell-fix-right {
    background: var(--table-pinned-bg) !important;
}

.ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-fix-left,
.ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-fix-right,
.ant-table-tbody > tr:hover > td.ant-table-cell-fix-left,
.ant-table-tbody > tr:hover > td.ant-table-cell-fix-right {
    background: var(--table-pinned-bg) !important;
}

.ant-table-bordered > .ant-table-container {
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th,
.ant-table-bordered > .ant-table-container > .ant-table-content > table > tbody > tr > td {
    border-right: 1px solid var(--color-fg-04) !important;
}

.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th {
    background: var(--color-fg-03) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
}

.ant-table-bordered > .ant-table-container > .ant-table-content > table > tbody > tr > td {
    background: transparent !important;
    border-bottom: 1px solid var(--color-fg-04) !important;
    color: var(--text-primary) !important;
}

.ant-table-pagination.ant-pagination {
    margin: 16px 0 0 !important;
    padding: 12px 0 !important;
    align-items: center !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item {
    min-width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    margin-right: 8px !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    background: transparent !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item a {
    color: var(--text-secondary) !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item:hover {
    border-color: var(--color-primary) !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item:hover a {
    color: var(--color-primary-text) !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item-active {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-item-active a {
    color: var(--color-on-primary) !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-prev,
.ant-table-pagination.ant-pagination-mini .ant-pagination-next {
    min-width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    margin-right: 8px !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link,
.ant-table-pagination.ant-pagination-mini .ant-pagination-next .ant-pagination-item-link {
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    width: 32px !important;
    height: 32px !important;
}

.ant-table-pagination.ant-pagination-mini .ant-pagination-prev:hover .ant-pagination-item-link,
.ant-table-pagination.ant-pagination-mini .ant-pagination-next:hover .ant-pagination-item-link {
    border-color: var(--color-primary) !important;
    color: var(--color-primary-text) !important;
}

/* Ageing matrix with the netting columns (B-040): 6px cell gutters instead of the small table's 8px, so the wider
   matrix still fits its card at 1440 beside the 248px sidebar (I-024). The column widths in AgeingReport.razor.cs
   count on it. */
.ant-table.ant-table-small.ageing-matrix--netting .ant-table-thead > tr > th,
.ant-table.ant-table-small.ageing-matrix--netting .ant-table-tbody > tr > td {
    padding-inline: 6px;
}

/* ===============================================
   Tabs Overrides (I-036, prototype F .tabs / .ctabs) — every Tabs is meant to change; the I-033 side layout
   (.settings-tabs-layout--side, TabPosition.Left) keeps its own rules below and is not reached by the Line and
   Card rules (they are scoped to top / bottom tabs).
   Line: tabs 44px high, 0 2px, 24px apart, 14 / 500 --text-secondary; hover --text-primary; the selected label
   600 in --color-primary-text over a 2px solid primary bar with 2 2 0 0 corners (AntD positions the bar from
   script — only its colour and corners change). An optional count pill: <span class="tab-count">N</span> in the
   tab label, on the primary tint when its tab is selected.
   Card: 36px tabs 4px apart, 0 14px, 13.5px, on --glass-bg-subtle with a --glass-border outline and 8 8 0 0
   corners (AntD's #fafafa / #f0f0f0 / #fff literals before); the selected tab is --color-solid with the primary
   label at 600 and a 2px primary bar inset along its top.
   =============================================== */

.ant-tabs-tab {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

.ant-tabs-tab:hover {
    color: var(--color-primary-text) !important;
}

.ant-tabs-tab-active .ant-tabs-tab-btn {
    color: var(--color-primary-text) !important;
    font-weight: 600;
}

.ant-tabs-ink-bar {
    background: var(--color-primary) !important;
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-ink-bar {
    border-radius: 2px 2px 0 0;
}

.ant-tabs-bottom > .ant-tabs-nav .ant-tabs-ink-bar {
    border-radius: 0 0 2px 2px;
}

.ant-tabs-nav::before {
    border-bottom-color: var(--glass-border) !important;
}

/* Line tabs */
:is(.ant-tabs-top, .ant-tabs-bottom):not(.ant-tabs-card) > .ant-tabs-nav .ant-tabs-tab {
    height: 44px;
    padding: 0 2px;
}

:is(.ant-tabs-top, .ant-tabs-bottom):not(.ant-tabs-card) > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab {
    margin: 0 0 0 24px;
}

:is(.ant-tabs-top, .ant-tabs-bottom):not(.ant-tabs-card) > .ant-tabs-nav .ant-tabs-tab:hover {
    color: var(--text-primary) !important;
}

.ant-tabs-tab .tab-count,
.ant-tree .tree-node-title__count {
    display: inline-block;
    min-width: 22px;
    height: 20px;
    margin-left: 8px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg-subtle);
    color: var(--text-secondary);
    font: 600 12px/18px var(--font-body);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.ant-tabs-tab-active .tab-count {
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
}

/* Card tabs — (0,4,0) and later than AntD's card rules */
.ant-tabs-card.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab,
.ant-tabs-card.ant-tabs-bottom > .ant-tabs-nav .ant-tabs-tab {
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-subtle);
    font-size: 13.5px;
}

.ant-tabs-card.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.ant-tabs-card.ant-tabs-bottom > .ant-tabs-nav .ant-tabs-tab {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.ant-tabs-card.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab,
.ant-tabs-card.ant-tabs-bottom > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab {
    margin-left: 4px;
}

.ant-tabs-card.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab-active {
    border-bottom-color: var(--color-solid);
    background: var(--color-solid);
    box-shadow: inset 0 2px 0 var(--color-primary);
}

.ant-tabs-card.ant-tabs-bottom > .ant-tabs-nav .ant-tabs-tab-active {
    border-top-color: var(--color-solid);
    background: var(--color-solid);
    box-shadow: inset 0 -2px 0 var(--color-primary);
}

/* Tab pane content — inherit the page's light text instead of AntD's default
   black, otherwise plain <p>/<span> inside a tab on a dark glass-card become
   illegible (e.g. Billing "Current plan: …"). */
.ant-tabs-tabpane {
    color: var(--text-primary);
}

/* --- Settings side layout (I-033, prototype F .set / .vtabs): <Tabs TabPosition="TabPosition.Left"> inside
   .settings-tabs-layout--side. >= 1100px: the nav (--settings-nav-width) with a rule on its right beside the
   content column (capped at --settings-content-max); 40px items with an icon slot, the selected item on the
   primary tint with a 2px primary bar on its right edge. AntD's ink bar is hidden — it is positioned with inline
   top / height for a vertical nav and would be wrong in the strip — and the bar is the item's ::after.
   < 1100px: one column, the nav flips into a horizontal strip that scrolls sideways (hidden scrollbar, 44px
   items, the bar under the selected item). No TabPosition switch, so ActiveKey, the ?tab= deep links and AntD's
   arrow keys (orientation-independent) are untouched. Only the strip's transform needs !important: AntD's
   script sets it inline. --- */
.settings-tabs-layout--side > .ant-tabs-left {
    display: grid;
    grid-template-columns: var(--settings-nav-width) minmax(0, var(--settings-content-max));
    gap: 28px;
    align-items: start;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav {
    order: 0;
    min-width: 0;
    margin: 0;
    border-right: 1px solid var(--glass-border);
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-content-holder {
    order: 1;
    min-width: 0;
    margin-left: 0;
    border-left: 0;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane {
    padding-left: 0;
}

/* AntD's overflow shades (literal black gradients) and its ink bar */
.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-wrap::before,
.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-wrap::after,
.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-ink-bar {
    display: none;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-list {
    gap: 2px;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab {
    position: relative;
    height: 40px;
    margin: 0;
    padding: 0 14px 0 12px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab {
    margin: 0;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab .anticon {
    margin: 0;
    font-size: 16px;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab:hover {
    background: var(--glass-bg-subtle);
}

/* The selected tab is 600 as a whole, like F's .vtab[aria-selected] (I-051 TASK_05); its label keeps the rule below */
.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active {
    background: var(--color-primary-bg);
    font-weight: 600;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
    font-weight: 600;
}

/* The selected item sits on the primary tint: on light the plain primary ink reads 3.7 : 1 there (Operans' orange,
   LightThemePageSweepTests), so it takes the primary-on-a-veiled-surface ink (I-047 TASK_04), also in the strip. */
:root[data-theme="light"] .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
    color: var(--color-primary-text-strong) !important;
}

.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active::after {
    content: '';
    position: absolute;
    top: 6px;
    right: -1px;
    bottom: 6px;
    width: 2px;
    border-radius: 2px;
    background: var(--color-primary);
}

/* Keyboard focus (F .vtab:focus-visible): AntD drops the outline of the focused [role=tab], which left only a
   colour change; the ring is drawn on the whole item, inset so the nav's clip cannot cut it (I-033 TASK_08) */
.settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab:has(.ant-tabs-tab-btn:focus-visible) {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

@media (max-width: 1099.98px) {
    .settings-tabs-layout--side > .ant-tabs-left {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav {
        flex-direction: row;
        border-right: 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-wrap {
        flex: 1 1 auto;
        flex-direction: row;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-wrap::-webkit-scrollbar {
        display: none;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-list {
        flex: none;
        flex-direction: row;
        gap: 22px;
        transform: none !important;
        translate: none !important;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-nav-operations {
        display: none;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab {
        flex: none;
        height: 44px;
        padding: 0 2px;
        border-radius: 0;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab:hover,
    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active {
        background: none;
    }

    .settings-tabs-layout--side > .ant-tabs-left > .ant-tabs-nav .ant-tabs-tab-active::after {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        height: 2px;
    }
}

/* ===============================================
   Pagination Overrides (I-036, prototype F .pag) — every standalone Pagination (the .pagination-container lists,
   /support, the RFZO lists): 30px items, radius 6, 6px apart, a 1px --glass-border-light outline on no fill,
   13.5px --text-secondary. The current page is a tint, not a fill: primary outline, --color-primary-bg and
   --color-link-text (F --accent-text) at 700 (I-042 TASK_06). Hover: primary outline and ink. Disabled prev / next
   at .45. Sizes are (0,1,0) so the <=480px 44px touch rules (app.css, doubled classes) still win; colours are (0,2,0) to out-rank
   app.css .pagination-container. The table's own mini pager (.ant-table-pagination.ant-pagination-mini, Table
   Overrides) keeps its block and is not reached — except inside a table card ("Table-card footer (I-042)" below).
   =============================================== */

.ant-pagination {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.ant-pagination:not(.ant-table-pagination.ant-pagination-mini) {
    font-size: 13.5px;
}

.ant-pagination-item,
.ant-pagination-prev,
.ant-pagination-next,
.ant-pagination-jump-prev,
.ant-pagination-jump-next {
    min-width: 30px;
    height: 30px;
    margin-right: 6px;
    line-height: 28px;
}

.ant-pagination-item,
.ant-pagination-prev .ant-pagination-item-link,
.ant-pagination-next .ant-pagination-item-link {
    border-radius: 6px !important;
}

.ant-pagination .ant-pagination-item,
.ant-pagination .ant-pagination-prev .ant-pagination-item-link,
.ant-pagination .ant-pagination-next .ant-pagination-item-link {
    background: transparent !important;
    border: 1px solid var(--glass-border-light) !important;
}

.ant-pagination .ant-pagination-item a,
.ant-pagination .ant-pagination-prev .ant-pagination-item-link,
.ant-pagination .ant-pagination-next .ant-pagination-item-link {
    color: var(--text-secondary) !important;
}

/* I-060 (Evidens I-044 TASK_13, Decision 19): a <code> takes the Spoj mono face — AntD's reset (loaded after app.css)
   sets code in "SFMono-Regular, Consolas, …", off the stack (VR3: ids, hashes and references shown as code). A component
   that sets its own face on its code keeps it: a class selector outranks this one. */
code {
    font-family: var(--font-mono);
}

/* I-060 (Evidens I-044 TASK_08): the pager is set in the body face — AntD's .ant-pagination carries its own system
   stack (VR3, every list pager); TASK_11: the jump-prev / jump-next "•••", which AntD sets in Arial, too (a list long
   enough to skip pages) */
.ant-pagination,
.ant-pagination .ant-pagination-item a,
.ant-pagination .ant-pagination-item-container .ant-pagination-item-ellipsis {
    font-family: var(--font-body);
}

.ant-pagination .ant-pagination-item:hover,
.ant-pagination .ant-pagination-prev:not(.ant-pagination-disabled):hover .ant-pagination-item-link,
.ant-pagination .ant-pagination-next:not(.ant-pagination-disabled):hover .ant-pagination-item-link {
    border-color: var(--color-primary) !important;
}

.ant-pagination .ant-pagination-item:hover a,
.ant-pagination .ant-pagination-prev:not(.ant-pagination-disabled):hover .ant-pagination-item-link,
.ant-pagination .ant-pagination-next:not(.ant-pagination-disabled):hover .ant-pagination-item-link {
    color: var(--color-primary-text) !important;
}

.ant-pagination .ant-pagination-item-active {
    background: var(--color-primary-bg) !important;
    border-color: var(--color-primary) !important;
}

.ant-pagination .ant-pagination-item-active a {
    color: var(--color-primary-text) !important;
}

/* F .pag .on: the accent ink (F --accent-text = --color-link-text) at 700 on the item itself and on its link
   (I-042 TASK_06, README Decision 18 — was --color-primary-text, and only on the link) */
.ant-pagination:not(.ant-table-pagination.ant-pagination-mini) .ant-pagination-item-active,
.ant-pagination:not(.ant-table-pagination.ant-pagination-mini) .ant-pagination-item-active a {
    color: var(--color-link-text) !important;
    font-weight: 700;
}

/* Light: the accent ink on the 10 % primary ground read 4.48 : 1 (CF-099 F-b1-13); an 8 % ground keeps F's look
   (ΔE < 3) and clears 4.5 : 1 (4.61) */
:root[data-theme="light"] .ant-pagination .ant-pagination-item-active {
    background: rgba(var(--color-primary-rgb), 0.08) !important;
}

.ant-pagination:not(.ant-table-pagination.ant-pagination-mini) .ant-pagination-disabled .ant-pagination-item-link {
    opacity: 0.45;
}

.ant-pagination-jump-next .ant-pagination-item-ellipsis,
.ant-pagination-jump-prev .ant-pagination-item-ellipsis {
    color: var(--text-muted) !important;
}

.ant-pagination-jump-next .ant-pagination-item-link-icon,
.ant-pagination-jump-prev .ant-pagination-item-link-icon {
    color: var(--color-primary-text) !important;
}

.ant-pagination-total-text {
    color: var(--text-secondary);
}

.ant-pagination-options .ant-select-selector {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary) !important;
}

/* ===============================================
   Table-card footer (I-042 TASK_06, README Decision 18, prototype F .tcard-f + .pag) — AntD's built-in table pager
   (.ant-table-pagination, a Middle / Small table's mini pager — a list that pages through the Table itself) inside a table card
   is the card's footer row, as app.css .table-card .pagination-container: right-aligned, 12px 16px, a 1px
   --glass-border rule on top. Its items leave the Table Overrides mini look (32px, --glass-border, a solid primary
   current page) for the standalone pager's F .pag look above. Sizes only above 480px, so app.css's <=480px 44px touch
   rules for the mini pager still win on a phone. A built-in pager outside a table card keeps the mini block.
   =============================================== */

.table-card .ant-table-pagination.ant-pagination {
    justify-content: flex-end;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-top: 1px solid var(--glass-border);
    font-size: 13.5px;
}

@media (min-width: 481px) {
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item,
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-prev,
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-next,
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-jump-prev,
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-jump-next {
        min-width: 30px !important;
        height: 30px !important;
        line-height: 28px !important;
        margin-right: 6px !important;
    }

    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link,
    .table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-next .ant-pagination-item-link {
        width: 30px !important;
        height: 30px !important;
    }
}

/* F's .pag spaces its items with a gap, so its last item ends on the row's 16px padding: the items' 6px margin-right
   stops before the edge (standalone and built-in pager alike; the doubled class out-ranks the mini sizes above) */
.table-card .ant-pagination.ant-pagination > li:last-child {
    margin-right: 0 !important;
}

.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item,
.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link,
.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-next .ant-pagination-item-link {
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 6px !important;
}

.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item:hover,
.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-prev:not(.ant-pagination-disabled):hover .ant-pagination-item-link,
.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-next:not(.ant-pagination-disabled):hover .ant-pagination-item-link {
    border-color: var(--color-primary) !important;
}

.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item-active {
    background: var(--color-primary-bg) !important;
    border-color: var(--color-primary) !important;
}

.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item-active,
.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-item-active a {
    color: var(--color-link-text) !important;
    font-weight: 700;
}

.table-card .ant-table-pagination.ant-pagination-mini .ant-pagination-disabled .ant-pagination-item-link {
    opacity: 0.45;
}

/* ===============================================
   Switch Overrides (I-036, prototype F .sw) — 44 x 24 track with a 20px knob at the default size; off is
   --switch-off (AntD's black .25 vanished on the dark ground), on is the primary; disabled .55. The size rules use
   :where() so the I-012 <=480px hit box (app.css, 0,2,0: 44px high with a 10px transparent border) still wins and
   AntD's small switch keeps its 28 x 16 track.
   =============================================== */

.ant-switch {
    background-color: var(--switch-off);
}

.ant-switch:where(:not(.ant-switch-small)) {
    height: 24px;
    line-height: 24px;
}

.ant-switch:where(:not(.ant-switch-small)) .ant-switch-handle {
    width: 20px;
    height: 20px;
}

.ant-switch-checked:where(:not(.ant-switch-small)) .ant-switch-handle {
    left: calc(100% - 20px - 2px);
}

.ant-switch .ant-switch-handle::before {
    border-radius: 50%;
}

/* background-color, never the `background` shorthand: the shorthand resets the phone block's background-clip
   (app.css "Switch: the 24px track"), and a checked Switch then paints its two 10px transparent touch borders — a 44px
   disc instead of the 24px track (CF-099 F-b1-01) */
.ant-switch-checked {
    background-color: var(--color-primary) !important;
}

.ant-switch-disabled {
    opacity: 0.55;
}

/* A labelled switch (CheckedChildren / UnCheckedChildren): AntD paints the label white on both tracks — 2.92 : 1 on the
   dark primary, 1.98 : 1 on the light off track (CF-099 F-b4-03). The label takes the ink of its track: the on-primary
   ink on the checked track, the text ink on the off track (>= 4.5 : 1 in both themes). */
.ant-switch .ant-switch-inner {
    color: var(--text-primary);
}

.ant-switch-checked .ant-switch-inner {
    color: var(--color-on-primary);
}

/* Keyboard focus only (a click leaves no ring): the one control focus ring */
.ant-switch:focus,
.ant-switch-checked:focus {
    box-shadow: none !important;
}

.ant-switch:focus-visible {
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

/* ===============================================
   Popover / Popconfirm — prototype F .popc (I-036)
   Elevated panel, 1px --glass-border-light, radius 12, padding 12 14; title 14 / 600 --text-primary with no rule
   under it; body --text-secondary. Popconfirm: --color-warning icon, AntD's small right-aligned buttons in the
   standard Default / Primary look (a danger OK keeps its solid red). Global — every Popover is meant to change;
   the I-024 context chooser (.context-chooser-popover) and the help popover (.help-popover-overlay) keep their own
   scoped rules.
   =============================================== */

.ant-popover-inner {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-panel-soft) !important;
}

.ant-popover-inner-content {
    padding: 12px 14px;
    color: var(--text-secondary) !important;
}

.ant-popover-title {
    min-height: 0;
    padding: 12px 14px 0;
    color: var(--text-primary) !important;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    border-bottom: 0 !important;
}

.ant-popover-title + :where(.ant-popover-inner-content) {
    padding-top: 4px;
}

.ant-popover-message {
    color: var(--text-primary) !important;
}

/* F .popc icon: dark #ffc53d is the App's --color-warning-light (README Decision 4: the token that equals F's
   ink), not --color-warning #faad14 (I-036 TASK_09) */
.ant-popover-message > .anticon,
.ant-popover-message-icon,
.ant-popover-message-icon > .anticon {
    color: var(--color-warning-light) !important;
}

.ant-popover-arrow-content,
.ant-popover-arrow-content::before {
    background: var(--color-bg-elevated) !important;
}

/* ===============================================
   Button Focus/Wave Overrides - Brand Orange
   =============================================== */

/* B-008 (2592, 2608, 2649): keyboard focus only - a mouse click leaves no stuck highlight on any button type.
   B-051 AD4: one rule per state. Keyboard focus is the per-type :focus-visible highlight plus the one focus-ring rule
   in "Default / Dashed / Danger / Text / Link Buttons" (I-036 moved them here from app.css). This block keeps the
   Default press colour. */
.ant-btn-default:active {
    border-color: var(--color-primary-light) !important;
    color: var(--color-primary-text) !important;
}

.ant-btn-primary:active {
    background: var(--color-primary-dark) !important;
}

[ant-click-animating-without-extra-node='true']::after,
.ant-click-animating-node {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0 var(--color-primary) !important;
}

/* ===============================================
   InputNumber Overrides - Dark Theme
   =============================================== */

.ant-input-number {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

/* 38px (I-036): AntD sizes the field through its inner <input> (30px + borders); 36px + borders here. The I-012
   <=480px rule (app.css, 0,3,0, 42px) still wins on a phone, and table cells keep AntD's 32px */
.ant-input-number:where(:not(.ant-input-number-sm):not(.ant-input-number-lg):not(:is(td, th, .ant-table-cell) *)) .ant-input-number-input {
    height: 36px;
}

.ant-input-number:hover:where(:not(.ant-input-number-disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-input-number-focused,
.ant-input-number:focus,
.ant-input-number:focus-within {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input-number-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ant-input-number-disabled .ant-input-number-input {
    color: var(--text-primary) !important;
}

.ant-input-number-input {
    color: var(--text-primary) !important;
}

.ant-input-number-input::placeholder {
    color: var(--text-muted) !important;
}

.ant-input-number-handler-wrap {
    background: var(--color-fg-04) !important;
    border-left: 1px solid var(--glass-border) !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

.ant-input-number-handler {
    border-color: var(--glass-border) !important;
    color: var(--text-secondary) !important;
}

.ant-input-number-handler:hover {
    color: var(--color-primary-text) !important;
}

.ant-input-number-handler-up-inner,
.ant-input-number-handler-down-inner {
    color: var(--text-secondary) !important;
}

.ant-input-number-handler:hover .ant-input-number-handler-up-inner,
.ant-input-number-handler:hover .ant-input-number-handler-down-inner {
    color: var(--color-primary-text) !important;
}

/* InputNumber affix wrapper (prefix) — MoneyInput draws it for its currency code (AntD 1.6.0 only renders Prefix
   inside a FormItem feedback wrapper). The wrapper is the visible surface; the inner InputNumber is just the field,
   like the .ant-input-affix-wrapper rules above. A feedback wrapper AntD nests inside it stays transparent. */
.ant-input-number-affix-wrapper {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-base) !important;
}

.ant-input-number-affix-wrapper.input-number--block {
    width: 100%;
}

.ant-input-number-affix-wrapper:hover:where(:not(.ant-input-number-affix-wrapper-disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-input-number-affix-wrapper:focus-within {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input-number-affix-wrapper-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ant-input-number-affix-wrapper > .ant-input-number,
.ant-input-number-affix-wrapper > .ant-input-number-affix-wrapper {
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1;
}

.ant-input-number-affix-wrapper .ant-input-number-prefix {
    color: var(--text-muted);
}

/* Collapse panel dividers — dark theme */
.ant-collapse > .ant-collapse-item {
    border-bottom: 1px solid var(--glass-border) !important;
}

.ant-collapse > .ant-collapse-item:last-child {
    border-bottom: none !important;
}

/* ===============================================
   DatePicker / RangePicker field (I-036, the control recipe of "Form controls") and its focus bar
   =============================================== */

.ant-picker {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

.ant-picker:where(:not(.ant-picker-small):not(.ant-picker-large):not(:is(td, th, .ant-table-cell) *)) {
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
}

.ant-picker:hover:where(:not(.ant-picker-disabled)) {
    border-color: var(--color-primary-light) !important;
}

.ant-picker-focused {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-picker-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ant-picker-input > input {
    color: var(--text-primary) !important;
}

.ant-picker-input > input::placeholder {
    color: var(--text-muted) !important;
}

.ant-picker-active-bar {
    background: var(--color-primary) !important;
}

.ant-picker-range .ant-picker-active-bar {
    background: var(--color-primary) !important;
}

/* DatePicker / RangePicker chrome — the suffix calendar icon and the range separator default to AntD's .25 black. They
   paint F's field-icon colour (.inpwrap > .ic, --muted; o.html 188) over the picker's own --control-bg fill: the fg-50
   step (.5 dark / .62 light), I-042 Decision 17 (package 5b, I-053 point 1). Never recoloured in scoped CSS. */
.ant-picker-suffix,
.ant-picker-separator {
    color: var(--color-fg-50) !important;
}

/* ===============================================
   Skeleton Overrides - Dark Theme
   =============================================== */

/* Prototype F .sk (I-036): radius 6 bars on a 9 % ink, shimmer 9 % → 17 % → 9 % (400 % wide, 1.4s). */
.ant-skeleton-title,
.ant-skeleton-paragraph > li {
    background: color-mix(in srgb, var(--text-primary) 9%, transparent) !important;
    border-radius: 6px !important;
}

.ant-skeleton-avatar,
.ant-skeleton-button,
.ant-skeleton-input,
.ant-skeleton-image {
    background: color-mix(in srgb, var(--text-primary) 9%, transparent) !important;
}

.ant-skeleton-button:not(.ant-skeleton-button-circle, .ant-skeleton-button-round),
.ant-skeleton-input,
.ant-skeleton-image {
    border-radius: 6px !important;
}

.ant-skeleton-active .ant-skeleton-title,
.ant-skeleton-active .ant-skeleton-paragraph > li,
.ant-skeleton-active .ant-skeleton-avatar,
.ant-skeleton-active .ant-skeleton-button,
.ant-skeleton-active .ant-skeleton-input {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--text-primary) 9%, transparent) 25%,
        color-mix(in srgb, var(--text-primary) 17%, transparent) 37%,
        color-mix(in srgb, var(--text-primary) 9%, transparent) 63%) !important;
    background-size: 400% 100% !important;
    animation: evSkeletonShimmer 1.4s ease infinite !important;
}

@keyframes evSkeletonShimmer {
    from { background-position: 100% 50%; }
    to { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .ant-skeleton-active .ant-skeleton-title,
    .ant-skeleton-active .ant-skeleton-paragraph > li,
    .ant-skeleton-active .ant-skeleton-avatar,
    .ant-skeleton-active .ant-skeleton-button,
    .ant-skeleton-active .ant-skeleton-input {
        animation: none !important;
    }
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===============================================
   Breadcrumb Overrides - Dark Theme
   =============================================== */

.ant-breadcrumb { color: var(--text-muted) !important; }
.ant-breadcrumb-link { color: var(--text-secondary) !important; }
.ant-breadcrumb-link:hover { color: var(--color-primary-text) !important; }
.ant-breadcrumb-link a { color: var(--text-secondary) !important; }
.ant-breadcrumb-link a:hover { color: var(--color-primary-text) !important; }
.ant-breadcrumb-separator { color: var(--text-muted) !important; }
/* The current crumb (prototype F .bc b): --text-primary at 600. AntD 1.6 renders nav > ol > li — the old
   `> span:last-child` selector matched nothing, so the current crumb stayed --text-secondary at 400 (I-036). */
.ant-breadcrumb li:last-child .ant-breadcrumb-link,
.ant-breadcrumb li:last-child .ant-breadcrumb-link a { color: var(--text-primary) !important; font-weight: 600; }

/* ===============================================
   Descriptions Overrides - Dark Theme
   =============================================== */

.ant-descriptions-header .ant-descriptions-title { color: var(--text-primary) !important; }
/* Bordered (I-036, prototype F .desc): radius 8; every cell 8px 12px at every size ((0,3,0) out-ranks AntD's
   small / middle padding); the label on --glass-bg-subtle, 13px --text-secondary. */
.ant-descriptions-bordered .ant-descriptions-view { border: 1px solid var(--glass-border) !important; border-radius: var(--radius-sm) !important; overflow: hidden; }
.ant-descriptions-bordered .ant-descriptions-row { border-bottom: 1px solid var(--glass-border) !important; }
.ant-descriptions-bordered .ant-descriptions-item-label { background: var(--glass-bg-subtle) !important; color: var(--text-secondary) !important; border-right: 1px solid var(--glass-border) !important; }
.ant-descriptions-bordered .ant-descriptions-view .ant-descriptions-item-label,
.ant-descriptions-bordered .ant-descriptions-view .ant-descriptions-item-content { padding: 8px 12px; }
.ant-descriptions-bordered .ant-descriptions-view .ant-descriptions-item-label { font-size: 13px; }
/* AntD rules a content cell followed by another column with a #f0f0f0 literal (the last cell keeps border-right: none) */
.ant-descriptions-bordered .ant-descriptions-view .ant-descriptions-item-content { border-right-color: var(--glass-border); }
.ant-descriptions-bordered .ant-descriptions-item-content { color: var(--text-primary) !important; background: transparent !important; }
.ant-descriptions-item-label { color: var(--text-secondary) !important; }
.ant-descriptions-item-content { color: var(--text-primary) !important; }

/* ===============================================
   Statistic Overrides - Dark Theme
   =============================================== */

.ant-statistic-title { color: var(--text-secondary) !important; }
.ant-statistic-content { color: var(--text-primary) !important; }
.ant-statistic-content-prefix, .ant-statistic-content-suffix { color: var(--text-secondary) !important; }

/* ===============================================
   Timeline Overrides - Dark Theme
   =============================================== */

/* Prototype F .tl (I-036): a hollow 12px dot (2px muted ring on --color-solid) on a 2px --glass-border-light tail,
   the text 28px in, 14px between items; a time / meta line (.text-muted, <time>) at 12.5px. The dot's colour says
   the state: done (green) is filled --color-success-hover, current (an explicit blue) a primary ring, error (red) a
   filled --color-error-light square (F's overdue dot; status by form as well as colour), attention (orange) an
   attention ring; every other colour, and an item without one (AntD's default blue class), is the neutral hollow
   dot. AntD Blazor writes an explicit Color as an inline style="border-color:<name>" — a raw CSS named colour — so
   the state rules match that attribute and need !important. Mapping a status to a colour stays with each page. */
.ant-timeline-item { padding-bottom: 14px; }
.ant-timeline-item-content { margin-left: 28px; top: -5px; color: var(--text-primary) !important; }
.ant-timeline-item-content .text-muted,
.ant-timeline-item-content time { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ant-timeline-item-tail { top: 12px; left: 5px; height: calc(100% - 12px); border-left: 2px solid var(--glass-border-light) !important; }
.ant-timeline-item-head { width: 12px; height: 12px; border-width: 2px !important; border-style: solid !important; border-color: var(--text-muted) !important; background: var(--color-solid) !important; color: var(--text-muted) !important; }
.ant-timeline-item-head-green, .ant-timeline-item-head[style*="border-color:green"] { border-color: var(--color-success-hover) !important; background: var(--color-success-hover) !important; color: var(--color-success-hover) !important; }
.ant-timeline-item-head[style*="border-color:blue"] { border-color: var(--color-primary) !important; color: var(--color-primary) !important; }
.ant-timeline-item-head-red, .ant-timeline-item-head[style*="border-color:red"] { border-color: var(--color-error-light) !important; border-radius: 3px; background: var(--color-error-light) !important; color: var(--color-error-light) !important; }
.ant-timeline-item-head[style*="border-color:orange"] { border-color: var(--color-attention) !important; color: var(--color-attention) !important; }

/* ===============================================
   List Overrides (I-036, prototype F .alist) — rows at least 46px, 6px 0, split by --glass-border (AntD's
   #f0f0f0 split literal before); the meta title --text-primary, the description 12.5px --text-muted.
   =============================================== */

.ant-list { color: var(--text-primary); }
.ant-list-item { min-height: 46px; padding: 6px 0; color: var(--text-primary); }
.ant-list-split .ant-list-item,
.ant-list-split .ant-list-header,
.ant-list-bordered,
.ant-list-bordered .ant-list-item { border-color: var(--glass-border); }
.ant-list-item-meta-title,
.ant-list-item-meta-title > a { color: var(--text-primary); }
.ant-list-item-meta-description { color: var(--text-muted); font-size: 12.5px; }
.ant-list-item-action > li { color: var(--text-secondary); }
.ant-list-item-action-split { background-color: var(--glass-border); }

/* ===============================================
   Rate Overrides - Star colour
   =============================================== */

.ant-rate-star-full .anticon, .ant-rate-star-half .ant-rate-star-first .anticon { color: var(--color-star) !important; }
.ant-rate-star-zero .anticon, .ant-rate-star-half .ant-rate-star-second .anticon { color: var(--text-muted) !important; }

/* ===============================================
   Segmented Overrides (I-036, prototype F .seg; README Decision 8) — every Segmented (Holidays, the dashboard view
   switch and matrix filter, the theme switch, Ageing, Chart of accounts): a bordered track on the control surface,
   radius 8, 3px inset; items 28px, 13px / 500, --text-secondary; the selected item is a raised neutral tile
   (--color-bg-dark-tertiary = F --bg-3, --text-primary, 1px shadow), not a primary fill. 28 + 2 x 3 + 2 = 36px,
   the button height. RadioButton groups take the same look (end of this file).
   =============================================== */

.ant-segmented { background: var(--control-bg) !important; border: 1px solid var(--glass-border); border-radius: var(--radius-sm) !important; padding: 3px !important; }
.ant-segmented-item { color: var(--text-secondary) !important; border-radius: 6px !important; font-size: 13px; font-weight: 500; transition: color var(--transition-base), background var(--transition-base) !important; }
.ant-segmented-item-label { padding: 0 12px; }
.ant-segmented-item:hover { color: var(--text-primary) !important; }
.ant-segmented-item-selected { background: var(--color-bg-dark-tertiary) !important; color: var(--text-primary) !important; border-radius: 6px !important; box-shadow: 0 1px 2px var(--glass-shadow) !important; }
/* After .ant-segmented-item:hover (same specificity): a hovered selected item keeps its ink */
.ant-segmented-item-selected:hover { color: var(--text-primary) !important; }
.ant-segmented-thumb { background: var(--color-bg-dark-tertiary) !important; border-radius: 6px !important; box-shadow: 0 1px 2px var(--glass-shadow); }
/* I-029: keyboard focus lands on an option's visually hidden radio input — ring the option itself (the focus ring the
   work-queue tabs and Otvori use; an outline, so the selected option's own shadow stays) */
.ant-segmented-item:has(.ant-segmented-item-input:focus-visible) { outline: 2px solid var(--color-primary-glow); outline-offset: 1px; }

/* Multi-select chips: neutral like a .tag (I-036, F .msel .tag) — the neutral tint, border and ink of .tag-neutral,
   radius 6, 12px / 600; the remove cross is muted until hover */
.ant-select-multiple .ant-select-selection-item { background: var(--color-neutral-bg) !important; border: 1px solid var(--color-neutral-border) !important; border-radius: 6px !important; color: var(--color-neutral-text) !important; font-size: 12px; font-weight: 600; }
.ant-select-multiple .ant-select-selection-item-content { color: var(--color-neutral-text) !important; }
.ant-select-multiple .ant-select-selection-item-remove { color: var(--text-muted) !important; }
.ant-select-multiple .ant-select-selection-item-remove:hover { color: var(--text-primary) !important; }

/* ===============================================
   Tooltip Overrides - Dark Theme
   =============================================== */

/* Prototype F .tip (I-036): inverted in both themes — an ink chip (--text-primary) with --color-bg-dark text
   (white chip on dark, near-black chip on light; >= 15:1 both), radius 6, padding 6 10, 12.5 / 500, no border. The
   arrow takes the chip colour. Global — every AntD Tooltip is meant to change; the I-030 chart tooltips are
   ChartCard's own markup, not AntD. */
.ant-tooltip-inner {
    min-height: 0 !important;
    padding: 6px 10px !important;
    background: var(--text-primary) !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: var(--color-bg-dark) !important;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: var(--shadow-tooltip) !important;
}

.ant-tooltip-arrow-content {
    --antd-arrow-background-color: var(--text-primary);
    background: var(--text-primary) !important;
}

/* A link inside the chip (the folded rail's nav label, I-024) takes the chip's ink: the brand link colour is meant for
   the page ground, and on the inverted chip it falls under AA (I-047). (0,1,1) / (0,2,1) over the global a rules. */
.ant-tooltip-inner a,
.ant-tooltip-inner a:hover,
.ant-tooltip-inner a:active {
    color: inherit;
}

@media (max-width: 768px) {
    .ant-picker-dropdown {
        max-width: 100vw !important;
    }

    .ant-picker-panel-container {
        overflow-x: auto !important;
    }

    .ant-picker-panels {
        flex-direction: column !important;
    }
}

/* ============================================================
   TextArea affix-wrapper alignment (F-174 — digidok polish)
   Promote the affix-wrapper to be the glass box so the wrapped
   <textarea> aligns pixel-perfect with sibling Input fields in
   the same form. Inner textarea stays transparent.
   ============================================================ */
.ant-input-affix-wrapper.ant-input-affix-wrapper-textarea {
    background: var(--control-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: var(--radius-md) !important;
    padding: 0 !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.ant-input-affix-wrapper.ant-input-affix-wrapper-textarea:hover {
    border-color: var(--color-primary-light) !important;
}

.ant-input-affix-wrapper.ant-input-affix-wrapper-textarea-focused,
.ant-input-affix-wrapper.ant-input-affix-wrapper-textarea:focus-within {
    border-color: var(--color-primary-light) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.ant-input-affix-wrapper-textarea > textarea.ant-input {
    background: transparent !important;
    border: none !important;
    padding: var(--space-md) !important;
    color: var(--text-primary) !important;
}

/* Tree rows (I-036, prototype F .tree): 30px rows with no gap, 14px; every nested level hangs on a 1px
   --glass-border-light guide line (AntD's show-line rule, drawn in each indent unit); the switcher chevron muted.
   The selected row is the primary tint with --text-primary (AntD's #bae7ff literal before); a drop target is the
   primary fill. A row title may carry a mono code (.tree-node-title__code) and a count pill
   (.tree-node-title__count) — see /design-system/playground/tree. */
.ant-tree {
    font-size: 14px;
}

.ant-tree .ant-tree-treenode {
    align-items: center;
    padding: 0;
}

.ant-tree .ant-tree-node-content-wrapper,
.ant-tree .ant-tree-switcher {
    min-height: 30px;
    line-height: 30px;
}

.ant-tree .ant-tree-switcher {
    color: var(--text-muted);
}

.ant-tree .ant-tree-node-content-wrapper {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
}

.ant-tree .ant-tree-indent {
    align-self: stretch;
}

.ant-tree .ant-tree-indent-unit {
    position: relative;
    height: 100%;
}

.ant-tree .ant-tree-indent-unit::before {
    content: '';
    position: absolute;
    top: 0;
    right: 12px;
    bottom: 0;
    border-right: 1px solid var(--glass-border-light);
}

.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
    background: var(--color-primary-bg) !important;
    color: var(--text-primary);
}

.ant-tree .ant-tree-treenode.drag-over > [draggable] {
    background: var(--color-primary) !important;
    color: var(--color-on-primary) !important;
}

.ant-tree .ant-tree-treenode .ant-tree-drop-indicator {
    background-color: var(--color-primary);
}

.ant-tree .ant-tree-treenode .ant-tree-drop-indicator::after {
    border-color: var(--color-primary);
}

.ant-tree .tree-node-title__code {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
}

.ant-tree .tree-node-title--branch .tree-node-title__name {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===============================================
   Document pages (I-038) — the AntDesign side of the block of the same title in app.css: Table cells and inputs in
   the line grid (.it--form / .it--fit / .it--dense / .it--tight on Table Class, the cell kinds on Column Class /
   HeaderClass), a FormItem in .fgrid, Descriptions as the key facts of a .doc-main header card, Steps / Timeline in
   a rail card (.rs). Every rule is scoped to those classes (no bare .ant-*, README I-038 Decision 14). Inputs in a
   table cell keep AntD's 32px app-wide (the :not(:is(td, th, .ant-table-cell) *) recipes above); .it--form raises
   them to F's 34px (.it--form .inp), a header field in .fgrid keeps the 38px recipe.
   =============================================== */

/* Cells: F .it — 9px 14px, the first / last cell 18px from the card edge, no wrapping, F's 1.5 line height (AntD's
   1.5715 made a read-only row 42px for F's 40; I-038 TASK_06). (0,3,2) ties AntD's middle / small size rules and wins
   by order. */
.ant-table:is(.it--form, .it--fit) .ant-table-thead > tr > th,
.ant-table:is(.it--form, .it--fit) .ant-table-tbody > tr > td,
.ant-table:is(.it--form, .it--fit) .ant-table-summary > tr > td {
    padding: 9px 14px;
    white-space: nowrap;
    line-height: 1.5;
}

/* The read-only grid's head row is F's 35px: the prototype's table cells take the normal line height (o.html renders
   without a doctype — CF-097 TASK_05; the hand-built table's twin is in app.css) */
.ant-table.it--fit .ant-table-thead > tr > th {
    line-height: normal;
}

/* A sortable column keeps that row height: AntD's two stacked 11px carets make an 18.7px box over the 16px label (a
   37.7px head row); the box is pulled into the label's line, the carets stay drawn in the cell padding (F's sort mark
   sits in the label line — CF-097 TASK_11, the opening inventory's product column) */
.ant-table.it--fit .ant-table-thead > tr > th .ant-table-column-sorter-inner {
    margin-block: -1.5px;
}

.ant-table:is(.it--form, .it--fit) .ant-table-thead > tr > th:first-child,
.ant-table:is(.it--form, .it--fit) .ant-table-tbody > tr > td:first-child,
.ant-table:is(.it--form, .it--fit) .ant-table-summary > tr > td:first-child {
    padding-left: 18px;
}

.ant-table:is(.it--form, .it--fit) .ant-table-thead > tr > th:last-child,
.ant-table:is(.it--form, .it--fit) .ant-table-tbody > tr > td:last-child,
.ant-table:is(.it--form, .it--fit) .ant-table-summary > tr > td:last-child {
    padding-right: 18px;
}

/* A table of inputs: 6px above and below the 34px control (F .it--form td) */
.ant-table.it--form .ant-table-tbody > tr > td {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Many input columns: 8px sides (F .it--tight) */
.ant-table.it--tight .ant-table-thead > tr > th,
.ant-table.it--tight .ant-table-tbody > tr > td,
.ant-table.it--tight .ant-table-summary > tr > td {
    padding-left: 8px;
    padding-right: 8px;
}

/* CF-099 F-b8-02: a read-only grid's figure columns only (`cell-tight` on the Column Class: its header and cells) take F's tight
   8px sides, so a document's whole calculation fits its card at 1440 while the row number and the line's name keep F's
   14px item cells (O85); the card's end keeps its 18px (the last cell) */
.ant-table.it--fit .ant-table-thead > tr > th.cell-tight,
.ant-table.it--fit .ant-table-tbody > tr > td.cell-tight {
    padding-left: 8px;
}

.ant-table.it--fit .ant-table-thead > tr > th.cell-tight:not(:last-child),
.ant-table.it--fit .ant-table-tbody > tr > td.cell-tight:not(:last-child) {
    padding-right: 8px;
}

/* Wide sheets: 9px 8px, 12px at the card edges, F's 1.5 line height (F .it--dense) */
.ant-table.it--dense .ant-table-thead > tr > th,
.ant-table.it--dense .ant-table-tbody > tr > td,
.ant-table.it--dense .ant-table-summary > tr > td {
    padding: 9px 8px;
    line-height: 1.5;
}

.ant-table.it--dense .ant-table-thead > tr > th:first-child,
.ant-table.it--dense .ant-table-tbody > tr > td:first-child,
.ant-table.it--dense .ant-table-summary > tr > td:first-child {
    padding-left: 12px;
}

.ant-table.it--dense .ant-table-thead > tr > th:last-child,
.ant-table.it--dense .ant-table-tbody > tr > td:last-child,
.ant-table.it--dense .ant-table-summary > tr > td:last-child {
    padding-right: 12px;
}

/* The totals row (AntD SummaryRow → tfoot.ant-table-summary; F .it--form / .it--dense tfoot): a stronger rule above,
   the subtle glass, bold tabular figures. A read-only document's lines carry it too (.it--fit: JournalEntryDetail — F's
   journal grid draws its totals as this row; I-038 TASK_06) */
.ant-table:is(.it--form, .it--fit, .it--dense) .ant-table-summary > tr > td {
    border-top: 1px solid var(--glass-border-light) !important;
    border-bottom: 0 !important;
    background: var(--glass-bg-subtle) !important;
    color: var(--text-primary) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ant-table:is(.it--form, .it--fit) .ant-table-summary > tr > td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.ant-table.it--dense .ant-table-summary > tr > td {
    padding-top: 11px;
    padding-bottom: 11px;
}

/* AntD paints the summary's tfoot white (.ant-table-summary { background: #fff }) and the cells above carry the totals
   row's own translucent glass, so a dark theme showed white text on white. The tfoot is clear; a pinned (fixed-left or,
   I-045, fixed-right) cell of the row is opaque, so the scrolled figures do not show through it (F: the last tfoot cell
   is --solid-2).
   I-038 TASK_09 — consumers: every it--form / it--fit / it--dense Table with a SummaryRow (PayrollRunDetail,
   RetroCorrectionDetail, JournalEntryDetail, FinancialStatementDetail). */
.ant-table:is(.it--form, .it--fit, .it--dense) .ant-table-summary {
    background: transparent;
}

/* The totals row reads in the primary text like its cells (F's tfoot row; CF-097 TASK_05) */
.ant-table:is(.it--form, .it--fit, .it--dense) .ant-table-summary > tr {
    color: var(--text-primary);
}

.ant-table:is(.it--form, .it--fit, .it--dense) .ant-table-summary > tr > td:is(.ant-table-cell-fix-left, .ant-table-cell-fix-right) {
    background: var(--color-solid-2) !important;
}

/* The row number and the computed amount keep their own colour against the table's !important cell colour */
:is(.it--form, .it--fit, .it--dense) .ant-table-tbody > tr > td.rn {
    color: var(--text-muted) !important;
}

/* A read-only table fills its card (F .it--fit is width 100%, no min-width): AntD's own inline min-width: 100% on a
   ScrollX table stays, so the table is never narrower than its card and scrolls inside it only when the card is
   narrower than the sum of its column widths. (I-038 TASK_08: a min-width: 0 here left the 740px schedule, the 750px
   ledger and the 710px journal lines short of their 796px cards.) */

/* Controls in the grid: 34px, at most 150px wide (F .it--form .inp); a wide / medium cell is never capped, a numeric
   cell is 140px and right-aligned, a short one 84px. */
.it--form td .ant-input:not(textarea),
.it--form td .ant-input-affix-wrapper,
.it--form td .ant-picker {
    height: 34px;
}

.it--form td .ant-input,
.it--form td .ant-input-affix-wrapper,
.it--form td .ant-input-number,
.it--form td .ant-select,
.it--form td .ant-picker {
    width: 100%;
    max-width: 150px;
}

.it--form td .ant-input-number .ant-input-number-input {
    height: 32px;
}

/* F lowers only its inputs (.it--form .inp); a select in the grid keeps the 38px control (F .sel — the invoice grid's
   unit / VAT rate, so its rows are 51px; I-038 TASK_06). The account picker stands for F's journal account input (.inp
   with a datalist) and is 34px like it. */
.it--form td .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 38px;
}

.it--form td .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {
    height: 36px;
}

.it--form td .ant-select-single .ant-select-selector .ant-select-selection-item,
.it--form td .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 36px;
}

.it--form td .ant-select-single.account-picker:not(.ant-select-customize-input) .ant-select-selector {
    height: 34px;
}

.it--form td .ant-select-single.account-picker:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {
    height: 32px;
}

.it--form td .ant-select-single.account-picker .ant-select-selector .ant-select-selection-item,
.it--form td .ant-select-single.account-picker .ant-select-selector .ant-select-selection-placeholder {
    line-height: 32px;
}

.it--form td:is(.cell-wide, .cell-mid) :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-select, .ant-picker) {
    max-width: none;
}

.it--form td.cell-num :is(.ant-input, .ant-input-number) {
    max-width: 140px;
}

.it--form td.cell-num .ant-input-number .ant-input-number-input,
.it--form td.cell-num .ant-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.it--form td.cell-sm :is(.ant-input, .ant-input-number, .ant-select) {
    max-width: 84px;
}

/* Many input columns: the select's text 10px from its left edge (F .it--tight .sel) */
.it--tight td .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    padding-left: 10px;
}

/* An invalid cell control (aria-invalid, F's line errors): the error border, as a FormItem error */
.it--form td [aria-invalid="true"]:is(.ant-input, .ant-input-number-input),
.it--form td .ant-input-number:has(> .ant-input-number-input-wrap > [aria-invalid="true"]) {
    border-color: var(--color-error-light) !important;
}

/* The back affordance in PageHeader's Leading on a document page (F draws none; I-038 Decision 5): a 32px text icon
   button before the h1, on the h1's line (the h1 keeps its 8px bottom margin) */
.page-header__title-row > .ant-btn.doc-back {
    flex: none;
    width: 32px;
    height: 32px;
    margin: 0 0 var(--space-sm) 0;
    padding: 0;
    color: var(--text-secondary);
}

/* A FormItem in the form grid: 12px under it (F .fgrid .fitem), the last one too */
.fgrid > .ant-form-item,
.fgrid > .ant-form-item:last-child {
    margin-bottom: 12px;
}

/* A read-only field in the form grid (F .inp[readonly]: the subtle glass, the secondary text, no hover border) */
.fgrid .ant-input[readonly],
.fgrid .ant-input[readonly]:hover {
    background: var(--glass-bg-subtle) !important;
    border-color: var(--glass-border-light) !important;
    color: var(--text-secondary) !important;
    cursor: default;
}

/* CF-099 F-b8-05: a vertical Descriptions (the label over its value) draws no colon. AntD Blazor 1.6 adds its no-colon class
   only to a horizontal item and marks no vertical layout, so `Colon="false"` on a vertical one still drew the label's " :"
   ("Šifra za SEF :"). A vertical label is the only child of its item container (a horizontal one shares it with its
   content; a bordered one is a th, whose colon AntD already hides); every vertical Descriptions in the App passes
   Colon="false" (InvoiceDetail's tax-point and B2G facts, the detail / portal playgrounds and their showcase) */
.ant-descriptions-item-container:not(:has(> .ant-descriptions-item-content)) > .ant-descriptions-item-label::after {
    content: none;
}

/* Key facts of a document's header card (F .counts--in .count): AntD Descriptions after the .doc-hd row — the label a
   12.5px muted line over a 14px / 600 value */
.doc-main .card-b > .doc-hd ~ .ant-descriptions .ant-descriptions-item-label {
    color: var(--text-muted) !important;
    font-size: 12.5px;
}

.doc-main .card-b > .doc-hd ~ .ant-descriptions .ant-descriptions-item-label::after {
    content: none;
}

.doc-main .card-b > .doc-hd ~ .ant-descriptions .ant-descriptions-item-content {
    color: var(--text-primary) !important;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Key facts on more than one row (I-060, Evidens I-044 README Decision 27): AntD's vertical Descriptions alternates a
   label row and a value row, both padded 8px, so a label sat as close to the value above it as to its own (a header card
   with seven rows). The label hugs its value; the pairs keep the space between them. Bordered lists use other cells and
   are untouched. */
.doc-main .card-b > .doc-hd ~ .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-row:nth-child(odd) > .ant-descriptions-item {
    padding-bottom: 2px;
}

.doc-main .card-b > .doc-hd ~ .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-row:nth-child(even) > .ant-descriptions-item {
    padding-bottom: 14px;
}

.doc-main .card-b > .doc-hd ~ .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-row:last-child > .ant-descriptions-item {
    padding-bottom: 0;
}

/* A rail card's flow and activity: nothing hangs below the last step / event */
.glass-card.rs .ant-steps-vertical > .ant-steps-item:last-child .ant-steps-item-content {
    min-height: 0;
}

/* ≤ 640px a rail card's flow names only the current (or failed) step — its title and its date; the bullets keep the
   rest (F's phone .steps rule, o.html 922 — CF-097 TASK_05) */
@media (max-width: 640px) {
    .glass-card.rs .ant-steps-vertical > .ant-steps-item:not(.ant-steps-item-process):not(.ant-steps-item-error) :is(.ant-steps-item-title, .ant-steps-item-description) {
        display: none;
    }
}

.glass-card.rs .ant-timeline {
    margin: 0;
    padding-top: 5px;
}

.glass-card.rs .ant-timeline-item:last-child {
    padding-bottom: 0;
}

/* The rail's vertical action list: full-width buttons, label at the start (F .vacts .btn) */
.vacts > .ant-btn,
.vacts > * > .ant-btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

/* A line grid's tools row (.lg-tools, app.css): its scan / search field is F's .lg-tools .inp (f.src.html 596) — 32px, 13px,
   the small radius — not the 38px form input; (0,3,0) out-ranks the wrapper's height and radius rules, and the I-012
   <=480px 44px lift (a min-height) still wins on a phone (CF-098 TASK_08, O14) */
.lg-tools > .inpwrap .ant-input-affix-wrapper {
    height: 32px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm) !important;
}

.lg-tools > .inpwrap .ant-input-affix-wrapper > .ant-input {
    font-size: 0.8125rem;
}

/* ≤ 640px the bar's buttons share the row (F .actbar .btn) */
@media (max-width: 640px) {
    .actbar > .ant-btn,
    .actbar > * > .ant-btn {
        flex: 1 1 auto;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===============================================
   Form bottom (I-042) — the AntDesign side of the block of the same title in app.css: the add-line row's button (an
   AntD Text Button in LineGridAddRow) at F's .btn--sm.btn--text size. The phone bar's shared button row (F .actbar .btn
   at <= 640px) is the I-038 rule just above — unchanged. Scoped to tr.it__add (no bare .ant-*).
   =============================================== */

/* F .btn--sm.btn--text: 28px, 8px sides, 13px, radius 6; the plus icon 14px. A table cell keeps it compact at <= 480px
   too (the touch-target lift exempts td, I-012 AD3). */
table.it--form > tbody > tr.it__add > td > .ant-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
}

table.it--form > tbody > tr.it__add > td > .ant-btn > .anticon {
    font-size: 14px;
}

table.it--form > tbody > tr.it__add > td > .ant-btn > .anticon + span {
    margin-left: 0;
}

/* ===============================================
   Detail tab (I-044) — the AntDesign side of the block of the same title in app.css: a record row's leading tags are
   spaced by the row's gap, not by AntD's 8px tag margin (a wrapped tag line would otherwise end in a dangling margin);
   so are a section's meta-line tags (I-060, Evidens I-044 TASK_08). Scoped to .record-row__tags /
   .detail-tab-section__meta (no bare .ant-*).
   =============================================== */
.record-row__tags > .ant-tag,
.detail-tab-section__meta > .ant-tag {
    margin-right: 0;
    margin-inline-end: 0;
}

/* ===============================================
   Entry and edge pages (I-039) — the AntDesign side of the block of the same title in app.css: the one-time-code
   input (F .inp--otp on an AntD Input), the full-width primary (F .btn--block, 42px), F's .lnk on link buttons in
   .auth-row / .auth-id, the alert in the auth card, the row's mark-read icon button (F .btn--sm.btn--icon) and the
   category select in the notification filter bar. Every rule is scoped to those classes (no bare .ant-*, README
   I-039 Decision 14). The read-state filter is an AntD Segmented, already F's .seg app-wide (I-036 above).
   =============================================== */

/* One input, not boxes (F .inp--otp): 50px, mono 600 22px, spaced .45em, centred; the placeholder in body type */
.auth-card .ant-input.inp--otp {
    height: 50px;
    padding-left: calc(12px + 0.45em);
    font: 600 22px/1 var(--font-mono);
    letter-spacing: 0.45em;
    text-align: center;
}

.auth-card .ant-input.inp--otp::placeholder {
    font: 400 14px var(--font-body);
    letter-spacing: 0;
}

/* F .fitem: 14px under a field (the App-wide form item keeps 1.25rem); the submit row closes the form — F's block
   button carries no margin, so the code step's .auth-row (mt 14) and the .auth-alt line (mt 18) set the air below it */
.auth-card .ant-form-item {
    margin-bottom: 14px;
}

.auth-card .ant-form-item:has(.ant-btn-block) {
    margin-bottom: 0;
}

/* F .inp / .sel take the body's 15px (AntD 14) */
.auth-card :is(.ant-input, .ant-select) {
    font-size: 15px;
}

/* F .btn--block: the card's submit spans the card at 42px */
.auth-card .ant-btn.ant-btn-block {
    height: 42px;
}

/* F .auth-card .alert: 16px above the next block */
.auth-card .ant-alert {
    margin-bottom: 16px;
}

/* The result face is a centred flex column (InviteAccept's states in the card): its alerts and its code form span the
   card instead of shrinking to their content, left-aligned; the Resend alone in the invite's row is centred */
.auth-card .status-result > :is(.ant-alert, .ant-form) {
    align-self: stretch;
    text-align: left;
}

/* ... and so does the actions row, so the card's block button spans the card */
.auth-card .status-result > .status-result__actions {
    align-self: stretch;
}

.auth-card .status-result .auth-row {
    justify-content: center;
}

/* F .lnk on a link button (Resend, Nazad): no box, accent text, underlined 3px below, the body's 1.5 line */
:is(.auth-row, .auth-id) .ant-btn.ant-btn-link {
    height: auto;
    padding: 0;
    /* !important: the App-wide .ant-btn-link border (1px transparent) and ink above are !important */
    border: 0 !important;
    font-size: inherit;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-link-text) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none;
}

:is(.auth-row, .auth-id) .ant-btn.ant-btn-link:not(:disabled):hover {
    color: var(--color-link-text) !important;
    background: transparent;
    text-decoration-thickness: 2px;
}

/* The row's mark-read button (F .btn--sm.btn--text.btn--icon, 28px). The 28px size is above 480px only: this rule's
   specificity would otherwise beat the <=480px 44px icon-button lift on min-width and leave a 28 x 44 sliver
   (I-049 TASK_02, L3 review) */
.nrow > .ant-btn.mark-read-btn {
    padding: 0;
    border-radius: 6px;
    color: var(--text-secondary);
}

@media (min-width: 480.02px) {
    .nrow > .ant-btn.mark-read-btn {
        width: 28px;
        min-width: 28px;
        height: 28px;
    }
}

.nrow > .ant-btn.mark-read-btn:not(:disabled):hover {
    color: var(--color-primary-text);
    background: var(--glass-bg-light);
}

/* The category select in the filter bar keeps a readable width */
.nbar .ant-select {
    min-width: 200px;
}
