/* Fonts loaded via <link> in index.html for non-blocking rendering */

/* =====================================================================================================
   FORK BRAND VALUES
   Operans: orange primary, cobalt attention (I-045). A fork sets its own values here.
   The only block a fork edits to re-brand the App. Every colour VALUE that is a brand choice lives here
   and nowhere else; structural tokens and every rule refer to these by name and assume no hue.
   Also mirror --color-primary in App/Components/ChartPalette.cs (canvas charts cannot read CSS tokens).
   data-theme on <html> selects the token set: the first rule is the dark default (no data-theme, or "dark"), the
   :root[data-theme="light"] rule re-declares only what changes on light. A fork sets its light brand values there too.
   .theme-dark-island (the sidebar) takes the dark values in both themes; derived tokens re-resolve on it.
   ===================================================================================================== */
:root, .theme-dark-island {
    /* Primary: primary actions, links, selection, focus rings */
    --color-primary: #e67a2e;
    --color-primary-light: #f0944d;
    --color-primary-dark: #c9631f;
    --color-primary-rgb: 230, 122, 46;
    --color-primary-light-rgb: 240, 148, 77;
    --color-primary-glow: rgba(var(--color-primary-rgb), 0.4);
    --color-primary-bg: rgba(var(--color-primary-rgb), 0.1);
    /* Text and icons on a primary fill */
    --color-on-primary: #1a0d03;
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);

    /* Attention: unread markers, notification badges, counts and notices that need action */
    --color-attention: #4f8cff;
    --color-attention-light: #7aa9ff;
    --color-attention-rgb: 79, 140, 255;
    /* Text on an attention fill (count badges) */
    --color-on-attention: #06142e;

    /* Favourite and rating stars */
    --color-star: #e67a2e;

    /* Enterprise subscription tier: tag text and the channel of its tints */
    --color-tier-enterprise: #f0944d;
    --color-tier-enterprise-rgb: 240, 148, 77;

    /* Sidebar: the selected navigation item — prototype F --sider-active / --sider-active-bg (I-051): the light primary
       on a 16 % primary tint */
    --color-nav-active: #f0944d;
    --color-nav-active-bg: rgba(var(--color-primary-rgb), 0.16);

    /* Neutral informational tags: the hue; text, fill and border derive from it */
    --color-neutral: #8c93a3;
    --color-neutral-rgb: 140, 147, 163;

    /* Page background glow (layered over the page background by --gradient-bg) */
    --gradient-page-glow: radial-gradient(ellipse at 20% 0%, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(var(--color-primary-rgb), 0.1) 0%, transparent 50%);
}
/* Light theme: only the brand values that change. Text roles reach 4.5 : 1 on the ground and raised surfaces. */
:root[data-theme="light"] {
    --color-primary: #b1520f;
    --color-primary-light: #bc5812;
    --color-primary-dark: #9a460b;
    --color-primary-rgb: 177, 82, 15;
    --color-primary-light-rgb: 188, 88, 18;
    --color-on-primary: #ffffff;

    /* The attention fill darkens to the prototype's light cobalt with white ink (Operans prototype decision 1, F
       --badge-bg / --badge-fg on light; I-051 AD-5); the text variant is the same cobalt. The sidebar is a dark island,
       so its count pills keep the dark pair */
    --color-attention: #1d4fd7;
    --color-attention-rgb: 29, 79, 215;
    --color-on-attention: #ffffff;
    --color-attention-light: #1d4fd7;

    --color-star: #b77409;

    --color-tier-enterprise: #9a4a0e;
    --color-tier-enterprise-rgb: 154, 74, 14;

    --color-neutral: #6b7385;
    --color-neutral-rgb: 107, 115, 133;

    --gradient-page-glow: radial-gradient(ellipse at 20% 0%, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(var(--color-primary-rgb), 0.05) 0%, transparent 50%);
}
/* ===== END FORK BRAND VALUES ===== */

/* STRUCTURAL TOKENS — identical in every fork; values that are brand choices live in the block above.
   Dark default on :root and on .theme-dark-island (the sidebar stays dark in both themes); the light values follow
   in :root[data-theme="light"] below. */
:root, .theme-dark-island {
    /* Native controls (scrollbars, form widgets) follow the theme */
    --color-scheme: dark;

    /* Shadows */
    --shadow-inset-dark: rgba(0, 0, 0, 0.1);

    /* Dark Theme */
    --color-bg-dark: #0d0f14;
    --color-bg-dark-secondary: #141821;
    --color-bg-dark-tertiary: #1a1f2e;
    /* Elevated surface for floating menus / dropdown panels (Select, Dropdown menu, etc.) */
    --color-bg-elevated: #1c1f27;
    /* Pinned (Fixed) table cells: opaque, or the columns that scroll under them show through (B-054). */
    --table-pinned-bg: var(--color-bg-elevated);
    /* Edge shadow of the first right-pinned cell while the table overflows to the right (table pattern, I-028) */
    --table-pin-shadow: rgba(var(--color-shadow-rgb), 0.55);
    /* Quiet zone behind a QR code: white in both themes, so a scanner always reads it */
    --color-qr-plate: #ffffff;
    /* Ink on the gold Max-tier fill: dark in both themes, so it is not redefined on light */
    --color-on-gold: #1a1f2e;
    /* Ink on a solid --color-success fill (checkout success disc): white in both themes */
    --color-on-success: #ffffff;
    /* Text on a solid --color-error fill (primary danger button): dark ink on the bright dark-theme red, white on the light one */
    --color-on-error: #1f0608;
    /* Text on a solid --color-error-mark fill (the overdue status chip — F --on-err on --err-solid; CF-099 TASK_13) */
    --color-on-error-mark: #2a0706;

    /* Scrims: behind a Modal / Drawer, and the softer veil over a loading (Spin) container */
    /* F --mask (I-041 TASK_12; was rgba(0, 0, 0, .7) with a 4px blur) */
    --overlay-mask: rgba(4, 5, 8, 0.62);
    --overlay-mask-soft: rgba(var(--color-shadow-rgb), 0.45);
    /* Plate under a control or status icon laid over an image or thumbnail; its content follows --color-fg-NN */
    --surface-overlay-strong-rgb: var(--color-bg-dark-secondary-rgb);
    --surface-overlay-strong: rgba(var(--surface-overlay-strong-rgb), 0.9);

    /* Floating panels: menus (Select, Dropdown), other panels (picker, message, notification, modal, popover), tooltip */
    --shadow-panel: 0 8px 32px rgba(var(--color-shadow-rgb), 0.5);
    --shadow-panel-soft: 0 8px 32px rgba(var(--color-shadow-rgb), 0.4);
    --shadow-tooltip: 0 4px 16px rgba(var(--color-shadow-rgb), 0.3);

    /* Glass Effects */
    --glass-bg-subtle: rgba(255, 255, 255, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-light: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    /* The boundary of a control that is identified by its outline (the header command field): 3 : 1 against the
       surface around it (WCAG 1.4.11) — the glass borders above are decoration and stay below that */
    --control-border: rgba(255, 255, 255, 0.4);
    /* The fill of a form control (input, select, picker, number field): the glass tier on dark, white on light
       (prototype F --glass-2), so a field is not a grey wash on a white card */
    --control-bg: var(--glass-bg-light);
    /* Opaque raised surfaces (prototype F --solid / --solid-2): where a tile must hide what is under it */
    --color-solid: #191b20;
    --color-solid-2: #202226;
    /* Track of a Switch that is off: visible on the ground in both themes (AntD's black 0.25 vanishes on dark) */
    --switch-off: rgba(255, 255, 255, 0.28);
    --glass-shadow: rgba(0, 0, 0, 0.25);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.55);
    /* Decorative only (dividers, watermark glyphs): below text contrast on purpose */
    --text-faint: rgba(255, 255, 255, 0.4);

    /* Foreground tint scale: the foreground colour at a fixed alpha, fifteen steps. Overlays and hairlines
       03-15, borders 10-25, text 25-85. A theme swaps --color-fg-rgb (and may tune a step); rules never change.
       Do not add a step: use the nearest one. */
    --color-fg-rgb: 255, 255, 255;
    --color-fg-03: rgba(var(--color-fg-rgb), 0.03);
    --color-fg-04: rgba(var(--color-fg-rgb), 0.04);
    --color-fg-05: rgba(var(--color-fg-rgb), 0.05);
    --color-fg-06: rgba(var(--color-fg-rgb), 0.06);
    --color-fg-08: rgba(var(--color-fg-rgb), 0.08);
    --color-fg-10: rgba(var(--color-fg-rgb), 0.1);
    --color-fg-12: rgba(var(--color-fg-rgb), 0.12);
    --color-fg-15: rgba(var(--color-fg-rgb), 0.15);
    --color-fg-25: rgba(var(--color-fg-rgb), 0.25);
    --color-fg-35: rgba(var(--color-fg-rgb), 0.35);
    --color-fg-45: rgba(var(--color-fg-rgb), 0.45);
    --color-fg-50: rgba(var(--color-fg-rgb), 0.5);
    --color-fg-65: rgba(var(--color-fg-rgb), 0.65);
    --color-fg-70: rgba(var(--color-fg-rgb), 0.7);
    --color-fg-85: rgba(var(--color-fg-rgb), 0.85);

    /* Channel triplets for rgba() composition: rgba(var(--color-x-rgb), <alpha>). The status, tier, amber,
       indigo and greyscale triplets are declared with their colours below. */
    --color-shadow-rgb: 0, 0, 0;
    --color-bg-dark-secondary-rgb: 20, 24, 33;
    --color-error-light-rgb: 255, 120, 117;
    /* --color-info (#aab4c8). The older --color-info-rgb holds the hover shade #bbc3d3 and keeps its name. */
    --color-info-base-rgb: 170, 180, 200;
    --color-blue-rgb: 59, 130, 246;
    --color-cyan: #22d3ee;
    --color-cyan-rgb: 34, 211, 238;

    /* AntD preset tag hues that have no semantic token (overrides.css § Tag Overrides) */
    --color-tag-cyan-rgb: 19, 194, 194;
    --color-tag-cyan-text: #36cfc9;
    --color-tag-magenta-rgb: 235, 47, 150;
    /* AntD magenta-4: magenta-5 (#f759ab) reached only 4.37 : 1 on its own tint over a dark card (I-060, Evidens I-044
       Decision 34 (e)) */
    --color-tag-magenta-text: #ff85c0;
    --color-tag-lime-rgb: 160, 217, 17;
    --color-tag-lime-text: #bae637;
    --color-tag-volcano-rgb: 250, 84, 28;
    --color-tag-volcano-text: #ff7a45;
    --color-tag-geekblue-rgb: 47, 84, 235;
    /* AntD geekblue-4: geekblue-5 (#597ef7) reached only 4.2 : 1 on its own tint over a dark card (I-036) */
    --color-tag-geekblue-text: #85a5ff;

    /* Gold (the Max subscription tier) and the Blazor error boundary */
    --color-gold: #d4af37;
    --color-gold-bright: #ffd700;
    --color-gold-deep: #b8860b;
    --color-gold-rgb: 212, 175, 55;
    --color-gold-bright-rgb: 255, 215, 0;
    --color-error-boundary: #b32121;
    /* Ink on the error-boundary fill, which is the same dark red in both themes */
    --color-on-error-boundary: #ffffff;
    /* The Blazor error bar (#blazor-error-ui) is a light strip in both themes */
    --color-error-ui-bg: #ffffe0;
    /* ...so its text is a fixed ink, not the page theme's --text-primary (white on dark) */
    --color-on-error-ui: #10131a;

    /* Derived from the brand values above */
    /* The primary used as text (active tab, selected option / menu item, pagination, breadcrumb hover) */
    --color-primary-text: var(--color-primary-light);
    /* An inline text link (F .lnk, --accent-text): on dark the lighter accent ink the sidebar's active item also uses */
    --color-link-text: var(--color-nav-active);
    /* The link ink on a subtle (3 %) ground — the context bar's Izmeni (CF-099 F-b3-04): on dark the link ink itself */
    --color-link-text-on-subtle: var(--color-link-text);
    /* The primary as text on a veiled surface (the selected page number sits on --glass-bg-light): on light the plain
       primary falls short of 4.5 : 1 there */
    --color-primary-text-strong: var(--color-primary);
    --color-attention-bg: rgba(var(--color-attention-rgb), 0.1);
    /* The attention hue used as text (code-expiry notice): on light its darker -light shade */
    --color-attention-text: var(--color-attention);
    --color-neutral-text: color-mix(in srgb, var(--color-neutral) 50%, var(--text-primary));
    --color-neutral-bg: rgba(var(--color-neutral-rgb), 0.15);
    --color-neutral-border: rgba(var(--color-neutral-rgb), 0.38);

    /* Gradients */
    --gradient-bg: var(--gradient-page-glow), linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-dark-secondary) 100%);

    /* Semantic Status Colors */
    --color-success: #52c41a;
    --color-success-light: #95de64;
    --color-success-hover: #73d13d;
    /* The header's "all systems operational" dot (I-051 AD-5, from Evidens I-041; F --ok): a mark, not text, so it keeps
       F's brighter green */
    --color-status-operational: var(--color-success-hover);
    --color-warning: #faad14;
    --color-warning-light: #ffc53d;
    /* A warning mark, not text (an icon and its tint — the notification row's .q-ic): F --warn (I-039 TASK_08) */
    --color-warning-mark: var(--color-warning-light);
    --color-error: #ff4d4f;
    --color-error-light: #ff7875;
    /* The error hue of a mark (F --err): the work queue's overdue / critical icon tiles and the critical status chip.
       Not text on its own tint like --color-error-light, so on light it keeps F's brighter red (CF-086 TASK_06) */
    --color-error-mark: var(--color-error-light);
    /* Info is neutral, not blue (I-036): information that needs no action (processing tags, info alerts, timeline
       heads) reads grey — prototype F --info */
    --color-info: #aab4c8;
    --color-info-light: #ccd2de;
    --color-info-hover: #bbc3d3;
    --color-info-rgb: 187, 195, 211;
    --color-info-bg: rgba(187, 195, 211, 0.15);
    --color-error-bg: rgba(var(--color-error-rgb), 0.15);
    --color-success-bg: rgba(var(--color-success-rgb), 0.15);
    --color-warning-bg: rgba(var(--color-warning-rgb), 0.15);
    --color-accent-purple: #722ed1;
    --color-accent-purple-light: #b37feb;
    --color-accent-purple-hover: #9254de;

    /* Subscription Tier Colors */
    --color-tier-starter: #60a5fa;
    --color-tier-starter-rgb: 96, 165, 250;
    --color-tier-pro: #a78bfa;
    --color-tier-pro-rgb: 167, 139, 250;
    --color-tier-starter-bg: rgba(96, 165, 250, 0.15);
    --color-tier-pro-bg: rgba(167, 139, 250, 0.15);

    /* Decorative Accents */
    --color-amber: #f5a623;
    --color-amber-rgb: 245, 166, 35;

    /* Indigo (Journal entry highlights) */
    --color-indigo: #6366f1;
    --color-indigo-rgb: 99, 102, 241;

    /* Accounting Semantics (financial ledger debit/credit) */
    --color-accounting-credit: #52c41a;
    --color-accounting-credit-rgb: 82, 196, 26;
    --color-accounting-debit: #ff4d4f;
    --color-accounting-debit-rgb: 255, 77, 79;

    /* Greyscale RGB triplets (used for rgba() translucent overlays) */
    --color-black-rgb: 0, 0, 0;
    --color-white-rgb: 255, 255, 255;
    --color-gray-rgb: 140, 140, 140;

    /* Semantic Status RGB triplets (translucent backgrounds, borders, glows) */
    --color-success-rgb: 82, 196, 26;
    --color-warning-rgb: 250, 173, 20;
    --color-error-rgb: 255, 77, 79;
    --color-info-hover-rgb: 187, 195, 211;
    --color-accent-purple-rgb: 114, 46, 209;

    /* Social Brand Colors */
    --color-social-twitter: #1da1f2;
    --color-social-linkedin: #0a66c2;
    --color-social-facebook: #4267b2;
    --color-social-whatsapp: #25d366;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;

    /* Typography — size scale (B-076: restored as it stood before 908d37673; titles keep the
       design.md type-scale tiers) */
    --font-size-xs:   0.75rem;      /* 12px — badge, tag, footnote */
    --font-size-xs2:  0.8125rem;    /* 13px — caption, small metadata */
    --font-size-sm:   0.875rem;     /* 14px — label, secondary body */
    --font-size-base: 0.9375rem;    /* 15px — primary body text */
    --font-size-md:   1rem;         /* 16px — medium emphasis */
    --font-size-lg:   1.125rem;     /* 18px — sub-heading, large label */
    --font-size-xl:   1.25rem;      /* 20px — section heading */
    --font-size-2xl:  1.5rem;       /* 24px — page sub-heading */
    /* Prototype F's caption tier (I-051, from Evidens I-041): table headers and the updated line, 12.5px */
    --font-size-caption: 0.78125rem;
    /* Body text and the caption tier — prototype F (Evidens I-041 Decision 9, ported by I-051 / I-048): body 15px / 1.5,
       set on body explicitly (the 16px root is unchanged; overrides.css); caption 12.5px (above) for the updated line
       and table headers. --font-size-body is the 15px --font-size-base step under its role name */
    --font-size-body: var(--font-size-base);
    --line-height-body: 1.5;

    /* Font weights: the shared pattern blocks (I-029 … I-036) read these */
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-md-sm: 0.75rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Borders */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Hover tint of a primary-tinted row (I-024 context chooser, I-025 command palette): one step above
       --color-primary-bg. Derived from the primary channel, so there is no light value. */
    --color-primary-bg-hover: rgba(var(--color-primary-rgb), 0.2);
    /* A selected record row (I-060, Evidens I-044 Decision 26 (e)): half of --color-primary-bg, so a translucent tag on
       the row keeps its contrast. Derived from the primary channel, so there is no light value. */
    --color-primary-bg-subtle: rgba(var(--color-primary-rgb), 0.07);

    /* Shell sizes (I-024): the labelled sidebar, its icon rail, and the labelled sidebar drawn over the content on
       narrow screens. Sizes, so there is no light value.
       --sider-width / --sider-rail-width MUST match MainLayout.SiderWidth / SiderRailWidth: AntDesign emits the
       sider width as an INLINE style, so these tokens only keep .content-layout's margin in step. Change both. */
    --sider-width: 248px;
    --sider-rail-width: 68px;
    --sider-overlay-width: min(280px, 88vw);
    /* The sidebar's muted labels — group headings, toggles, the back link (I-051 / I-048, from Evidens I-041; F
       --sider-muted .45): half-way between the .45 and .50 steps, the nearest value that keeps 11px text at 4.5 : 1 on
       the darkest sidebar ground */
    --color-nav-muted: color-mix(in srgb, var(--color-fg-45), var(--color-fg-50));

    /* Wizard and settings patterns (I-033): the wizard column, the settings tab nav and the capped settings content
       column. Sizes, so there is no light value. The wizard column is the Operans prototype's wizard screen: F's
       standard 1200px page (o.html .page), not F's 720px onboarding column (.wz), which no App wizard page uses
       (I-051 TASK_05, AD-1). */
    --wizard-column-width: var(--page-width-standard);
    --settings-nav-width: 208px;
    --settings-content-max: 720px;
    --settings-field-max: 360px;
}

/* Light theme structural values: only the tokens that change. Derived tokens (--gradient-bg, --color-fg-NN, the
   shadow scale) re-resolve from these. Every value used as text reaches 4.5 : 1 on the ground (#f3f4f7) and on
   raised surfaces (#eef0f4); measured values are in App/docs/infrastructure/design.md § Themes. */
:root[data-theme="light"] {
    --color-scheme: light;

    --shadow-inset-dark: rgba(16, 19, 26, 0.06);

    /* Ground, surfaces and raised surfaces */
    --color-bg-dark: #f3f4f7;
    --color-bg-dark-secondary: #ffffff;
    --color-bg-dark-tertiary: #eef0f4;
    --color-bg-elevated: #ffffff;
    /* Tables sit on white cards: the pinned cells take that surface, opaque */
    --table-pinned-bg: #ffffff;
    /* A black 0.55 shadow is a smear on white: the light edge shadow is the ink at 0.22 */
    --table-pin-shadow: rgba(16, 19, 26, 0.22);
    --color-on-error: #ffffff;
    --color-on-error-mark: #ffffff;

    /* A lighter scrim keeps the page legible behind a Modal / Drawer; a loading container is veiled in white */
    --overlay-mask: rgba(16, 19, 26, 0.42); /* F --mask (I-041 TASK_12; was .35) */
    --overlay-mask-soft: rgba(255, 255, 255, 0.6);
    /* White plate with the dark-alpha border and ink of the light foreground (a dark plate would need its own ink) */
    --surface-overlay-strong-rgb: 255, 255, 255;

    /* White panels on a white page: separated by their --glass-border / --color-fg-10 border plus a soft shadow */
    --shadow-panel: 0 8px 24px rgba(16, 19, 26, 0.12);
    --shadow-panel-soft: 0 8px 24px rgba(16, 19, 26, 0.12);
    --shadow-tooltip: 0 4px 12px rgba(16, 19, 26, 0.12);

    /* The primary itself is the text shade on light; its -light shade is the hover fill */
    --color-primary-text: var(--color-primary);
    --color-link-text: var(--color-primary-text);
    /* On light the primary reads 4.4 : 1 on a subtle ground (the context bar); halfway to its dark step it reads 4.9 : 1
       and sits at F's --accent-text (ΔE 0.9) — CF-099 F-b3-04 */
    --color-link-text-on-subtle: color-mix(in srgb, var(--color-primary) 50%, var(--color-primary-dark));
    --color-primary-text-strong: var(--color-primary-dark);
    --color-attention-text: var(--color-attention-light);

    --glass-bg-subtle: rgba(16, 19, 26, 0.03);
    --glass-bg: #ffffff;
    --glass-bg-light: rgba(16, 19, 26, 0.05);
    --glass-border: rgba(16, 19, 26, 0.1);
    --glass-border-light: rgba(16, 19, 26, 0.2);
    --control-border: rgba(16, 19, 26, 0.5);
    --control-bg: #ffffff;
    --color-solid: #ffffff;
    --color-solid-2: #f7f8fa;
    --switch-off: rgba(16, 19, 26, 0.3);
    --glass-shadow: rgba(16, 19, 26, 0.08);

    --text-primary: #10131a;
    --text-secondary: rgba(16, 19, 26, 0.76);
    /* F's .60 reads 4.49 : 1 on an unread notification card; .62 keeps 4.79 there and is within ΔE 2 of F (I-041) */
    --text-muted: rgba(16, 19, 26, 0.62);
    /* Decorative only (dividers, watermark glyphs): below text contrast on purpose */
    --text-faint: rgba(16, 19, 26, 0.4);

    --color-fg-rgb: 16, 19, 26;
    /* Tuned steps: 45 and 50 carry text (Steps / Empty descriptions, picker header and weekdays); at their dark alphas
       they read 3.2-3.5 : 1 on white, at these 4.7 : 1 on the ground */
    --color-fg-45: rgba(var(--color-fg-rgb), 0.6);
    --color-fg-50: rgba(var(--color-fg-rgb), 0.62);

    --color-bg-dark-secondary-rgb: 255, 255, 255;
    --color-success-rgb: 30, 110, 20;
    --color-warning-rgb: 134, 85, 0;
    --color-error-rgb: 184, 29, 40;
    /* Deliberately darker than --color-error-light: its only use is text at 0.8 alpha on the error tint (app.css alert description) */
    --color-error-light-rgb: 138, 26, 34;
    --color-info-base-rgb: 85, 96, 122;
    --color-info-hover-rgb: 76, 86, 110;
    --color-cyan: #0b6a80;
    --color-cyan-rgb: 11, 106, 128;
    --color-amber-rgb: 143, 91, 0;
    --color-tier-starter-rgb: 29, 78, 216;
    --color-tier-pro-rgb: 109, 40, 217;

    /* AntD preset tag text on its own 15 % tint */
    --color-tag-cyan-text: #00676e;
    --color-tag-magenta-text: #9e1068;
    --color-tag-lime-text: #456200;
    --color-tag-volcano-text: #a8350a;
    --color-tag-geekblue-text: #1d39c4;

    /* Status colours: on light the -light / -hover variants are dark shades, readable as text. The base values reach
       4.5 : 1 on their own 15 % tint over the ground, which is the tightest place a status tag puts them. */
    --color-success: #1e6e14;
    --color-success-light: #1a6312;
    --color-success-hover: #1c6614;
    /* A mark, not text: F's light --ok, 3 : 1 on the light header */
    --color-status-operational: #2b8a1c;
    --color-warning: #865500;
    --color-warning-light: #7a4e00;
    /* A mark, not text: F's light --warn, kept for icons (I-023 Decision 6 — the fill hues may keep the prototype
       values for icons and large text) */
    --color-warning-mark: #a66a00;
    --color-error: #b81d28;
    --color-error-light: #a8202a;
    /* A mark, not text: F's light --err — 4.3 : 1 as an icon on its 14 % tile, the critical chip's ink (68 % of it into
       the text colour) 5.8 : 1 on its tint */
    --color-error-mark: #cf222e;
    --color-info: #55607a;
    --color-info-light: #474f66;
    --color-info-hover: #4c566e;
    --color-info-rgb: 76, 86, 110;
    --color-info-bg: rgba(76, 86, 110, 0.15);
    --color-accent-purple-light: #5b21b6;
    --color-accent-purple-hover: #6425c0;

    --color-tier-starter: #1d4ed8;
    --color-tier-pro: #6d28d9;
    --color-tier-starter-bg: rgba(29, 78, 216, 0.15);
    --color-tier-pro-bg: rgba(109, 40, 217, 0.15);

    --color-amber: #8f5b00;

    /* Ledger credit / debit follow the success / error values they equal on dark */
    --color-accounting-credit: #1e6e14;
    --color-accounting-credit-rgb: 30, 110, 20;
    --color-accounting-debit: #b81d28;
    --color-accounting-debit-rgb: 184, 29, 40;
}

/* Global heading font — B-051 AD2. Uses the Typography tokens above (--font-display).
   AntD sets no heading font-family, so this rule can live here before ant-design-blazor.css. The type-scale title
   classes are listed too, so a non-heading element that should look like a title takes the display font from its class. */
h1, h2, h3, h4, h5, h6,
.page-title, .wizard-step__title, .section-title-sm, .dashboard-card-title, .form-section__title,
.detail-page-grid__side-title, .detail-tab-section__title {
    font-family: var(--font-display);
}

/* Type scale — B-051 AD3. One scale for every title class; pick the tier, never a new size.
   Values are prototype F's (Evidens I-041 Decision 9: .page-hd, th, body; ported by I-051 / I-048).
   Tier             Size / weight     Classes
   page title       1.75rem / 700     .page-title — display font, -0.01em (1.5rem at <=640px, F); count: .page-title__count
   page subtitle    0.9375rem / 400   .page-subtitle (--text-secondary), 4px under the title
   body             0.9375rem / 1.5   body (--font-size-body, --line-height-body; overrides.css). AntD controls, tables
                                      and the menu keep their own 14px, as F does
   table header     0.78125rem / 600  .ant-table-thead > tr > th (--font-size-caption) — sentence case, no tracking
   updated line     0.78125rem / 400  .last-updated-text (--font-size-caption, --text-muted, tabular numbers)
   step title       1.375rem / 700    .wizard-step__title — display font, -0.01em (F .wz-hd h2; I-047 TASK_06 fidelity)
   card title       1.125rem / 600    .section-title-sm, .dashboard-card-title, .detail-tab-section__title (I-060)
   sub-block title  1rem / 600        .section-title, .form-section__title, .detail-page-grid__side-title, a sub-section's
                                      .detail-tab-section__title (I-060)
   eyebrow          0.75rem / 600     .section-title-xs, .eyebrow — uppercase, 0.08em, --font-body, --text-secondary
                                      (prototype F .eyebrow; a label over a group, not a heading size) */


html {
    height: 100%;
    color-scheme: var(--color-scheme);
    background: var(--color-bg-dark);
    overflow: hidden;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* The dark island re-declares the tokens, but color and color-scheme were already computed on html / body with the
   page theme's values and are inherited as such: consume the island's own values here, so plain text and native
   controls (scrollbars, form widgets) inside it are dark too. */
.theme-dark-island {
    color: var(--text-primary);
    color-scheme: var(--color-scheme);
}

/* Global Icon Color Default — TASK_04 systemic fix.
   AntDesign icons (.anticon), raw <svg>, and Material icons inherit currentColor
   so any element rendered outside an AntDesign component class chain still gets
   on-brand color (driven by body's --text-primary). Component-specific overrides
   in overrides.css (e.g., button-primary, message-success, menu-selected) remain
   authoritative — they win on specificity. */
.anticon,
.material-icons {
    color: currentColor;
}

svg:not(:root) {
    fill: currentColor;
}

/* Skip-to-Content Link (Accessibility) */
.skip-to-content,
.main-sider-close {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    z-index: 9999;
}

.skip-to-content:focus,
.main-sider-close:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    z-index: 9999;
    outline: 2px solid var(--text-primary);
}

/* The overlay sidebar's close control (I-024): a button, so it takes the page's font and the pointer */
.main-sider-close {
    font-family: inherit;
    cursor: pointer;
}

.main-sider-close:focus {
    margin: 0;
    clip: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#app {
    height: 100%;
    background: transparent;
    overflow: hidden;
}

/* Auth layout fix - ensure full height flex container */
.auth-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

h1:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-error);
}

.validation-message {
    color: var(--color-error-light);
}

#blazor-error-ui {
    color-scheme: light only;
    background: var(--color-error-ui-bg);
    color: var(--color-on-error-ui);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(var(--color-shadow-rgb), 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* The Reload link sits on the same light strip: the fixed ink, underlined, not the primary link colour */
#blazor-error-ui a {
    color: var(--color-on-error-ui);
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, var(--color-error-boundary);
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--color-on-error-boundary);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ========================================
   Theme image swap (I-045)
   A theme-dependent image is rendered twice: the -on-dark copy (white artwork) and the -on-light copy (ink
   artwork). data-theme is set by the boot script before the first paint, so this also works on the
   pre-Blazor loading screen. Only the inactive copy is hidden, so the visible one keeps its own display value.
   ======================================== */

:root:not([data-theme="light"]) .theme-img--on-light {
    display: none;
}

:root[data-theme="light"] .theme-img--on-dark {
    display: none;
}

/* ========================================
   App Loading Screen
   ======================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 20% 0%, rgba(var(--color-primary-rgb), 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-dark-secondary) 100%);
    font-family: var(--font-body);
}

.loading-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 56px;
    height: 56px;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(var(--color-primary-rgb), 0.5));
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(var(--color-primary-rgb), 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(var(--color-primary-rgb), 0.7));
    }
}

.loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loading-ring-track {
    fill: none;
    stroke: var(--color-fg-08);
    stroke-width: 3;
}

.loading-ring-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: calc(3.141 * 92 * var(--blazor-load-percentage, 0) / 100), 500;
    transition: stroke-dasharray 0.15s ease-out;
    filter: drop-shadow(0 0 6px rgba(var(--color-primary-rgb), 0.6));
    animation: ringGlow 2s ease-in-out infinite;
}

@keyframes ringGlow {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(var(--color-primary-rgb), 0.6));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(var(--color-primary-rgb), 0.8));
    }
}

.loading-text {
    margin-top: 24px;
    color: var(--color-fg-70);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

code {
    color: var(--color-primary-text);
}

/* ========================================
   AntDesign Global Theme Overrides
   For Auth Pages (Dark Theme)
   ======================================== */

/* Auth page specific - Language Picker Select (the header's picker only: the Register card's language Select is a
   form field and takes the App's form select, F .sel — I-039 TASK_06) */
.auth-page .auth-header .ant-select {
    min-width: 130px;
}

.auth-page .auth-header .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;
    transition: all var(--transition-base) !important;
    height: 36px !important;
}

.auth-page .auth-header .ant-select-arrow {
    color: var(--text-muted) !important;
}

.auth-page .auth-header .ant-select:hover .ant-select-selector {
    border-color: var(--glass-border-light) !important;
}

.auth-page .auth-header .ant-select-focused .ant-select-selector {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.auth-page .auth-header .ant-select-selection-item {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

/* Select dropdown panel and its options: overrides.css § Dropdown Overrides (I-023, I-036) */

/* ========================================
   Main Layout Global Overrides
   ======================================== */

/* Language Picker in Main Header */
.main-layout .main-header .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;
    height: 36px !important;
}

.main-layout .main-header .ant-select-arrow {
    color: var(--text-muted) !important;
}

.main-layout .main-header .ant-select:hover .ant-select-selector {
    border-color: var(--glass-border-light) !important;
}

.main-layout .main-header .ant-select-focused .ant-select-selector {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px var(--color-primary-glow) !important;
}

.main-layout .main-header .ant-select-selection-item {
    color: var(--text-secondary) !important;
}

/* Select clear button and arrow visibility: overrides.css § Dropdown Overrides */

/* Search (AntD <Search>, README Decision 5: the markup stays — the input, then its addon button, 8px apart). The one
   Search block (I-036 merged the second, later copy into it): the input is the control recipe of overrides.css
   (38px, radius 12, all four borders); the addon button is at least a 38px square with the same corners and the glass
   surface of a default button. */
.ant-input-group-wrapper.ant-input-search {
    display: inline-table !important;
    width: auto !important;
}

.ant-input-search .ant-input-wrapper.ant-input-group {
    display: table !important;
    width: auto !important;
}

.ant-input-search .ant-input {
    display: table-cell !important;
    border-radius: var(--radius-md) !important;
}

.ant-input-search .ant-input-group-addon {
    display: table-cell !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    width: 1px !important;
    vertical-align: middle !important;
}

.ant-input-search .ant-input-group-addon .ant-btn,
.ant-input-search .ant-input-search-button,
.ant-input-search .ant-btn.ant-btn-icon-only,
.ant-input-search .ant-btn-primary.ant-input-search-button,
.ant-input-search .ant-input-group-addon .ant-btn.ant-btn-icon-only.ant-input-search-button {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border-light) !important;
    box-shadow: none !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
    margin-left: 8px !important;
    min-width: 38px !important;
    height: 38px !important;
}

/* The button follows the input's size (sm: AntD's 24px, lg: the 48px of .ant-input-lg); min-width keeps an icon
   button square and lets an EnterButton text widen it */
.ant-input-search.ant-input-search-small .ant-input-group-addon .ant-btn.ant-input-search-button {
    min-width: 24px !important;
    height: 24px !important;
}

.ant-input-search.ant-input-search-large .ant-input-group-addon .ant-btn.ant-input-search-button {
    min-width: 48px !important;
    height: 48px !important;
}

.ant-input-search .ant-input-group-addon .ant-btn:hover,
.ant-input-search .ant-input-search-button:hover,
.ant-input-search .ant-btn.ant-btn-icon-only:hover,
.ant-input-search .ant-btn-primary.ant-input-search-button:hover {
    background: var(--glass-bg) !important;
    border-color: var(--color-primary-light) !important;
    color: var(--color-primary-text) !important;
    transform: none !important;
}

.ant-input-search .ant-input-search-button .anticon {
    color: inherit !important;
}

/* Spin and Message: every rule lives in overrides.css (I-036 — F .spin ring, F .ev-toast) */

/* Sidebar navigation: every rule of the selected item (ground, text, icon, no AntDesign right border) lives in
   overrides.css under .mlekerp-menu — one source since I-041 (ported by I-048) */

/* 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 {
    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(--text-secondary) !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(--text-secondary) !important;
}

/* ========================================
   Sidebar Menu Collapsed State
   ======================================== */

.ant-menu-inline-collapsed .ant-menu-item {
    padding: 0 !important;
    text-align: center !important;
}

.ant-menu-inline-collapsed .ant-menu-item .ant-menu-title-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

.ant-menu-inline-collapsed .ant-menu-item .ant-menu-title-content a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Hide text labels when sidebar is collapsed */
.ant-menu-inline-collapsed .ant-menu-item .ant-menu-title-content a span:not(.anticon) {
    display: none !important;
}

/* ========================================
   Native File Input Override
   Hide native browser file input styling.

   The default is invisible AND zero-sized: a bare <input type="file"> is driven
   by its `<label for>` (or set programmatically) and must never paint over
   anything. F-189: this rule used to stretch every file input to 100%/100% with
   `!important`, so an input whose wrapper was not a positioning context spread
   across the nearest positioned ancestor — or, with none, the viewport — and
   swallowed clicks on unrelated controls. That is what made the Branding
   "Remove" button unclickable once `.image-upload-field__preview` was deleted.

   A component that wants click-anywhere-on-the-wrapper opts in explicitly, and
   only ever against its own `position: relative` wrapper: `.upload-dropzone`
   below, `.image-upload-field__preview` (Image Upload Field molecule), and the
   Support pages' `.upload-area` / `.upload-area-small` (B-028: their dead scoped
   `.file-input` copies were removed; this global overlay is the only rule).
   ======================================== */

input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
}

/* Opt-in overlay — every wrapper listed here is `position: relative`, so the
   input can only ever cover that wrapper, making the whole zone a picker click
   target. These live globally rather than in the pages' scoped CSS on purpose:
   Blazor puts the `b-xxxxx` scope attribute on the wrapper `<div>` but NOT on
   the `<input>` that the `<InputFile>` *component* renders, so a page's
   scoped `.file-input` rule never matches it. Anything added here must
   name a wrapper that is positioned. */
.upload-dropzone > input[type="file"],
.upload-area > input[type="file"],
.upload-area-small > input[type="file"] {
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Hide native button text completely */
input[type="file"]::-webkit-file-upload-button {
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

input[type="file"]::file-selector-button {
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* ========================================
   File Upload Drop-Zone (global utilities)
   Promoted from UploadObrazlozenjeModal scoped CSS so modal-page surfaces
   (F-176: no scoped CSS on layout patterns) can compose a file picker.
   The .file-input absolutely fills its position:relative .upload-area so
   the invisible native input overlays only the drop zone, not the footer.
   ======================================== */

/* Prototype F .updrop (I-036): 1.5px dashed --glass-border-light, radius 12, at least 124px, padding 16,
   no fill; a 26px muted icon over 13.5px secondary text. */
.upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 124px;
    border: 1.5px dashed var(--glass-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    background: transparent;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.upload-area:hover {
    border-color: var(--color-primary-light);
}

/* Drag-active state — apply .upload-area--drag-over while a file is dragged over the zone (the Documents
   upload page, showcase #upload-area): a SOLID primary border on the primary tint, the icon in the accent text. */
.upload-area--drag-over {
    border-style: solid;
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
}

.upload-area--drag-over .upload-label {
    color: var(--text-primary);
}

.upload-area--drag-over .upload-label > .anticon:first-child {
    color: var(--color-primary-text);
}

/* Keyboard focus ring: the invisible native input takes focus, so ring the zone (I-015).
   :focus-visible keeps the ring off after a mouse click once the file dialog closes. */
.upload-area:has(input[type="file"]:focus-visible) {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.upload-area input[type="file"]:disabled {
    cursor: not-allowed !important;
}

.upload-area .file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.84375rem;
    text-align: center;
    cursor: pointer;
    pointer-events: none;
}

.upload-label > .anticon:first-child {
    font-size: 1.625rem;
    color: var(--text-muted);
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.78125rem;
}

/* ========================================
   Page Layout Utility Classes
   Standardized page widths and layouts
   ======================================== */

/* Page Width Variables (structural, derived only: the light theme needs no second rule here) */
:root, .theme-dark-island {
    --page-width-narrow: 800px;
    /* Page caps (F .page / .page--wide, Evidens I-041 Decision 10): the content column is capped, and centred only
       beyond the cap. Evidens' rule is "1200px unless F's screen draws the page in .page--wide (1360px)" — its tokens
       are default 1200 / wide 1360 because F draws most Evidens pages in .page. The Operans prototype draws home, the
       lists, the overviews, stock, the documents and the workbenches in .page--wide (o.html 3866–3911, 4518–6362) and
       only the settings pages and the wizard in .page, so the same rule yields Operans' mapping: the default and the
       wide container are one width (1360px), --page-width-standard is the 1200px .page (I-051 AD-1 / AD-1a, I-048
       PLAN Overlap 4); a narrow page type keeps --page-width-narrow */
    --page-width-default: 1360px;
    --page-width-wide: 1360px;
    --page-width-standard: 1200px;
    --page-width-portal: var(--page-width-standard); /* I-039 Decision 7: F's `clients` list model is the 1200 page (I-049 Overlap 1) */

    /* The MainLayout content's gutters, prototype F .content (I-051 AD-1, Evidens I-041 Decision 10): 24px inline,
       28 / 40px block (16 / 20 / 32 at 640px and narrower, below). A sticky element in the content scroller sticks
       inside this padding, so a bar pinned to the scroller's edge offsets by it (.main-content .form-actions-footer,
       .main-content .detail-page-grid__side — scoped, so modals and drawers keep their own offsets) */
    --content-padding-inline: 24px;
    --content-padding-block-start: 28px;
    --content-padding-block-end: 40px;

    /* Shadow scale — replaces inline box-shadow values across the project.
       *-primary-* use the brand glow; non-primary use the neutral glass shadow. */
    --shadow-sm: 0 2px 4px var(--glass-shadow);
    --shadow-md: 0 4px 12px var(--glass-shadow);
    --shadow-lg: 0 8px 24px var(--glass-shadow);
    --shadow-xl: 0 16px 48px var(--glass-shadow);
    --shadow-primary-md: 0 4px 14px var(--color-primary-glow);
    --shadow-primary-lg: 0 8px 24px var(--color-primary-glow);
    --shadow-inset-subtle: inset 0 1px 0 var(--color-fg-06);

    /* Form-drawer widths — consumed by EntityFormDrawer (TASK_06). */
    --form-drawer-width: 480px;
    --form-drawer-width-wide: 640px;
}

/* Prototype F ≤ 640: 16px gutters, 20 / 32px above and below the page */
@media (max-width: 640px) {
    :root, .theme-dark-island {
        --content-padding-inline: 16px;
        --content-padding-block-start: 20px;
        --content-padding-block-end: 32px;
    }
}

/* Page Wrapper - Base page styling */
.page-wrapper {
    min-height: calc(100vh - 56px); /* viewport - header (the shell has no footer, I-051 AD-3) */
    padding: var(--space-xl);
    background: transparent;
    /* F-176: promoted from per-page scoped CSS. Every .page-wrapper now animates
       in once globally; design-lint Rule 4 is satisfied by this single declaration
       so individual .razor.css files no longer need to repeat it. */
    animation: pageSlideUp 0.4s ease-out;
}

/* In MainLayout the content area carries F's gutters (MainLayout.razor.css .main-content), so the page adds none at
   any width (I-051 AD-1); it still fills the area — by growing in the content wrapper's flex column (.content-wrapper
   is flex: 1, column; .page-refresh-scope has no box), not by a viewport formula: `100vh - 56px - gutters` ignores a
   bar above the scroller — the overview pages' EntityContextBar (CF-087 AD-9) — so such a page overflowed the scroller
   by the bar's height and a fitted heavy-data region could never end inside it (Evidens I-041 merge gate, PR !708
   #11136; I-048 PLAN Overlap 5). Other layouts keep the padding above */
.main-content .page-wrapper {
    min-height: 0;
    flex: 1 0 auto;
    padding: 0;
}

/* A status-result page under AuthLayout (AccessBlocked, Impersonate, ImpersonationEnded) is the auth card's body: the card
   draws the frame and its own 28 / 30 padding, so the page adds no viewport height and no padding of its own (CF-099
   F-b18-03 — the card ran to the viewport's height and padded 32px inside its own) */
.auth-card .page-wrapper {
    min-height: 0;
    padding: 0;
}

/* Page Container - Default width */
.page-container {
    position: relative; /* For DevPathBadge positioning */
    max-width: var(--page-width-default);
    margin: 0 auto;
    width: 100%;
}

/* Page Container Variants */
.page-container--narrow {
    max-width: var(--page-width-narrow);
}

.page-container--wide {
    max-width: var(--page-width-wide);
}

.page-container--standard {
    max-width: var(--page-width-standard);
}

.page-container--portal {
    max-width: var(--page-width-portal);
}

.page-container--full {
    max-width: 100%;
}

/* Vertical rhythm — uniform gap between top-level page-container children.
   The `:not(style):not(.dev-path-badge)` exclusions are critical: scoped-style
   components inject a <style> sibling that would otherwise trip the owl, and
   the absolutely-positioned DevPathBadge would distort the owl chain. */
.page-container > :not(style):not(.dev-path-badge) + :not(style):not(.dev-path-badge) {
    margin-top: var(--space-lg);
}

/* A stack of sibling blocks (cards, a filter card, alerts, summary rows) inside a tab or a component wrapper the
   .page-container owl does not reach: the page rhythm as the gap, the children's own block margins dropped so the gap
   is the only space (I-060, Evidens I-044 README Decision 22 — a tab's day cards sat flush, VR4). */
.card-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.card-stack > * {
    margin-block: 0;
}

/* Page Header — prototype F .page-hd (I-051 AD-2): plain, no card. Title (+ optional tag) and subtitle on the left,
   the actions on the right; the page's 24px rhythm below it */
.page-header {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: var(--space-lg);
    animation: pageSlideUp 0.4s ease-out;
}

/* Page Header - Simple style (no card). Kept (CF-099 TASK_52): the shared PageHeader renders it, and the Dev playgrounds. */
.page-header--simple {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: var(--space-xl);
    animation: pageFadeIn 0.5s ease-out;
}

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em; /* F .page-hd h1 */
    margin: 0;
    overflow-wrap: anywhere; /* B-009: one long word cannot force header overflow at 390-480px */
}

/* Count inside a page title (B-051 AD3) — muted body text, read as part of the heading:
   <h1 class="page-title" aria-label="Title">Title <span class="page-title__count">128</span></h1>
   (aria-label keeps the heading's accessible name the bare title) */
.page-title__count {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: var(--space-sm);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

/* Page Subtitle — F .page-hd p: body text, 4px under the title */
.page-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: var(--space-xs) 0 0;
}

/* Section title — heading row inside form sections or glass-cards (icon + text).
   Defined globally so it applies inside portaled drawer/modal content where
   scoped CSS attributes (b-XXXX) don't reach. Pages may extend with their own
   `.section-title--variant` modifier classes.
   CF-099 TASK_52: kept — EfaktureSubmissionHistoryCard, KarticaLotaReport and the Dev playgrounds render it. */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 var(--space-md);
}

.section-title--with-icon {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Subsection titles + body copy — sit inside a .glass-card (settings, detail,
   drawers, audit-log details). F-176: promoted from playground scoped CSS. */
.section-title-sm {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs);
}

/* Eyebrow tier (I-036, prototype F .eyebrow): the body face, uppercase and tracked. It is set here and not by the heading
   rule above, because the tier is a label, not a display title — an h4 carrying it still reads as the eyebrow. */
.section-title-xs,
.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.section-title-xs {
    margin: var(--space-md) 0 var(--space-xs);
}

.section-copy {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0 0 var(--space-md);
}

.section-copy code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-primary);
}

/* Page Header with Actions (flex layout) — F .page-hd: 16px apart, the actions on the title block's bottom line.
   Kept (CF-099 TASK_52): the shared PageHeader, the list pages' headers (ListPageHeaderTests) and the Dev playgrounds. */
.page-header--with-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-md);
    flex-wrap: wrap; /* B-028 (1357): the actions drop under the title before the title is squeezed */
}

/* B-028 (1357) + B-008 (2641): the title column is content-sized, so a short title keeps its actions on
   its row; when title + actions do not fit, the actions wrap onto their own line instead of the title
   breaking mid-word (a flex item never shrinks below its basis while it shares a line). A fixed 16rem
   basis (or a 16rem min-width, which clamps the same hypothetical size) pushed the actions down even
   for a short title. */
.page-header--with-actions .page-header__content {
    flex: 1 1 auto;
}

/* B-008 (2641): the subtitle adds no intrinsic width, so the title alone decides whether the actions fit
   beside it and a long subtitle wraps inside the title column instead of pushing the actions down.
   Above 768px only — in the mobile column the content is sized to its text, which this would collapse. */
@media (min-width: 768.02px) {
    .page-header--with-actions .page-header__content > .page-subtitle {
        contain: inline-size;
    }
}

/* B-028 (1357): wrapped actions stay right-aligned under the title */
.page-header--with-actions .page-header__actions {
    margin-left: auto;
}

/* B-009: standalone so it applies with or without --with-actions; without it a flex
   child's default min-width:auto lets a long title push past its container at 391-480px */
.page-header__content {
    min-width: 0;
}

/* Page Title Row — F .page-hd h1: the title and an optional tag, 12px apart (I-051 AD-2: no help bubble here) */
.page-header__title-row {
    display: flex;
    align-items: center;
    gap: var(--space-md-sm);
    flex-wrap: wrap; /* B-009: title + tag wrap instead of overflowing at 391-480px */
}

/* Form Item with Help (for inline help popovers) */
.form-item-with-help {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Form row — 2-column split that stacks at narrow widths.
   F-176: promoted from FormPlayground.razor.css `.form-playground__row`. Two equal fields whatever they hold (the
   prototype's .frow--half): a bare 1fr track grows to its content's min width, so a long selected option (CF-118's
   "E — oslobođeno bez prava na odbitak") widened its half; minmax(0, 1fr) lets the select ellipsize instead. */
.form-row--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-md);
}

@media (max-width: 576px) {
    .form-row--split {
        grid-template-columns: 1fr;
    }
}

/* CF-088: a short code before a long name (the prototype's .frow--short-first: 150px, then the rest). Modifier of
   .form-row--split, so it stacks at the same breakpoint. */
.form-row--split.form-row--short-first {
    grid-template-columns: 150px minmax(0, 1fr);
}

@media (max-width: 576px) {
    .form-row--split.form-row--short-first {
        grid-template-columns: 1fr;
    }
}

/* A split row of modal-body fields (.ds-tpl-form-field) is one field of the stack: its cells keep no margin of their
   own and the row carries the stack's spacing. With the field's :last-child reset the second cell touched the next
   field once the row stacked, and the first cell's margin doubled the gap above it (I-060, Evidens I-044 README
   Decision 20). */
.form-row--split > .ds-tpl-form-field {
    margin-bottom: 0;
}

.form-row--split:has(> .ds-tpl-form-field) {
    margin-bottom: var(--space-md);
}

.form-row--split:has(> .ds-tpl-form-field):last-child {
    margin-bottom: 0;
}

/* The same row of AntD form items (a drawer / modal / settings form): each cell keeps the form item's own rhythm (1.25rem,
   2rem while it shows a message), so a stacked row spaces its cells like any two fields. overrides.css's
   `.ant-form-item:last-child { margin-bottom: 0 }` zeroed the second cell — the row's last child — so once the row stacked
   (<= 576px) its input touched the next field's label while the first cell's margin and the row gap doubled the space
   above it (CF-099 F-b5-13). Only the last row of its container keeps no space under its last cell. Three classes beat
   the AntD sheet, which loads after app.css. */
.form-row--split:not(:last-child) > .ant-form-item.ant-form-item:last-child {
    margin-bottom: 1.25rem;
}

.form-row--split:not(:last-child) > .ant-form-item.ant-form-item-with-help:last-child {
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    /* stacked, the cells' own margins are the rhythm — no row gap on top of them */
    .form-row--split:has(> .ant-form-item) {
        row-gap: 0;
    }
}

/* --- Layout utilities (B-008 / I-006) --- */

/* Form grid — multi-column fields / document header. Auto-fit by default; --2/--3/--4 fix the count,
   --3/--4 drop to 2 columns at <=992px and every variant stacks at <=576px. */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
    gap: var(--space-md) var(--space-lg);
}

.form-grid > * {
    min-width: 0;
}

.form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid__full {
    grid-column: 1 / -1;
}

@media (max-width: 992px) {
    .form-grid--3,
    .form-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .form-grid,
    .form-grid--2,
    .form-grid--3,
    .form-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* A field showing a validation message: AntD's explain row (24px) is pulled back into the item margin
   (-20px offset), so the default 20px margin leaves -4px and the message touches the next label.
   Keep the margin above the explain height (auth/register, settings, modals).
   Deliberately GLOBAL (B-055 run 7): ~38 of the 40 FormItem pages rely on it as the AntD help-row overlap fix,
   so scoping it would re-break them. It only applies while a message is shown; no page was found visibly
   broken by it. Do not add per-page margin overrides for items showing a message. */
.ant-form-item.ant-form-item-with-help {
    margin-bottom: 2rem;
}

/* Form stack — vertical field rhythm; the gap spaces the fields. Two classes on the AntD reset,
   because app.css loads before the AntD sheet. */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-stack--tight {
    gap: var(--space-sm);
}

.form-stack > .ant-form-item.ant-form-item {
    margin-bottom: 0;
}

/* The hand-built field (.form-field, label + control + hint) in the stack: the stack's gap is its rhythm too, as for the
   AntD form item above — its own block-flow margin doubled the space between two fields to 32px in every modal-page
   body that stacks them (I-060, Evidens I-044 README Decision 27; the .settings-section twin of B-009). */
.form-stack > .form-field {
    margin-bottom: 0;
}

/* The same field as a cell of a .form-grid: the grid's row gap is its rhythm. A grid item's margin does not collapse, so
   each row of fields sat 32px under the one above (16px gap + 16px margin) and the last row kept 16px under the grid
   (I-060, Evidens I-044 README Decision 28 — a modal body and a settings form with a field grid). */
.form-grid > .form-field {
    margin-bottom: 0;
}

/* AntD offsets each item's 24px bottom margin with a -24px "margin-offset" sibling so help text can hang
   below the item. The stack zeroes that margin, so the offset must go too or the help text overlaps the
   next field's label. */
.form-stack > .ant-form-item .ant-form-item-margin-offset.ant-form-item-margin-offset {
    margin-bottom: 0;
}

/* Form section — a group inside ONE .glass-card, separated by a divider. Not a surface (B-008):
   no background, backdrop-filter, radius or shadow — never a card in a card. */
.form-section {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

.form-section:first-child {
    padding-top: 0;
    border-top: none;
}

/* Any sibling before a section (another section, a .form-grid document header) is spaced off its divider. */
* + .form-section {
    margin-top: var(--space-lg);
}

.form-section__title {
    margin: 0 0 var(--space-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-section__description {
    margin: calc(-1 * var(--space-sm)) 0 var(--space-md);
    color: var(--text-muted);
}

/* Full-width InputNumber — AntD sizes it to 90px. Two classes, because app.css loads before the AntD sheet.
   B-006: replaces the inline `Style="width: 100%"` in the drawer seed. */
.ant-input-number.input-number--block {
    width: 100%;
}

/* Page Animations */
@keyframes pageSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Glass Card Utility
   Reusable glassmorphism card pattern.
   Apply .glass-card to any container element.
   ======================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    padding: var(--space-lg, 1.5rem);
}

.glass-card-hover {
    transition: all var(--transition-fast);
}

.glass-card-hover:hover {
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(var(--color-shadow-rgb), 0.3);
}

/* ========================================
   Page Layout Templates
   Composable layout primitives used by the
   Detail, Form, and Settings page templates.
   See `/design-system#detail-page-template`,
   `/design-system#form-page-template`,
   `/design-system#settings-page-template`.
   ======================================== */

/* Detail page — two-column grid (main + side panel). Legacy: no detail page renders it since CF-099 (b1 / b3 / b4);
   kept for its one user, the audit-log playground (AuditLogPlayground.razor; __side-title: DesignSystem.razor). */
.detail-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-lg);
    align-items: start;
}

/* B-007: __main stacks its cards with the same gap as __side (.glass-card has no margin). */
.detail-page-grid__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* B-007: one-column detail page — __main only, no side column. */
.detail-page-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.detail-page-grid__side {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: var(--space-lg);
    align-self: start;
}

/* In the MainLayout content scroller: --space-lg below the scroller's top edge, not below its 28px gutter (I-041,
   ported by I-048). Scoped to .main-content so the panel keeps top: --space-lg in any other scroll container (a modal,
   a drawer — they have no such gutter; PR !708 #11138) */
.main-content .detail-page-grid__side {
    top: calc(var(--space-lg) - var(--content-padding-block-start));
}

/* Sub-block title inside .detail-page-grid__side panels.
   F-176: promoted from DetailPlayground.razor.css `.detail-playground__side-title`. */
.detail-page-grid__side-title {
    margin: 0 0 var(--space-md) 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    /* B-007: minmax(0, 1fr), not 1fr — wide content (tables, code) must not overflow the track. */
    .detail-page-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-page-grid__side {
        position: static;
    }
}

/* Empty-state title — heading inside `.empty-state` blocks across list/report pages.
   Defined globally because AntDesign Typography sets a default dark color on h3,
   which causes the heading to render invisible on the dark theme when the page's
   scoped CSS doesn't apply (e.g., inside portaled drawer/modal content, or when
   the rule was simply never added per-page). */
.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Form helper text — short caption under a field describing constraints or hints.
   Defined globally because AntDesign Drawer portals form content out of the
   component subtree, where scoped CSS attributes (b-XXXX) don't reach. */
.form-helper-text {
    margin-top: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* A read-only value in a form row (a last-sync time, a "subscribed through" date): the form's text, on the field's
   line — it had no rule and kept a dark default on the dark card, 1.19 : 1 (CF-099 F-b1-02) */
.form-readonly-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.6;
}

/* CF-011 — Unlock modal body. Defined globally because AntDesign Modal
   portals its content out of the component subtree (scoped CSS attributes
   don't reach). Lives here so that when UnlockModal gets wired into a
   document-detail page, the body renders with the correct dark-theme tokens. */
.unlock-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.unlock-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* CF-011 — Edit-justification modal body. Same portal reasoning as above. */
.edit-justification-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.edit-justification-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.edit-justification-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.edit-justification-label {
    font-weight: 500;
    font-size: 0.875rem;
}

.edit-justification-counter {
    align-self: flex-end;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* CF-044 — Generic modal form utilities. Defined globally because AntDesign Modal
   portals its content out of the component subtree (scoped CSS attributes don't reach).
   Used by session open/close/reopen modals and transfer modals. F-176: modal-page
   pattern has scoped_css_allowed: none. */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.modal-intro {
    color: var(--text-muted);
    margin: 0;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Input paired with an adjacent action button (e.g. PIB registry lookup). F-120. */
.input-with-action {
    display: flex;
    gap: var(--space-sm);
}

.form-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Form page — actions footer (becomes sticky-bottom on mobile) */
.form-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 480px) {
    .form-actions-footer {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: column-reverse;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid var(--glass-border);
        margin-top: var(--space-md);
        padding: var(--space-md);
        z-index: 5;
    }

    /* In the MainLayout content scroller: on the scroller's bottom edge, over its 40px gutter (I-041, ported by
       I-048). Scoped to .main-content so a footer in a modal or drawer (EntityFormDrawer — no such gutter) stays
       flush at bottom: 0 instead of pinning 40px below its visible edge (PR !708 #11138) */
    .main-content .form-actions-footer {
        bottom: calc(-1 * var(--content-padding-block-end));
    }

    .form-actions-footer .ant-btn {
        width: 100%;
    }
}

/* Settings section — vertical stack of labelled fields inside a settings tab.
   F-176: promoted from SettingsPlayground.razor.css; the existing chained
   selector below (`.settings-tabs-layout .settings-section + .settings-section`)
   previously assumed this block existed but never defined the base. */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.settings-section__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-sm);
    gap: var(--space-sm); /* B-009: buttons touched with no gap */
}

/* `.settings-section-actions` (hyphenated) is the catalog-required, production class name
   (Settings, Subscription, showcase) — `.settings-section__actions` above is the BEM name the Dev
   Playground uses. Defined only here; no margin-top, since pages manage their own spacing above the row. */
.settings-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* B-008 (2618, 2640): opt-in modifier - the action row stacks its buttons full-width at <=480px (Settings,
   Subscription, the showcase seeds). Global because the buttons are AntD child components, which a page's
   scoped CSS cannot reach without a (lint-banned) ::deep .ant-btn. A direct child that wraps a button (the
   Cancel trigger's focus-return span) stacks too, together with the button inside it. */
@media (max-width: 480px) {
    .settings-section-actions--stack-mobile > .ant-btn,
    .settings-section-actions--stack-mobile > :has(> .ant-btn),
    .settings-section-actions--stack-mobile > :has(> .ant-btn) > .ant-btn {
        width: 100%;
    }
}

/* B-008 (back-port pisarcheon I-006): intro row of a tab whose page owns the header. */
.tab-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.tab-intro__text {
    margin: 0;
    color: var(--text-muted);
}

/* B-008 (back-port pisarcheon B-027): a card title row (h3 + action) reuses .tab-intro; the row owns the bottom spacing. */
.tab-intro > .detail-page-grid__side-title {
    margin: 0;
}

/* Settings page — tabbed layout container */
.settings-tabs-layout {
    padding: var(--space-md) var(--space-lg);
}

.settings-tabs-layout .settings-section + .settings-section {
    margin-top: var(--space-lg);
}

/* A table in a settings section (a tab of a card — I-060, Evidens I-044 Decision 32): no second glass surface (VR1) —
   the table card is a hairline frame around the unbordered table and its pager row, clipped to its radius. */
.settings-section > .table-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ========================================
   Specialized Page Templates
   Dashboard, Pricing, Status Result,
   Notification Feed, Wizard. Heavy Data
   reuses .glass-card + filter-card.
   See `/design-system#dashboard-template`
   ... `/design-system#wizard-template`.
   ======================================== */

/* --- Dashboard --- */

/* Stat card — global so every dashboard / overview / summary page can use it.
   Promoted from DesignSystem.razor.css (F-174). Composition:
   .stat-card[.stat-card--clickable] > .stat-icon.stat-icon--<variant> + .stat-value + .stat-label
   (.stat-trend.stat-trend--up|--down optional).
   I-036: prototype F's `.scard` — a 40px icon tile beside the value (22px / 700) over a sentence-case label
   (12.5px secondary), padding 14, radius 12. A card without an icon is the same column without the tile (F's
   `.scards--tight`); a compact card without an icon keeps its inline label / value flow (B-008). The tile layout
   is CSS only: the parts stay siblings in their markup order. */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.stat-card:not(.stat-card--compact),
.stat-card:has(> .stat-icon) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: 2px 12px;
}

.stat-card:has(> .stat-icon) {
    grid-template-columns: 40px minmax(0, 1fr);
}

.stat-card > .stat-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.stat-card:has(> .stat-icon) > :not(.stat-icon) {
    grid-column: 2;
}

/* B-009: only a clickable card lifts. A static card lifting 2px under the pointer read as a layout
   jump on dashboards. The clickable card is a native <button class="stat-card--clickable">, so that
   class is the only hook. */
.stat-card:hover {
    border-color: var(--glass-border-light);
}

.stat-card--clickable {
    cursor: pointer;
}

.stat-card--clickable:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-md);
}

.stat-card--clickable:focus-visible {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* B-009 (TASK_08): a clickable card is a native <button> (PR review 1345 — Space must not scroll the
   page). Reset only the UA button defaults that would otherwise fight `.stat-card`'s own look; background,
   border, padding and border-radius are NOT reset here so `.stat-card` above keeps winning. The display is the
   card's grid (I-036). */
button.stat-card--clickable {
    font: inherit;
    color: inherit;
    width: 100%;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

/* B-028: both StatCard branches render <span> parts (one shared body), so every card stacks them;
   compact cards keep the inline label/value of the calculator seed (B-008 2588). */
.stat-card:not(.stat-card--compact) > .stat-value,
.stat-card:not(.stat-card--compact) > .stat-label {
    display: block;
}

.stat-card--compact .stat-value {
    /* Amounts and date ranges wrap inside a narrow grid column instead of overflowing it. */
    overflow-wrap: anywhere;
}

.stat-card--compact + .stat-card--compact {
    margin-top: var(--space-sm);
}

/* B-008 (back-port from a sibling fork): in a stat grid the gap spaces the cards; the stacked-card margin would stagger the row. */
.dashboard-stat-grid > .stat-card--compact + .stat-card--compact {
    margin-top: 0;
}

/* The icon tile: 40px, radius 10, the variant's colour on its own 14 % tint */
.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
}

/* I-036: one blue — "blue" is the primary tile (F .s-ic--primary), not a second blue (the Starter plan-tier ink)
   beside the primary accent */
.stat-icon--blue {
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary-text);
}

.stat-icon--cyan {
    background: rgba(var(--color-cyan-rgb), 0.14);
    color: var(--color-cyan);
}

.stat-icon--green {
    background: rgba(var(--color-success-rgb), 0.14);
    color: var(--color-success);
}

.stat-icon--warning {
    background: rgba(var(--color-warning-rgb), 0.14);
    color: var(--color-warning);
}

.stat-icon--purple {
    background: rgba(var(--color-accent-purple-rgb), 0.14);
    color: var(--color-accent-purple-light);
}

.stat-icon--danger {
    background: rgba(var(--color-error-rgb), 0.14);
    color: var(--color-error);
}

.stat-icon--primary,
.stat-icon--orange {
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary-text);
}

/* I-036: no status — the secondary ink on its own tint */
.stat-icon--neutral {
    background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
    color: var(--text-secondary);
}

/* I-036: needs attention — the solid attention fill with its dark ink (F `.s-ic--attn`, the badge colours) */
.stat-icon--attn {
    background: var(--color-attention);
    color: var(--color-on-attention);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.78125rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-secondary);
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    font-weight: 600;
}

.stat-trend--up {
    color: var(--color-success);
}

.stat-trend--down {
    color: var(--color-error);
}

/* CF-044 — Stat-card horizontal variant for detail pages (bank account, cash register).
   Enables an icon-left + body-right layout within a .glass-card.stat-card.
   F-176: detail-page pattern has scoped_css_allowed: none — promoted from
   BankAccountDetail.razor.css where it was incorrectly scoped. */
.stat-card--horizontal {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
    padding: var(--space-md);
}

.stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    background: var(--color-primary-bg);
    color: var(--color-primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card__icon--secondary {
    background: var(--color-info-bg);
    color: var(--color-info);
}

.stat-card__body {
    flex: 1;
    min-width: 0;
}

.stat-card__label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.stat-card__value {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-card__value--negative {
    color: var(--color-error);
}

.stat-card__value--small {
    font-size: 1rem;
    font-weight: 500;
    word-break: break-all;
}

.stat-card--current .stat-card__value {
    font-size: 1.5rem;
}

/* Balance-cards grid — holds 3 horizontal stat-cards on detail pages. */
.balance-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .balance-cards {
        grid-template-columns: 1fr;
    }
}

/* Journal / ledger link — primary-colored anchor used in table rows and session banners. */
.journal-link {
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: none;
}

.journal-link:hover {
    text-decoration: underline;
}

/* I-060 (Evidens I-044 TASK_08, known failure 2): the grid lays out the cards it has. At most --stat-grid-max (4) per
   row; each track is at least --stat-card-min wide (a card is never cramped — it wraps to the next row first); auto-fit
   collapses the tracks no card uses, so 1 / 2 / 3 cards fill the row with no empty slot, 7 / 8 cards make 4 + 3 / 4 + 4;
   at ≤ 992px two per row (the L2 rule: ≤ 2 columns at 768). The track minimum is the larger of the card minimum and an
   even share of the row for --stat-grid-max cards (less 0.1px, so rounding never drops a track). B-009's 5 / 6 rules
   and the five-across rule from 1200px below still set their own columns. */
.dashboard-stat-grid {
    --stat-grid-max: 4;
    --stat-card-min: 11rem;
    display: grid;
    grid-template-columns: repeat(auto-fit,
        minmax(max(var(--stat-card-min), (100% - (var(--stat-grid-max) - 1) * var(--space-md)) / var(--stat-grid-max) - 0.1px), 1fr));
    gap: var(--space-md);
}

/* The block under a stat grid sits on the page rhythm also when both share a wrapper (a list page's aria-live div,
   where the .page-container owl does not reach) — a grid flush on the table card read as cramped (VR4, known failure 2) */
.dashboard-stat-grid + :not(style) {
    margin-top: var(--space-lg);
}

/* In a .card-stack the stack's gap is the space under the grid; the sibling margin above would add to it (48px instead
   of the stack's 24px, B-070 L249 / I-060 PR 876 thread 14052). Heavier than the sibling rule, as .doc-main's reset. */
.card-stack > .dashboard-stat-grid + :not(style) {
    margin-top: 0;
}

/* B-009: exactly 5 or 6 cards fill their rows instead of orphaning the 5th/6th.
   Wrapped in a range media query because :has() specificity (0,3,0) would beat the
   992px / 480px collapse rules below. B-008 (2607, 2647): `min-width: 992.02px` is the complement of
   `max-width: 992px` without Media Queries L4 range syntax, which Safari/iOS 15.4-16.3 drop. */
@media (min-width: 992.02px) {
    /* I-060: three cards at most three across on desktop (auto-fit already fills the row); ≤ 992px two per row, as the
       L2 mobile rule (≤ 2 columns at 768) wants */
    .dashboard-stat-grid:has(> :nth-child(3):last-child) { --stat-grid-max: 3; }
    .dashboard-stat-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-stat-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .dashboard-stat-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .dashboard-stat-grid {
        --stat-grid-max: 2;
    }
}

@media (max-width: 480px) {
    .dashboard-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard glass-card section heading (Recent activity, Quick actions, etc.) */
.dashboard-card-title {
    margin: 0 0 var(--space-md) 0;
    font-family: var(--font-display); /* I-012: headings never fall back to the system/body font */
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Empty-state copy inside an activity feed / timeline card */
.activity-feed-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
}

/* Grid wrapper for dashboard quick-action buttons */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

/* --- Pricing billing toggle --- */
.pricing-billing-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    width: fit-content;
    margin: 0 auto var(--space-xl);
}

.pricing-billing-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.pricing-billing-toggle button.active {
    background: var(--gradient-primary);
    color: var(--color-on-primary);
    box-shadow: var(--shadow-primary-md);
}

/* --- Pricing tier cards --- */
.pricing-tier-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: stretch;
}

.pricing-tier-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    transition: all var(--transition-base);
}

.pricing-tier-card:hover {
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
}

.pricing-tier-card--featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), 0 8px 32px rgba(var(--color-primary-rgb), 0.15);
}

.pricing-tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-on-primary);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.pricing-tier-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-tier-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.pricing-tier-price__amount {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* "Custom" / "Contact us" enterprise-tier amount — smaller because it's a word.
   F-176: promoted from PricingPlayground.razor.css. */
.pricing-tier-price__amount--custom {
    font-size: 1.75rem;
}

.pricing-tier-price__period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Pricing page header — centered variant.
   F-176: promoted from PricingPlayground.razor.css. */
.pricing-header--centered {
    text-align: center;
}

.pricing-tier-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex: 1;
}

.pricing-tier-features li {
    padding-left: 1.25rem;
    position: relative;
}

.pricing-tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .pricing-tier-row {
        grid-template-columns: 1fr;
    }

    .pricing-tier-card {
        padding: var(--space-lg);
    }
}

/* --- FAQ section (commonly paired with pricing / marketing pages) ---
   F-176: promoted from PricingPlayground.razor.css. */
.faq-section__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
}

/* --- Audit-log primitives — referenced by `audit-log-playground` catalog pattern ---
   Prototype F .audit (I-036): flat rows at least 44px with a hairline between them, in a 128px | 1fr | auto grid
   (time, action + entity, actor); time 12.5 muted tabular, action mono bold; two columns when the feed is
   narrower than 480px, with the time on its own row. */
.audit-log-feed {
    display: flex;
    flex-direction: column;
    container-type: inline-size;
}

.audit-log-row {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 14px;
    min-height: 44px;
    padding: 6px 0;
    font-size: 0.84375rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.audit-log-row + .audit-log-row {
    border-top: 1px solid var(--glass-border);
}

.audit-log-row:hover {
    background: var(--color-fg-04);
}

.audit-log-row[data-selected="true"] {
    background: var(--color-primary-bg);
    box-shadow: inset 2px 0 0 var(--color-primary);
}

.audit-log-row[data-fresh="true"] .audit-log-row__time {
    color: var(--color-primary-text);
}

.audit-log-row__time {
    color: var(--text-muted);
    font-size: 0.78125rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.audit-log-row__main {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-log-row__action {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
}

/* I-013: feature rows render localized action/source labels (already cased for the culture) —
   opt out of any Title-Casing of raw lowercase seed actions. */
.audit-log-row__action--localized {
    text-transform: none;
}

.audit-log-row__target {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 0.78125rem;
}

.audit-log-row__actor {
    color: var(--text-muted);
    font-size: 0.78125rem;
    white-space: nowrap;
}

/* F switches at a 640px viewport; the feed usually sits in a master-detail column, so it switches on its
   own width instead. */
@container (max-width: 480px) {
    .audit-log-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .audit-log-row__time {
        grid-column: 1 / -1;
    }

    /* The tag form (Tag.audit-log-row__action | subject + actor | time — AuditHistoryList, the record-history
       drawers) narrows as the phone rule below lays it out: the tag keeps its width, the subject takes the rest
       and the time sits under it. Without this the nowrap actor took the auto track and squeezed the tag column
       to 0, so the tag overlapped the subject in a narrow feed column (CF-094 TASK_17, O64 at 834). */
    .audit-log-row:has(> .audit-log-row__action:first-child) {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .audit-log-row:has(> .audit-log-row__action:first-child) .audit-log-row__time {
        grid-column: 2;
    }

    /* …and the subject block ellipsizes its nowrap actor (as .audit-log-row__main does) instead of running into
       the column beside the feed. */
    .audit-log-row:has(> .audit-log-row__action:first-child) > :nth-child(2) {
        min-width: 0;
    }

    .audit-log-row:has(> .audit-log-row__action:first-child) .audit-log-row__actor {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* I-025: on a phone the timestamp stacks under the subject (as in audit-log-playground) and the subject
   column may shrink below its nowrap text, so a long subject ellipsizes instead of widening the row */
@media (max-width: 480px) {
    .audit-log-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .audit-log-row__time {
        grid-column: 2;
    }
}

/* --- Record history drawer — referenced by `audit-history-drawer` catalog pattern (F-127) ---
   Per-record History drawer on detail pages: compact audit-log feed whose rows expand
   inline into a Before → After diff card. */
.audit-log-row[data-expanded="true"] {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-light);
}

.audit-log-row__expanded {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg-light);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
}

.record-history-drawer .audit-log-row > div {
    min-width: 0;
}

.record-history-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.record-history-drawer__header .section-title-sm {
    margin: 0;
}

.record-history-drawer__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

.record-history-drawer__states {
    margin-top: var(--space-md);
}

/* I-013: drawer focus roots (tabindex="-1") receive programmatic focus on open so Escape reaches the
   component's @onkeydown; they are containers, not controls, so no focus ring. */
.record-history-drawer__body:focus,
.entity-drawer .entity-drawer-body:focus {
    outline: none;
}

/* Live <Drawer> host (F-127 TASK_06). `.entity-drawer` (overrides.css) zeroes the body padding and
   clips overflow so form drawers can pin a sticky footer; the history drawer has no sticky footer,
   so its body pads and scrolls as a whole — otherwise 20 rows or an expanded diff are cut off. */
.entity-drawer.record-history-drawer .ant-drawer-body {
    padding: var(--space-lg) !important;
    overflow-y: auto !important;
}

/* In the Drawer title slot `.ant-drawer-header` already pads the header. */
.ant-drawer-title .record-history-drawer__header {
    margin-bottom: 0;
}

/* Small muted timestamp under a timeline event message — activity feeds, change
   history, audit detail panels. F-176: promoted from DetailPlayground.razor.css. */
.timeline-event__time {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- File upload primitives — referenced by `file-upload-playground` catalog pattern --- */
/* Prototype F .updrop (I-036): 1.5px dashed --glass-border-light, radius 12, padding 16, no fill,
   13.5px secondary text. */
.upload-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    border: 1.5px dashed var(--glass-border-light);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84375rem;
    text-align: center;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    gap: 6px;
}

.upload-dropzone:hover {
    border-color: var(--color-primary-light);
}

.upload-dropzone:focus-visible,
.upload-dropzone:has(input[type="file"]:focus-visible) {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Drag-active state — apply via .upload-dropzone--dragging when @ondragenter fires (F .updrop--over):
   a SOLID primary border on the primary tint, the icon in the accent text.
   F-176: promoted from FileUploadPlayground.razor.css. */
.upload-dropzone--dragging {
    border-style: solid;
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    color: var(--text-primary);
}

.upload-dropzone--dragging .anticon:first-child {
    color: var(--color-primary-text);
}

/* Tall column-oriented dropzone (multi-file / clipboard-paste variants): F's 124px zone, 26px icon. */
.upload-dropzone--column {
    min-height: 124px;
    flex-direction: column;
}

.upload-dropzone--column .anticon:first-child {
    font-size: 1.625rem;
    color: var(--text-muted);
}

.upload-dropzone--column.upload-dropzone--dragging .anticon:first-child {
    color: var(--color-primary-text);
}

/* "Choose file" label rendered as a button (sits inside a .upload-dropzone with
   a sibling visually-hidden <input type="file">).
   F-176: promoted from FileUploadPlayground.razor.css. */
.upload-choose-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.84375rem;
}

.upload-choose-label--block {
    flex-direction: column;
    text-align: center;
    color: var(--text-secondary);
}

.upload-choose-label:hover {
    color: var(--color-primary);
}

/* Avatar-upload row: 80×80 circular preview + adjacent picker affordance.
   F-176: promoted from FileUploadPlayground.razor.css. */
.upload-avatar-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.upload-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.upload-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Prototype F .files li (I-036): flat rows at least 44px, a hairline between consecutive rows, a muted
   file icon; the state is told by the icon (success when done, error when failed). data-state carries
   the C# enum name (Done / Error), so the match is case-insensitive. */
.upload-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 0;
    font-size: 0.875rem;
}

.upload-file-row + .upload-file-row {
    border-top: 1px solid var(--glass-border);
}

.upload-dropzone + .upload-file-row {
    margin-top: var(--space-sm);
}

.upload-file-row__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.upload-file-row[data-state="error" i] .upload-file-row__icon {
    color: var(--color-error-light);
}

.upload-file-row[data-state="done" i] .upload-file-row__icon {
    color: var(--color-success-hover);
}

.upload-file-row__body {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.upload-file-row__name {
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-row__meta {
    color: var(--text-muted);
    font-size: 0.78125rem;
    font-variant-numeric: tabular-nums;
}

.upload-file-row__actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

/* ========================================
   Image Upload Field molecule (CF-028)
   Reusable single-image uploader: round preview doubling as a dropzone,
   upload + remove actions, helper hint. Used by LogoUploadCard (CF-028)
   and future avatar/banner uploads.

   F-189: restored after commit 908d37673 deleted the block. `__preview` being
   the positioning context is load-bearing, not decoration — without it the
   absolutely positioned `__input` escapes the 96px circle and covers the whole
   Branding card, making the Remove button unclickable. Keep `position: relative`
   on `__preview` and the explicit box on `__input` together.
   ======================================== */
.image-upload-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.image-upload-field__preview {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s ease, border-style 0.2s ease;
}

.image-upload-field__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-field__preview .anticon {
    font-size: 32px;
    color: var(--text-muted);
}

.image-upload-field__preview:hover,
.image-upload-field__preview:focus-within {
    border-color: var(--color-primary);
    border-style: dashed;
    border-width: 2px;
}

/* Overlay the picker on the preview circle so the whole circle opens it. The
   selector must out-specify the `input[type="file"]` default — an attribute
   selector counts as a class, making that default (0,1,1), so a bare
   `.image-upload-field__input` (0,1,0) would silently lose its box back to
   1×1 while still picking up `inset`. */
.image-upload-field__preview > input.image-upload-field__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-upload-field__actions {
    display: flex;
    gap: var(--space-sm);
}

.image-upload-field__hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.image-upload-field__preview.is-uploading {
    cursor: wait;
}

@media (max-width: 480px) {
    .image-upload-field__actions {
        flex-direction: column;
        width: 100%;
    }
}

/* --- Modal-body form field — referenced by `modal-page` catalog pattern --- */
.ds-tpl-form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.ds-tpl-form-field:last-child {
    margin-bottom: 0;
}

/* --- Empty State --- (prototype F .empty / .empty--sm, I-036)
   The icon sits in a tinted ring that shows in both themes: Neutral (the default tone) = 8 % ink + --text-secondary,
   Primary = --color-primary-bg + --color-primary-text, Error = 14 % --color-error-light. Page: 64px ring, 20px / 700
   title (F's bare .empty h2), 15px description (F's body size, CF-087 TASK_05 measured both on the partner overview's
   empty block); Section: 44px ring, 15px / 600 title (F .empty--sm h3), 13.5px description. Description
   --text-secondary, at most 46ch. */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    gap: 8px;
    /* F's body line box, whatever the host: inside AntD tabs the inherited 1.5715 made the page block 2.5px taller */
    line-height: var(--line-height-body);
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--color-fg-08);
    border-radius: 50%;
    margin-bottom: 8px;
    font-size: 28px;
    line-height: 1;
    color: var(--text-secondary);
}

.empty-state__icon--primary {
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
}

.empty-state__icon--error {
    background: color-mix(in srgb, var(--color-error-light) 14%, transparent);
    color: var(--color-error-light);
}

.empty-state__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
}

.empty-state__description {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    max-width: 46ch;
    margin: 0;
}

/* Muted description text below an <Empty> component's title slot. Global utility so pages
   with zero scoped CSS (list-page archetype) can compose it. Historically defined privately in
   several list pages' scoped CSS; those copies retain higher specificity where present. */
.empty-description {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.empty-state__cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

/* Section variant — an empty state inside a card or panel on a page that already has its heading */
.empty-state--section {
    padding: 18px 12px;
    gap: 4px;
}

.empty-state--section .empty-state__icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin-bottom: 4px;
}

.empty-state--section .empty-state__title {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
}

.empty-state--section .empty-state__description {
    font-size: 13.5px;
}

.empty-state--section .empty-state__cta {
    margin-top: 6px;
}

@media (max-width: 768px) {
    .empty-state__cta {
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 40px 16px;
    }

    .empty-state--section {
        padding: 18px 12px;
    }
}

/* --- Wizard step strip, footer and result step: "Wizard and settings patterns (I-033)" below (the hand-built
   .wizard-progress__step / __rail rail was replaced by AntD <Steps> inside .wizard-progress). --- */

/* --- Wizard step body — title, hint, fields, review, edit-link.
   F-176: promoted from WizardPlayground.razor.css. Fills the obvious gap where
   .wizard-progress + .wizard-actions existed globally but step-body styles did not. */
.wizard-step__title {
    font-size: 1.375rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs);
}

/* A step with no subtitle: its fields keep a field gap under the title (the title's own xs margin left the first label
   4px under a 22px heading — I-060, Evidens I-044 Decision 31) */
.wizard-step__title + .form-grid {
    margin-top: var(--space-md);
}

/* Secondary text, as F's step header subtitle (.wz-hd p) — I-033 TASK_08 */
.wizard-step__hint {
    color: var(--text-secondary);
    margin: 0 0 var(--space-lg);
}

.wizard-step__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

/* A switch in a field column keeps its own width — the column's stretch drew it as a bar across the field (CF-099 F-b18-08,
   the onboarding PDV obveznik) */
.wizard-step__field > .ant-switch {
    align-self: flex-start;
}

.wizard-step__error {
    margin: 0;
    color: var(--color-error);
    font-size: 0.8125rem;
}

.wizard-step__review {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: 0;
}

/* A note under the review list (a deadline hint, its alert in a role="note" wrapper) keeps the step's field rhythm above
   it — the alert touched the list's last row (I-060, Evidens I-044 Decision 30, VR4) */
.wizard-step__note {
    margin-top: var(--space-md);
}

/* A repeated group's head inside a step (a "Period N" with its remove action): the title at the start, the remove
   action at the end of the row — it borrowed .wizard-step__review-row's three-column grid, which put the action in the
   middle column (I-060, Evidens I-044 Decision 31) */
.wizard-step__group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
}

.wizard-step__review-row {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: baseline;
    gap: var(--space-md);
}

.wizard-step__review-row dt {
    color: var(--text-muted);
    font-weight: 500;
}

.wizard-step__review-row dd {
    margin: 0;
    color: var(--text-primary);
}

.wizard-step__edit {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.wizard-step__edit:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .wizard-step__review-row {
        grid-template-columns: 1fr auto;
    }

    .wizard-step__review-row dt {
        grid-column: 1 / -1;
    }
}

/* --- Portal Client Header Bar --- */
.client-header-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.client-header-bar__label {
    font-weight: 500;
    color: var(--text-muted);
}

/* Below the labelled-sidebar width (ShellModes.WideMinWidth, I-024): the content column narrows, so the bar's
   label and its content wrap onto lines of their own instead of squeezing (I-046 PLAN AD-9) */
@media (max-width: 999.98px) {
    .client-header-bar {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .client-header-bar {
        padding: var(--space-sm) var(--space-md);
    }
}

/* --- Heavy Data Report --- */
.heavy-data-section {
    position: relative;
}

/* "{N} of {total} loaded" caption above streaming-data tables.
   F-176: promoted from HeavyDataPlayground.razor.css. */
.heavy-data-section__loaded-count {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    padding-top: 0.375rem;
}

.heavy-data-totals {
    position: sticky;
    bottom: 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--glass-border);
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.heavy-data-totals strong {
    color: var(--text-primary);
}

.heavy-data-sentinel {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Compact rows — prototype F's ledger (34px rows, 13.5px text). The playground's density switch and the I-032
   pattern's .heavy-data-table--compact are one rule; the header keeps the pattern's 44px. */
.heavy-data-density--compact .ant-table-cell,
.heavy-data-table--compact .ant-table-cell {
    height: var(--heavy-data-row-h, 34px);
    padding: 0 12px !important;
    font-size: 0.84375rem;
}

.heavy-data-density--compact .ant-table-thead > tr > th.ant-table-cell,
.heavy-data-table--compact .ant-table-thead > tr > th.ant-table-cell {
    height: var(--heavy-data-head-h, 44px);
    /* F's header text is a step under the rows (12.5px; I-032 TASK_08) */
    font-size: 0.78125rem;
}

.heavy-data-density--comfortable .ant-table-cell {
    padding: 12px 16px !important;
}

.heavy-data-density--spacious .ant-table-cell {
    padding: 20px 24px !important;
}

/* ========================================
   Calendar Cell Annotations
   Global so every page rendering an annotated AntDesign <Calendar/>
   (vacation, billing, deadline, etc.) can reuse it.
   Composition:
     .calendar-cell[.calendar-cell--<variant>]
       > .calendar-cell__day + (.calendar-annotation)?
   Variants: --substitute, --override, --today, --past.
   See `/design-system#calendar-annotated-playground-template`.
   ======================================== */

.calendar-cell {
    position: relative;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

.calendar-cell__day {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.calendar-annotation {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(var(--color-primary-rgb), 0.15);
    color: var(--color-primary);
    margin-left: 4px;
}

.calendar-cell--substitute {
    background: rgba(var(--color-tier-starter-rgb), 0.08);
}

.calendar-cell--override {
    background: rgba(var(--color-accent-purple-rgb), 0.08);
}

/* Today: the inset 1.5px primary ring and accent-text day of prototype F .cal (I-036) */
.calendar-cell--today {
    box-shadow: inset 0 0 0 1.5px var(--color-primary);
}

.calendar-cell--today .calendar-cell__day {
    color: var(--color-primary-text);
    font-weight: 700;
}

/* Past days dim the day number only, so an annotation keeps its strength */
.calendar-cell--past .calendar-cell__day {
    color: var(--text-muted);
}

/* Off-month days are blank */
.ant-picker-cell:not(.ant-picker-cell-in-view) .calendar-cell {
    visibility: hidden;
}

/* ========================================
   Deadline-Dots (Density Grid)
   Global so reminder/alarm/scheduling UIs can reuse it.
   Composition:
     .deadline-row > .bureau-deadline-cell
       > .bureau-deadline-cell__date
       + .bureau-deadline-cell__dots
         > .deadline-dot.deadline-dot--<urgency> x N
         + .bureau-deadline-cell__overflow?
   Urgencies: --low, --med, --high, --critical.
   See `/design-system#deadline-dots-playground-template`.
   ======================================== */

.deadline-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.bureau-deadline-cell {
    aspect-ratio: 1;
    padding: 6px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bureau-deadline-cell__date {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.bureau-deadline-cell__dots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
}

/* Urgency marks by shape as well as colour (prototype F .mark, the I-029 .work-queue__mark vocabulary at
   8px, radius 2): critical = overdue solid square, high = ≤ 3 days red ring, med = ≤ 7 days warning dot,
   low = upcoming hollow ring. Pair with .deadline-legend so the shapes are named. */
.deadline-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--text-muted);
}

.deadline-dot--critical {
    background: var(--color-error);
}

.deadline-dot--high {
    background: transparent;
    box-shadow: inset 0 0 0 2.5px var(--color-error-light);
}

.deadline-dot--med {
    border-radius: 50%;
    background: var(--color-warning-light);
}

.deadline-dot--low {
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--text-muted);
}

.deadline-legend .deadline-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.deadline-legend :is(.deadline-dot--med, .deadline-dot--low) {
    border-radius: 50%;
}

/* The legend row naming the marks (I-036; the shared half of Evidens' bureau-calendar legend rules) */
.deadline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
    align-items: center;
}

/* F .sdot: 13.5px secondary label, 7px after a 10px mark */
.deadline-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84375rem;
    color: var(--text-secondary);
}

.bureau-deadline-cell__overflow {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-left: 2px;
}

@media (max-width: 768px) {
    .deadline-row {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .deadline-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   Playground Hub Grid (F-174 TASK_40)
   Used by /design-system/playgrounds (PlaygroundIndex.razor) — three card grids
   grouped by A/B/C playground category. Composition:
     .playground-section > .playground-card-grid > .playground-card.glass-card x N
   ======================================== */

.playground-section {
    margin-top: var(--space-2xl);
}

.playground-section:first-of-type {
    margin-top: var(--space-xl);
}

.playground-section__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.playground-section__count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.875rem;
    margin-left: var(--space-xs);
}

.playground-section__hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.playground-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.playground-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.playground-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary-md);
    text-decoration: none;
}

.playground-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.playground-card__description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.playground-card__footer {
    margin-top: auto;
    padding-top: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    border-top: 1px solid var(--glass-border);
}

.playground-card__route {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playground-card__cta {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary-text);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .playground-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Reconciliation Grid
   Vertical stack of paired rows for matching workflows (transactions to bank statements,
   diff/sync UIs, etc.). Each row is a 3-column grid: left record | match column | right record —
   prototype F .recon (I-036): no surface around the pair, each side a glass card, the middle column
   carries the state (icon + tag, and for a suggestion the % match and the confirm action).
   Composition:
     .reconciliation-grid > .reconciliation-pair[--matched|--ignored|--drag-over] x N
       > .reconciliation-pair__side.reconciliation-pair__side--left
       + .reconciliation-match-badge[.reconciliation-match-badge--matched|--unmatched]
           > icon + tag (+ .reconciliation-match-badge__score + small + button)
       + .reconciliation-pair__side.reconciliation-pair__side--right
   Matched = the success tag only (no wash over the pair); ignored = both sides at 60 %.
   See `/design-system/playground/reconciliation`.
   CF-099 TASK_52: kept — its one user is ReconciliationPlayground.razor (no Core page renders it).
   ======================================== */

.reconciliation-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.reconciliation-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.reconciliation-pair--ignored .reconciliation-pair__side {
    opacity: 0.6;
}

.reconciliation-pair--drag-over .reconciliation-pair__side--right {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.reconciliation-pair__side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    font-size: 0.875rem;
    min-height: 56px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.reconciliation-pair__side--draggable {
    cursor: grab;
}

.reconciliation-pair__side--draggable:active {
    cursor: grabbing;
}

.reconciliation-pair__side--empty {
    background: transparent;
    border-style: dashed;
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
}

.reconciliation-pair__reference {
    font-family: var(--font-mono);
    font-size: 0.78125rem;
    color: var(--text-secondary);
}

.reconciliation-pair__amount {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.reconciliation-pair__date {
    font-size: 0.78125rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

/* The middle column (F .recon-m) */
.reconciliation-match-badge {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    min-width: 112px;
    font-size: 0.78125rem;
    color: var(--text-secondary);
    text-align: center;
}

.reconciliation-match-badge > .anticon:first-child {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.reconciliation-match-badge--matched > .anticon:first-child {
    color: var(--color-success-hover);
}

.reconciliation-match-badge__score {
    font: 700 1rem var(--font-display);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .reconciliation-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Balance rows: a muted label left, its figure right; --difference is the result line under a top rule. For a
   balance or reconciliation summary card (opening / closing balance, the difference). Users: AdvanceSettleModal,
   AdvanceStornoModal (CF-099 TASK_52).
   Composition: .reconciliation-row[.reconciliation-row--difference] > .reconciliation-label + .amount */
.reconciliation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
}

.reconciliation-row--difference {
    border-top: 1px solid var(--glass-border);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    font-weight: 600;
}

.reconciliation-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.reconciliation-row .amount {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Sortable List
   Vertical drag-to-reorder list for sequencing workflows (delivery route order,
   priority queues, manual sort). Native HTML5 drag — rows reorder on drop and the
   visible 1..N sequence renumbers from list position. Distinct from the reconciliation
   grid (drag-to-pair). F's drag list (CF-093, o.html `#route` `ol.alist`): flat rows split
   by a hairline, the sequence as F's `.cnt` pill, a muted grip, a two-line label (name over
   a small mono detail, optionally a third line of tags) and an inset primary bar on the drop
   target's landing edge (top when dragging up, bottom when dragging down). Composition:
     .glass-card.table-card > .mx-hd (h2 + .cnt) + .card-b
       > ul.sortable-list > li.sortable-list__item[.--dragging|.--drag-over] x N
         > .sortable-list__handle + .sortable-list__seq
           + .sortable-list__label (b + small [+ span of tags]) [+ .sortable-list__meta]
   See `/design-system#sortable-list-template`.
   ======================================== */

.sortable-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sortable-list__item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 0;
    font-size: 14px;
    cursor: grab;
    transition: opacity var(--transition-base);
}

/* The hairline between rows (F .alist li + li) */
.sortable-list__item + .sortable-list__item {
    border-top: 1px solid var(--glass-border);
}

.sortable-list__item:active {
    cursor: grabbing;
}

.sortable-list__item--dragging {
    opacity: 0.5;
}

/* The drop target (F .alist li.is-drop): an inset 2px primary bar on the edge the dragged row lands on. Consumers drop
   with RemoveAt(from) + Insert(to), so an upward drag lands before the target (top edge) and a downward drag — the
   source row earlier in the list — lands after it (bottom edge). */
.sortable-list__item--drag-over {
    box-shadow: inset 0 2px 0 var(--color-primary);
}

.sortable-list__item--dragging ~ .sortable-list__item--drag-over {
    box-shadow: inset 0 -2px 0 var(--color-primary);
}

/* The grip (F .dim): muted ink at the row's size */
.sortable-list__handle {
    color: var(--text-muted);
    font-size: inherit;
    line-height: 1;
    cursor: grab;
    user-select: none;
}

/* The sequence (F .cnt), the same pill as a card head's count */
.sortable-list__seq {
    display: inline-block;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg-light);
    color: var(--text-secondary);
    font: 600 12px/18px var(--font-body);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* The two-line label (F .nm): the name (a `b`, or the first child) over a small muted mono detail; a line of tags (F's
   chip line: the ETA / state tags) keeps the row's own type wherever it sits — the positional detail fallback skips it */
.sortable-list__label {
    display: grid;
    min-width: 0;
}

.sortable-list__label > b,
.sortable-list__label > :first-child {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sortable-list__label > small,
.sortable-list__label > :first-child + :not(:has(.ant-tag)) {
    overflow: hidden;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sortable-list__meta {
    color: var(--text-muted);
    font-size: 12.5px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .sortable-list__item {
        grid-template-columns: auto auto minmax(0, 1fr);
    }
    .sortable-list__meta {
        grid-column: 3 / -1;
        text-align: left;
    }
}

/* ========================================
   Calculator Page Grid
   Two-pane input/output layout for calculator
   and financial tool pages. Composition:
   .calculator-page-grid > .calculator-pane[input] + .calculator-pane[output]
   See `/design-system#calculator-playground-template`.
   ======================================== */

.calculator-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-lg);
}

/* Calculator pane — section heading inside an input/output pane on a calculator page.
   F-176: promoted from CalculatorPlayground.razor.css. */
.calculator-pane h3 {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .calculator-page-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Shared Animations
   Common keyframes used across multiple pages.
   Pages can reference these without re-declaring.
   ======================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Auth Form Shared Styles
   Used across Login, Register, LoginConfirm,
   RegisterConfirm pages.
   ======================================== */

.auth-form {
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-form-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.625rem 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.auth-code-expires {
    font-size: 0.875rem;
    color: var(--color-attention-text);
    margin: 0.75rem 0 0 0;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--color-attention-bg);
    border-radius: var(--radius-sm);
}

/* F-223: a register face (.status-result) inside the auth card: the card already pads it, so only a small top gap */
.auth-form .status-result {
    padding: var(--space-md) 0 0 0;
}

/* F-223: the Invited tag sits centred above the register title (AntD's end margin would push it off-centre) */
.auth-form-header > .ant-tag {
    margin: 0 0 var(--space-sm) 0;
}

/* F-223: a register face's primary action is a real link to the Website (AntD 1.6's <Button> has no Href, and a
   hand-written <a class="ant-btn"> is design-lint rule 17). Same gradient, glow, ink and lift as the auth form's
   primary button (overrides.css "Primary Button Overrides"). */
.auth-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    min-height: 40px;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.auth-action:hover,
.auth-action:focus-visible {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.auth-action:active {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.35);
    transform: translateY(0);
}

.auth-action:focus-visible {
    outline: none;
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.45), 0 0 0 2px var(--color-primary-glow);
}

/* F-223: a quiet line under a register face's action ("Already invited? …") */
.auth-hint {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: var(--space-md) 0 0 0;
}

.auth-footer-links {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.auth-footer-links a {
    color: var(--color-primary);
    text-decoration: none;
    margin-left: 0.375rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.auth-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.auth-footer-links a:hover {
    color: var(--color-primary-text);
}

.auth-footer-links a:hover::after {
    width: 100%;
}

/* Auth-page button hover shine effect */
.auth-form .ant-btn-primary {
    position: relative;
    overflow: hidden;
}

.auth-form .ant-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
            135deg,
            var(--color-fg-15) 0%,
            transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

.auth-form .ant-btn-primary:hover::before {
    opacity: 1;
}

@media (max-width: 480px) {
    .auth-title {
        font-size: 1.625rem;
    }

    .auth-subtitle {
        font-size: 0.875rem;
    }

    .auth-action {
        min-height: 44px;
    }
}

/* ========================================
   List Page Shared Components
   Filter cards, loading/retry states, tables,
   pagination, skeletons, and utilities used
   across list pages (TicketList, Notifications, etc.)
   ======================================== */

/* --- Loading Container --- */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.loading-container .ant-spin-text {
    color: var(--text-secondary) !important;
}

/* --- Retry Container --- */
.retry-container {
    margin-top: var(--space-md);
    text-align: center;
}

/* Right-aligned inline retry row (for list/table pages with optimistic refetch).
   F-176: promoted from ListPlayground.razor.css `.list-playground__retry`. */
.retry-container--inline {
    text-align: initial;
    display: flex;
    justify-content: flex-end;
}

/* The retry under a page alert, at the content's start (F errorBlock: .alert then the button) — CF-096 TASK_05 */
.retry-container--start {
    margin-top: 0;
    margin-bottom: var(--space-lg);
    text-align: start;
}

.retry-container .ant-btn {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border-light) !important;
    color: var(--text-secondary) !important;
}

.retry-container .ant-btn:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* --- Deadline Banner ---
   A list page's deadline alert and its call to action on ONE row (I-060, Evidens I-044 TASK_08, known failure 3 — the
   CTA used to sit on its own row under the alert, VR4): the alert takes the row, the CTA sits at its end, centred on it.
   Below 768px the CTA wraps under the alert, right-aligned (stretched at ≤ 480). The tier is drawn by the Alert itself
   (overrides.css). In a document rail / a detail tab the container's gap spaces it. Inert until a page uses it; the
   eOtpremnica prijemnica deadline is the expected first user. */
.deadline-banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.deadline-banner > .ant-alert {
    flex: 1 1 auto;
    min-width: 0;
}

.deadline-banner__cta {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
}

/* Below 768px the CTA wraps under the alert's text INSIDE the banner box: both share one grid cell, the alert reserves
   the CTA's row in its bottom padding (--deadline-cta-h: the 32px button, 44px touch target at ≤ 480), the CTA sits
   in it, right-aligned (stretched at ≤ 480) — one banner, never a detached row of its own (VR4). */
@media (max-width: 767.98px) {
    .deadline-banner {
        --deadline-cta-h: 32px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .deadline-banner > .ant-alert {
        grid-area: 1 / 1;
        /* overrides.css pads every alert with !important (14px 16px) */
        padding-bottom: calc(var(--space-md) + var(--deadline-cta-h) + var(--space-sm)) !important;
    }

    .deadline-banner__cta {
        grid-area: 1 / 1;
        align-self: end;
        justify-content: flex-end;
        padding: 0 var(--space-md) var(--space-md);
    }
}

@media (max-width: 480px) {
    .deadline-banner {
        --deadline-cta-h: 44px;
    }

    .deadline-banner__cta {
        justify-content: stretch;
    }

    .deadline-banner__cta > .ant-btn {
        flex: 1 1 auto;
    }
}

/* A document rail is a ~320px column at every viewport: the banner always stacks there as below 768px — the CTA under
   the alert's text inside the alert box (I-060, Evidens I-044 Decision 31: a rail banner drew the alert squeezed to a
   third of the rail and the CTA detached beside it, at 1440 and 834) */
.doc-rail > .deadline-banner {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.doc-rail > .deadline-banner > .ant-alert {
    grid-area: 1 / 1;
    padding-bottom: calc(var(--space-md) + var(--deadline-cta-h, 32px) + var(--space-sm)) !important;
}

.doc-rail > .deadline-banner > .deadline-banner__cta {
    grid-area: 1 / 1;
    align-self: end;
    padding: 0 var(--space-md) var(--space-md);
}

/* --- Filter Card --- */
.filter-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    animation: pageSlideUp 0.4s ease-out;
}

/* I-011 (PR 132 thread 2409): list-page filter cards tighten their padding on phones; the global rule replaces
   the per-page scoped copies. */
@media (max-width: 480px) {
    .filter-card {
        padding: var(--space-sm);
    }
}

.filter-row {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 160px;
}

.filter-item--search {
    flex: 1.5;
    min-width: 200px;
}

.filter-item--wide {
    flex: 2;
    min-width: 280px;
}

.filter-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    padding-bottom: 1px;
}

/* I-014 report-page: required-filter marker (the .form-field__label--required twin) and the
   disabled-run hint beside the Run button. */
.filter-label--required::after {
    content: " *";
    color: var(--color-error);
}

.filter-actions__hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    align-self: center;
}

/* --- Tree toolbar + node title family ---
   F-176: promoted from TreePlayground.razor.css. "Search input + filter buttons +
   counter" toolbar above any tree/list; "icon + text" tree node title with
   filter/search states. Real org-chart, file-browser, role-tree pages want these. */
.tree-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.tree-toolbar > :first-child {
    flex: 1 1 320px;
}

.search-match-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.tree-node-title {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.tree-node-title__icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.tree-node-title--dimmed {
    opacity: 0.4;
}

.tree-node-title--match .tree-node-title__name {
    color: var(--color-primary-text);
    font-weight: 500;
}

.tree-node-title--match .tree-node-title__icon {
    color: var(--color-primary);
}

/* --- Form Field utility (non-submit reactive inputs) --- */
.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

/* The field's column stacks its checkboxes; AntD's inline offset (.ant-checkbox-wrapper + .ant-checkbox-wrapper) only
   pushed every row after the first 8px right (a modal's checkbox lists — I-060, Evidens I-044 Decision 21 (e), as
   B-035's .checkbox-grid reset). */
.form-field > .ant-checkbox-wrapper + .ant-checkbox-wrapper {
    margin-inline-start: 0;
}

/* A vertical stack of checkboxes inside a form item (a worker's roles — the drawer form and WorkerDetail's rail): one per
   row, the field rhythm between them, and no AntD inline offset — `.ant-checkbox-wrapper + .ant-checkbox-wrapper
   { margin-inline-start: 8px }` pushed every row after the first 8px right (CF-099 F-b5-14; the two scoped copies of the
   stack are gone). */
.checkbox-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.checkbox-stack > .ant-checkbox-wrapper + .ant-checkbox-wrapper {
    margin-inline-start: 0;
}

/* A button-style radio group keeps its own width: the column stretched it into a bar with the buttons at its start
   (I-060, Evidens I-044 Decision 21 (e)). */
.form-field > .ant-radio-group:has(> .ant-radio-button-wrapper) {
    align-self: flex-start;
}

/* A switch keeps its own width too: the field column stretched it into a full-width bar with the knob at its start
   (I-060, Evidens I-044 Decision 29); the catalogue's own field (.ds-tpl-form-field) is the same column. */
.form-field > .ant-switch,
.ds-tpl-form-field > .ant-switch {
    align-self: flex-start;
}

/* B-009 (AD8): .settings-section already spaces its children with `gap`; the .form-field's
   own margin-bottom would double it. Every other .form-field user is in block flow and keeps
   the margin above. */
.settings-section > .form-field,
.settings-section > .form-row--split > .form-field {
    margin-bottom: 0;
}

.form-field__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Required-field marker for a .form-field label (the AntD FormItem draws its own). */
.form-field__label--required::after {
    content: " *";
    color: var(--color-error);
}

/* A Switch with its label and description beside it (settings-page toggles). The label sits next to the
   control, not at the far edge of the card; the optional description wraps under the label. */
.switch-field {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.switch-field > .ant-switch {
    flex: none;
    margin-top: var(--space-xs);
}

.switch-field__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

.switch-field__text > .filter-label {
    margin-bottom: 0;
}

.switch-field__description {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Inline hint text beneath a .form-field (validation/help messaging).
   F-176: promoted from InputsPlayground.razor.css. I-036 TASK_09: the same tiers as AntD's FormItem
   explain (overrides.css, prototype F .hint / .ferr) — hint 12.5px muted, error 13px in
   --color-error-light — so a page's own hint matches the FormItem message beside it. */
.form-field__hint {
    font-size: 12.5px;
    color: var(--text-muted);
}

.form-field__hint--success {
    color: var(--color-success);
}

.form-field__hint--error {
    color: var(--color-error-light);
    font-size: 13px;
}

/* Password-strength meter — 4-state track + fill bar.
   F-176: promoted from InputsPlayground.razor.css. */
.password-strength {
    height: 4px;
    background: var(--glass-bg);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.password-strength__bar {
    height: 100%;
    transition: width 200ms ease, background-color 200ms ease;
}

.password-strength__bar--weak {
    background: var(--color-error);
}

.password-strength__bar--fair {
    background: var(--color-warning);
}

.password-strength__bar--strong {
    background: var(--color-amber);
}

.password-strength__bar--excellent {
    background: var(--color-success);
}

/* Suggestion chip row beneath an input — "Try these instead:" affordance.
   F-176: promoted from InputsPlayground.razor.css. */
.input-suggestions {
    margin-top: var(--space-xs);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.input-suggestions__item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.input-suggestions__item:hover {
    border-color: var(--color-primary);
    background: var(--glass-bg-light);
}

/* Muted secondary meta-text shown beside an option's primary label (e.g. an
   email beside a user's display name in a `<Select>` or autocomplete row).
   F-176: promoted from InputsPlayground.razor.css. */
.option-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: var(--space-xs);
}

/* Inline autocomplete results panel (rendered below the input).
   F-176: promoted from InputsPlayground.razor.css. */
.autocomplete-results-list {
    list-style: none;
    margin: var(--space-xs) 0 0;
    padding: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 280px;
    overflow-y: auto;
}

.autocomplete-results-list__item {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--glass-border);
    transition: background 150ms ease;
}

.autocomplete-results-list__item:last-child {
    border-bottom: none;
}

.autocomplete-results-list__item:hover {
    background: var(--glass-bg-light);
}

/* Filter card — search input: the box is the global affix wrapper (overrides.css § Form controls, I-036) */
.filter-card .ant-input-affix-wrapper .ant-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
}

.filter-card .ant-input-search-button {
    margin-left: 5px !important;
}

/* Search input — fill filter-item container width */
.filter-card .ant-input-group-wrapper.ant-input-search {
    width: 100% !important;
}

.filter-card .ant-input-search .ant-input-wrapper.ant-input-group {
    width: 100% !important;
}

/* Multi-select chips inside filter cards are the global neutral chips (overrides.css, I-036 F .msel .tag) */

/* --- Page Header Actions --- */
/* F .acts (f.src.html 159) wraps: a status with five actions (StockCountDetail Counting) no longer runs past the page's
   right edge at 834 (CF-098 TASK_08) */
.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

/* --- App shell header actions (I-041, F .hdr) ---
   The top header's right-side cluster: status, bell, plan tag, e-mail, logout. Global so the live header (MainLayout,
   StatusIndicator, NotificationBell) and its /design-system#app-shell cut-out render from the same rules. The cluster's
   own layout is under .shell-header-actions; the status indicator's and the bell's base look is keyed on the
   components' own root classes (.status-indicator, .notification-bell-container), so either renders styled outside the
   header too (B-070 L171). The plan tag's look is overrides.css (".shell-header-actions .ant-tag.subscription-tag"). */
.shell-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shell-header-actions .user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* F .email: 13px in the secondary text colour */
.shell-header-actions .user-email {
    color: var(--text-secondary);
    font-size: var(--font-size-xs2);
    white-space: nowrap;
}

/* Logout: F #logout, a 36px text button — the 16px icon and "Odjava" in the primary text colour */
.shell-header-actions .logout-btn {
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 var(--space-sm);
    height: 36px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.shell-header-actions .logout-btn .anticon {
    font-size: 16px;
}

.shell-header-actions .logout-btn:hover {
    color: var(--color-error-light) !important;
    background: color-mix(in srgb, var(--color-error) 10%, transparent) !important;
}

.shell-header-actions .logout-text {
    font-size: var(--font-size-sm);
}

/* F .status (StatusIndicator): the dot and the status in words, 8px apart, 13px in the secondary text colour */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-base);
}

.status-indicator:hover {
    background: var(--glass-bg-light);
}

/* Status dot: 8px in the status colour with F's 3px soft ring of the same colour (F .status i) */
.status-indicator .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.status-indicator .dot-operational {
    background-color: var(--color-status-operational);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-status-operational) 25%, transparent);
}

.status-indicator .dot-degraded {
    background-color: var(--color-warning);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-warning) 25%, transparent);
    animation: shell-status-pulse 2s ease-in-out infinite;
}

.status-indicator .dot-partial-outage {
    background-color: var(--color-attention);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-attention) 25%, transparent);
    animation: shell-status-pulse 1.5s ease-in-out infinite;
}

.status-indicator .dot-major-outage {
    background-color: var(--color-error);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 25%, transparent);
    animation: shell-status-pulse 1s ease-in-out infinite;
}

.status-indicator .dot-unknown {
    background-color: var(--color-fg-45);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-fg-45) 25%, transparent);
}

@keyframes shell-status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

/* F's dot is static; a pulse is motion the user may have asked to be spared */
@media (prefers-reduced-motion: reduce) {
    .status-indicator .status-dot {
        animation: none;
    }
}

/* Status text: the current status in words */
.status-indicator .status-text {
    font-size: var(--font-size-xs2);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* F #bell (.btn--text.btn--icon, NotificationBell): a 36 x 36 button around an 18px bell */
.notification-bell-container {
    position: relative;
    display: inline-block;
}

.notification-bell-container .notification-bell-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-container .notification-bell-button .anticon {
    font-size: 18px;
}

.notification-bell-container .notification-bell-button:hover {
    background: var(--glass-bg-light);
    color: var(--text-primary);
}

/* F .badge.bell-dot: the 20px count pill at .8 scale (16px) on the bell's top right (I-036 TASK_09, I-041). Anchored
   by its left edge just right of the icon's centre and grown to the right, so a longer count ("99+") widens away
   from the bell instead of over it */
.notification-bell-container .notification-badge {
    position: absolute;
    top: 0;
    left: calc(50% + 3px);
    transform: scale(0.8);
    transform-origin: left top;
    pointer-events: none;
    background: var(--color-attention);
    color: var(--color-on-attention);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* F ≤ 1100: only the dot, and no e-mail (the status link's own name carries the status there) */
@media (max-width: 1100px) {
    .shell-header-actions .status-text,
    .shell-header-actions .user-email {
        display: none;
    }
}

@media (max-width: 768px) {
    .shell-header-actions {
        gap: 8px;
    }
}

/* F ≤ 640: the logout button keeps only its icon. The label is hidden visually only, so it stays the button's
   accessible name */
@media (max-width: 640px) {
    .shell-header-actions .logout-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .shell-header-actions .logout-btn {
        width: 36px;
        padding: 0;
        justify-content: center;
    }
}

/* --- Support-session banner (F-174, ImpersonationBanner) ---
   The feedback atom's warning Alert in its Banner form, between the header and the content, inside the content's
   gutters. The hue, frame and padding are the global .ant-alert rules (overrides.css); only the layout of its one line
   is here: the message, the access-state tag and the remaining minutes wrap, and Exit stays at the end of the line */
.impersonation-banner {
    flex-shrink: 0;
    margin: var(--space-sm) var(--content-padding-inline);
}

.impersonation-banner__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-md);
}

.impersonation-banner__text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    min-width: 0;
    overflow-wrap: anywhere;
}

.impersonation-banner__remaining {
    color: var(--text-secondary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.impersonation-banner__exit {
    margin-left: auto;
}

/* --- Company subscription banner (F-173, CompanySubscriptionBanner) ---
   The feedback atom's warning / error Alert in its Banner form, below the support banner, inside the same gutters. Hue,
   frame and padding are the global .ant-alert rules; only the line is laid out here: the message wraps (never a
   horizontal scroll at 390 px) and the action or the "contact the owner" note stays at the end */
.company-subscription-banner {
    flex-shrink: 0;
    margin: var(--space-sm) var(--content-padding-inline);
}

.company-subscription-banner__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-md);
}

.company-subscription-banner__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* From 768px the text and its action share the banner's row (PLAN § Look-at checklist 3, the deadline banner's rule):
   the text takes the room, the action keeps its width — "Pogledajte pretplatu" wrapped onto its own row under the text
   at 1440 and 834 (CF-099 F-b1-16). Below 768px the action may sit under the text, inside the banner box */
@media (min-width: 768px) {
    .company-subscription-banner__body {
        flex-wrap: nowrap;
    }

    .company-subscription-banner__text {
        flex: 1 1 auto;
    }

    .company-subscription-banner__action,
    .company-subscription-banner__contact {
        flex: 0 0 auto;
    }
}

.company-subscription-banner__contact {
    color: var(--text-secondary);
    font-weight: 500;
}

.company-subscription-banner__action,
.company-subscription-banner__contact {
    margin-left: auto;
}

/* --- IPS payment slip (F-229, ips-payment-slip pattern) ---
   An open proforma as a payment slip: the payment details as a definition list of .settings-info-row rows (the values
   in tabular figures and free to wrap — an account or a poziv na broj never forces a horizontal scroll) beside the NBS IPS
   QR; the actions under both. At <= 480px it stacks: details first, the QR below, centred. Composed inside the
   page's own card (a settings-section in a tabs card), so it draws no surface of its own */
.payment-slip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--space-lg);
}

.payment-slip__details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
}

/* The rows are the settings vocabulary (.settings-info-row > dt.settings-info-row__label + dd.settings-info-row__value);
   only the definition-list reset and the tabular figures are the slip's own */
.payment-slip__details dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* The total: one rule above it, the amount a size up and semibold */
.payment-slip__amount {
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid var(--glass-border);
}

.payment-slip__amount > .settings-info-row__value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.payment-slip__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.payment-slip__qr-caption {
    max-width: 232px;
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
}

.payment-slip__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

@media (max-width: 480px) {
    .payment-slip {
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-slip__qr {
        justify-self: center;
    }
}

/* The IPS QR (IpsQrCode, F-229): the server SVG as a 200px image on the white --color-qr-plate quiet zone — white in
   both themes, a scanner needs it. Never narrower than its frame allows: the image shrinks with max-width */
.billing-qr-container {
    display: inline-block;
    max-width: 100%;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--color-qr-plate);
}

.billing-qr-container img {
    display: block;
    width: 200px;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

/* The driver's eOtpremnica QR preview (ShipmentDetail's rail card, CF-097 PLAN AD-9; prototype eoQr): an inline SVG whose
   modules take currentColor, on the same white --color-qr-plate quiet zone — dark on white in both themes, like a
   printed label. justify-self keeps the plate at its own size inside the rail's .vacts grid. */
.eo-qr-plate {
    display: inline-block;
    justify-self: start;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--color-qr-plate);
    color: rgb(var(--color-black-rgb));
    line-height: 0;
}

/* --- Table Container --- */
.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: pageSlideUp 0.5s ease-out;
}

/* Monetary balance cell — sign-colored amount in finance list/detail tables.
   Global so pages with no scoped CSS (e.g. cash-register list) can compose it. */
.balance-cell {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.balance-cell--positive {
    color: var(--color-accounting-credit);
}

.balance-cell--negative {
    color: var(--color-accounting-debit);
}

/* B-005: a .table-container nested in a .glass-card is a plain inner wrapper —
   the card already draws the glass surface, so a second one is card-in-card chrome. */
.glass-card > .table-container,
.glass-card .table-container {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
    animation: none;
}

/* Allow horizontal scroll inside a glass-card-hosted table when the column set
   exceeds viewport width. F-176: promoted from TablesPlayground.razor.css.
   I-060 (Evidens I-044 TASK_11): the host is the containing block of what a hand-built table positions absolutely (a
   header's .visually-hidden label), so it scrolls with the table instead of running past the card (VR7 at 834). */
.table-card--scroll-x {
    overflow-x: auto;
    position: relative;
}

/* I-012 (AD8): inside a scroll-x host the header cells wrap. With ScrollX the table is laid out
   `table-layout: fixed` at the sum of the column Widths, so a long title must break inside its
   column's Width rather than overflow it into the next header (or force the column wider).
   B-054 run 16: `break-word`, not `anywhere`. `anywhere` also lowers the cell's min-content size to one
   character, so in an auto-layout table a short header ("Status") shrinks to a sliver and splits mid-word
   whenever the table is squeezed. `break-word` keeps min-content at the longest word (columns stop there
   and the host scrolls) and still breaks a word that cannot fit its box, i.e. a long title inside a
   fixed-layout column's Width. */
.table-card--scroll-x .ant-table-thead > tr > th {
    white-space: normal;
    overflow-wrap: break-word;
}

/* I-012: a link button in an Ellipsis cell (a list's Subject/Title link) stays inside its column
   and ellipsizes its label. AntD's `.ant-btn` is an inline-block that sizes to its text and its
   `> span` is an inline-block too, so the cell's own text-overflow never reaches the label — the
   cell just clips the button mid-word. Only the label span ellipsizes: an Icon+label button also renders a
   `span.anticon`, which stays inline or the icon stacks above the label (B-054 run 14). */
.table-card--scroll-x .ant-table-cell-ellipsis > .ant-btn {
    max-width: 100%;
}

.table-card--scroll-x .ant-table-cell-ellipsis > .ant-btn > span:not(.anticon) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Pinned (Fixed) table cells: opaque in every host (B-054 run 8; a bare .table-card host since I-060, Evidens I-044
   TASK_08 — a flush table card in a detail tab) ---
   A frozen column must be opaque or the cells scrolling under it show through. overrides.css already paints
   the bare table, but it beats `.table-container .ant-table-tbody > tr > td { background: transparent !important }`
   and the th/hover twins only by source order (equal specificity). One class more in the host prefix wins on
   specificity alone: (0,3,2) at rest, (0,4,2) on row hover (the `.table-container` hover rule is (0,3,2)). */
.glass-card .ant-table-tbody > tr > td.ant-table-cell-fix-left,
.glass-card .ant-table-tbody > tr > td.ant-table-cell-fix-right,
.glass-card .ant-table-thead > tr > th.ant-table-cell-fix-left,
.glass-card .ant-table-thead > tr > th.ant-table-cell-fix-right,
.table-card .ant-table-tbody > tr > td.ant-table-cell-fix-left,
.table-card .ant-table-tbody > tr > td.ant-table-cell-fix-right,
.table-card .ant-table-thead > tr > th.ant-table-cell-fix-left,
.table-card .ant-table-thead > tr > th.ant-table-cell-fix-right,
.table-card .ant-table-tbody > tr:hover > td.ant-table-cell-fix-left,
.table-card .ant-table-tbody > tr:hover > td.ant-table-cell-fix-right,
.table-container .ant-table-tbody > tr > td.ant-table-cell-fix-left,
.table-container .ant-table-tbody > tr > td.ant-table-cell-fix-right,
.table-container .ant-table-thead > tr > th.ant-table-cell-fix-left,
.table-container .ant-table-thead > tr > th.ant-table-cell-fix-right,
.glass-card .ant-table-tbody > tr:hover > td.ant-table-cell-fix-left,
.glass-card .ant-table-tbody > tr:hover > td.ant-table-cell-fix-right,
.table-container .ant-table-tbody > tr:hover > td.ant-table-cell-fix-left,
.table-container .ant-table-tbody > tr:hover > td.ant-table-cell-fix-right {
    background-color: var(--table-pinned-bg) !important;
}

/* --- Pinned header cell tint (CF-099 F-b4-21) ---
   A pinned header cell (the title row and the filter row's pinned cell) is the header row's tint laid over the opaque
   ground above, so it reads as part of the tinted header row, not a body-coloured block at its end. The tint is the
   header rows' own --color-fg-03 (overrides.css `.ant-table-thead > tr > th`); body cells keep the plain ground. Its own
   block: the pinned-cell block holds only the opaque grounds (tests/scripts/app-css-pinned-cell.test.js, CF-099 TASK_52). */
.glass-card .ant-table-thead > tr > th.ant-table-cell-fix-left,
.glass-card .ant-table-thead > tr > th.ant-table-cell-fix-right,
.table-card .ant-table-thead > tr > th.ant-table-cell-fix-left,
.table-card .ant-table-thead > tr > th.ant-table-cell-fix-right,
.table-container .ant-table-thead > tr > th.ant-table-cell-fix-left,
.table-container .ant-table-thead > tr > th.ant-table-cell-fix-right {
    background-image: linear-gradient(var(--color-fg-03), var(--color-fg-03)) !important;
}

/* ========================================
   Table row affordances — expand, edit, sub-records.
   F-176: promoted from TablesPlayground.razor.css. Reusable across every
   feature table that needs expandable rows, ••• action menus, inline-edit
   cells, or sub-tables of child records (invoices line items, audit detail,
   sub-records, etc.).
   ======================================== */

/* Borderless chevron button used to expand a table row. */
.row-expand-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.row-expand-toggle:hover {
    color: var(--color-primary);
}

/* Borderless ellipsis (•••) button that opens a per-row actions dropdown. */
.row-actions-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.row-actions-toggle:hover {
    color: var(--text-primary);
    background: var(--glass-bg-light);
}

/* Cell with a transparent dashed underline that becomes visible on hover —
   the "click to edit inline" affordance. */
.cell-editable {
    cursor: text;
    border-bottom: 1px dashed transparent;
    transition: border-color 150ms ease;
}

.cell-editable:hover {
    border-bottom-color: var(--glass-border-light);
}

/* Inline `<input>` that replaces a .cell-editable in edit mode. */
.cell-edit-input {
    background: var(--glass-bg-light);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font: inherit;
    padding: 2px 6px;
    width: 8rem;
    text-align: right;
}

/* Glass surface revealed below an expanded row. */
.row-expand-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-sm);
    /* A child table wider than a phone scrolls inside its own box — the host card hides overflow, so it was cut
       (I-060, Evidens I-044 Decision 16, VR7: a drill-down table at 390) */
    overflow-x: auto;
}

.row-expand-content__title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-sm);
}

/* Secondary `<table>` rendered inside .row-expand-content for child records
   (line items, sub-rows, audit detail). */
.row-expand-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.row-expand-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 8px;
    border-bottom: 1px solid var(--glass-border);
}

.row-expand-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--glass-border);
}

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

.table-container .ant-table-thead > tr > th {
    background: var(--color-fg-03) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    font-weight: 600;
    /* Table-header tier (I-051 AD-7, F th): 12.5px / 600, sentence case */
    font-size: var(--font-size-caption);
}

.table-container .ant-table-tbody > tr > td {
    background: transparent !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
}

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

.table-container .ant-table-tbody > tr:last-child > td {
    border-bottom: none !important;
}

/* --- Skeleton Rows --- */
.skeleton-row {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.skeleton-row .ant-skeleton-content .ant-skeleton-title {
    background: linear-gradient(90deg, var(--glass-bg-light) 25%, var(--color-fg-08) 50%, var(--glass-bg-light) 75%) !important;
    background-size: 400% 100% !important;
}

.skeleton-row .ant-skeleton-content .ant-skeleton-paragraph > li {
    background: linear-gradient(90deg, var(--glass-bg-light) 25%, var(--color-fg-08) 50%, var(--glass-bg-light) 75%) !important;
    background-size: 400% 100% !important;
}

.skeleton-row .ant-skeleton-avatar {
    background: var(--glass-bg-light) !important;
}

/* --- Pagination --- */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: var(--space-lg);
}

/* A table card's pager row is prototype F's card footer .tcard-f (o.html 954; package 5b, I-053 point 2): the card's
   last row, right-aligned, 12px 16px, a 1px --glass-border rule on top. A list renders its .pagination-container as
   the last child of its .table-card; a pager outside a table card (the /design-system samples) keeps the centred row
   above. A .card-ft wrapper that holds the pager is the row itself (the pager drops its own padding and rule); AntD's
   built-in .ant-table-pagination in a table card is the overrides.css "Table-card footer (I-042)" block. */
.table-card .pagination-container {
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm) var(--space-md-sm);
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

.table-card .pagination-container .ant-pagination {
    margin: 0;
    padding: 0;
}

.table-card > .card-ft:has(> .pagination-container) {
    justify-content: flex-end;
    padding: 12px 16px;
}

.table-card .card-ft > .pagination-container {
    padding: 0;
    border-top: 0;
}

.pagination-container .ant-pagination-item {
    background: var(--glass-bg-light) !important;
    border-color: var(--glass-border) !important;
}

.pagination-container .ant-pagination-item a {
    color: var(--text-secondary) !important;
}

.pagination-container .ant-pagination-item-active {
    border-color: var(--color-primary) !important;
}

.pagination-container .ant-pagination-item-active a {
    color: var(--color-primary-text-strong) !important;
}

.pagination-container .ant-pagination-prev .ant-pagination-item-link,
.pagination-container .ant-pagination-next .ant-pagination-item-link {
    background: var(--glass-bg-light) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-secondary) !important;
}

/* --- Empty State --- */
.ant-empty {
    padding: var(--space-2xl);
}

.ant-empty-description {
    color: var(--text-muted) !important;
}

/* --- Utility Classes --- */
.datetime-cell {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.text-muted {
    color: var(--text-muted);
}

/* Brand-error color utility — destructive menu items, danger labels.
   F-176: promoted from TablesPlayground.razor.css. */
.text-danger {
    color: var(--color-error);
}

/* Brand-success color utility — confirmed precondition checks, positive status icons.
   CF-013: used in CloseYearDrawer precheck list. */
.text-success {
    color: var(--color-success);
}

/* A signed amount's direction: a gain / loss on a detail card, its rail and the modal that shows the same figure
   (I-060, Evidens I-044 README Decision 23 — promoted from a page's scoped copy). Theme-aware tokens: the light block
   darkens both for text on white. */
.amount--gain {
    color: var(--color-success);
}

.amount--loss {
    color: var(--color-error);
}

/* --- Expiry / status chips (F-176: global; used cross-component via ExpiryChipHelper) --- */
.chip-success,
.chip-warning,
.chip-danger,
.chip-muted {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.chip-success {
    background: rgba(var(--color-success-rgb), 0.12);
    color: var(--color-success);
}

.chip-warning {
    background: rgba(var(--color-warning-rgb), 0.12);
    color: var(--color-warning);
}

.chip-danger {
    background: rgba(var(--color-error-rgb), 0.12);
    color: var(--color-error);
}

.chip-muted {
    background: var(--glass-bg-light);
    color: var(--text-muted);
}

.chip-muted--strike {
    text-decoration: line-through;
}

/* Fiscal-year close wizard helpers — used inside the wizard step body.
   CF-013: standalone utilities so step components stay scoped-CSS-free per F-176. */
.precheck-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.precheck-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--color-fg-03);
    border: 1px solid var(--glass-border);
}

.precheck-list__detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.wizard-step__section {
    margin-top: var(--space-lg);
}

.wizard-step__subtitle {
    margin: var(--space-md) 0 var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.wizard-step__actions-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Spacing utilities — F-176: promoted to globals for scoped-CSS-free components. */
.mt-md { margin-top: var(--space-md); }
/* CF-120: a self-contained block of form items (the product drawer's net weight block, D11) keeps the form's rhythm under
   it — `.ant-form-item:last-child` zeroes its last item's margin and a closing .form-hint has none (v16.5 #h-nw 14px). */
.mb-md { margin-bottom: var(--space-md); }

/* Informational list inside a modal (e.g. reopen-blocked dependents).
   CF-013 TASK_13: scoped-CSS-free per F-176. */
.modal-info-list {
    margin: var(--space-sm) 0 0 var(--space-md);
    padding: 0 0 0 var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Right-aligned tabular-numeric cell — money/quantity/% columns in tables.
   F-176: promoted from TablesPlayground.razor.css. */
/* I-032: .amount-cell (heavy-data amounts) shares it; the pattern block adds only the mono face. */
.numeric-cell,
.amount-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.code-badge {
    background: var(--color-fg-06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Glass-surface preformatted text container — diffs, webhook payloads, stack
   traces, JSON previews, SQL viewers, API-key reveal blocks.
   F-176: promoted from AuditLogPlayground.razor.css. */
.code-block {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

/* ========================================
   Alert action slot (CF-097, PLAN AD-5)
   The lock / year-sealed banners write AntD's alert markup with its .ant-alert-action slot (Unlock, the reopen link);
   AntD keeps it beside the text. On a phone it wraps under the text, aligned with it (icon 20px + 12px gap), as the
   prototype's "Lock banner" puts its button below the alert's text, so the text keeps the width.
   ======================================== */
@media (max-width: 480px) {
    .ant-alert:has(> .ant-alert-action) {
        flex-wrap: wrap;
    }

    .ant-alert > .ant-alert-action {
        flex-basis: 100%;
        margin: var(--space-sm) 0 0 32px;
    }
}

/* ========================================
   Detail-page header meta (I-028)
   One label + value (Tag / StatusTag / Badge) chip row under a detail page title.
   Markup: <div class="header-meta"><div class="header-meta__item">
             <span class="header-meta__label">..</span><Tag/></div> ...</div>
   ======================================== */
.header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}

.header-meta__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.header-meta__label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 480px) {
    .header-meta {
        gap: var(--space-sm);
    }
}

/* ========================================================================
   Shell — grouped navigation, context chooser, overlay sidebar (I-024)

   Own classes of the three shell patterns (/design-system#grouped-navigation, #context-chooser,
   #overlay-sidebar). Colours come from tokens only: the chooser trigger sits inside the sidebar's dark
   island and resolves dark in both themes; the chooser panel is rendered at body level and follows the
   page theme. The AntDesign side (SubMenu, MenuItemGroup, the count pill's ink inside a menu item) is in
   overrides.css under .mlekerp-menu.
   ======================================================================== */

/* A collapsible group's title: a real button, so the group opens from the keyboard. It takes the title's
   typography and colour; a title longer than the row ellipsises and leaves the count in place. The focus ring is
   drawn on the whole title row (overrides.css). */
.nav-group-toggle {
    appearance: none;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.nav-group-toggle:focus-visible {
    outline: none;
}

/* Item count beside a group title */
.nav-group-count {
    flex: none;
    margin-left: auto;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    /* No dimming: 0.9 measured 4.21:1 on an open group's title (I-060, Evidens I-044 VR2) — the count takes the title's
       colour, which already passes; the tabular figures and the chevron beside it set it apart */
    opacity: 1;
}

/* Count pill on a menu item, at the right edge. No pill at zero: do not render it. */
.nav-badge {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--color-attention);
    color: var(--color-on-attention);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* The icon rail shows no counts */
.ant-menu-inline-collapsed .nav-badge {
    display: none;
}

/* Line between groups in the icon rail (an <li role="separator"> in the flat rail list). F draws its group heading as
   this dash in the rail (.rail .nav-group: 23 × 1px, radius 6px, 19px from row to row across it — I-051 TASK_05) */
.nav-rail-divider {
    flex: none;
    width: 23px;
    height: 1px;
    margin: 9px auto;
    padding: 0;
    border-radius: 6px;
    list-style: none;
    background: var(--color-fg-08);
    pointer-events: none;
}

/* Context chooser — the trigger button: avatar, title, one or two muted lines, caret */
.context-chooser {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 7px 8px;
    border: 1px solid var(--color-fg-08);
    border-radius: var(--radius-md);
    background: var(--color-fg-06);
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.context-chooser:hover,
.context-chooser[aria-expanded="true"] {
    border-color: var(--color-fg-45);
}

.context-chooser:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.context-chooser__avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--color-nav-active-bg);
    color: var(--color-nav-active);
    font: 700 0.75rem/1 var(--font-display);
    letter-spacing: 0.02em;
}

/* Avatar holding an icon instead of initials ("all entities", the period level) */
.context-chooser__avatar--all {
    font-size: 1rem;
}

.context-chooser__text {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.context-chooser__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.context-chooser__line {
    font-size: 0.75rem;
    line-height: 1.3;
    /* the sidebar's muted label colour, as F's .ctx-t small (--sider-muted, o.html 454) — I-054 */
    color: var(--color-nav-muted);
    overflow-wrap: anywhere;
}

.context-chooser__caret {
    flex: none;
    color: var(--text-muted);
}

/* Rail form: the avatar alone, 44 x 44 */
.context-chooser--rail {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    background: none;
}

.context-chooser--rail .context-chooser__text,
.context-chooser--rail .context-chooser__caret {
    display: none;
}

/* Static form: one entity and nothing to choose (a Solo account's company) — the same block, not a control */
.context-chooser--static,
.context-chooser--static:hover {
    border-color: var(--color-fg-08);
    cursor: default;
}

.context-chooser--static.context-chooser--rail,
.context-chooser--static.context-chooser--rail:hover {
    border-color: transparent;
}

/* The chooser's place in the sidebar: under the logo, above the menu, outside the menu's scroll */
.context-chooser-slot {
    flex: none;
    padding: var(--space-sm) var(--space-sm) 6px;
}

/* In the rail the avatar sits right under the logo, 6px over the menu (F .rail #ctx) */
.context-chooser-slot--rail {
    display: flex;
    justify-content: center;
    padding: 0 0 6px;
}

/* Focus rests here when the overlay sidebar opens and the chooser is not a button (a Solo account): no box
   around the slot */
.context-chooser-slot:focus {
    outline: none;
}

/* Context chooser — the panel: search row, grouped options, optional footer with the period level */
.context-chooser-panel {
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: calc(100vw - 16px);
    background: var(--color-bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel-soft);
    color: var(--text-primary);
    overflow: hidden;
}

.context-chooser-panel__search {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* The shared focus ring, drawn inside the row: the panel clips an outer one */
.context-chooser-panel__search:focus-within {
    box-shadow: inset 0 0 0 2px var(--color-primary-glow);
}

.context-chooser-panel__search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
}

.context-chooser-panel__search input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.context-chooser-panel__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.context-chooser-panel__group {
    padding: 10px 8px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* .is-active = the keyboard / pointer highlight; .is-current = the chosen entity (it also carries a check icon) */
.context-chooser-panel__option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* An option-shaped action in the footer is a button, not an option */
button.context-chooser-panel__option {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
}

button.context-chooser-panel__option:hover {
    background: var(--color-fg-08);
}

button.context-chooser-panel__option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.context-chooser-panel__option.is-active {
    background: var(--color-fg-08);
}

.context-chooser-panel__option.is-current {
    background: var(--color-primary-bg);
}

.context-chooser-panel__option.is-current.is-active {
    background: var(--color-primary-bg-hover);
}

.context-chooser-panel__option > .anticon {
    flex: none;
    color: var(--text-muted);
}

.context-chooser-panel__option.is-current > .anticon {
    color: var(--color-primary-text);
}

.context-chooser-panel__option-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--color-fg-08);
    color: var(--text-secondary);
    font: 700 0.6875rem/1 var(--font-display);
    letter-spacing: 0.02em;
}

.context-chooser-panel__option-avatar--all,
.context-chooser-panel__option.is-current .context-chooser-panel__option-avatar {
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
}

/* Light: the current row is primary-tinted under the avatar's own tint — the doubled tint left the initials at
   4.38 : 1 (I-060, Evidens I-044 VR2); the primary's dark shade keeps them on the brand hue above 4.5 : 1 */
:root[data-theme="light"] .context-chooser-panel__option.is-current .context-chooser-panel__option-avatar {
    color: var(--color-primary-dark);
}

/* Text column of an option: the name, and under it the muted __option-meta line */
.context-chooser-panel__option-name {
    flex: 1;
    min-width: 0;
    display: grid;
    font-weight: 500;
}

.context-chooser-panel__option-name > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.context-chooser-panel__option-meta {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.context-chooser-panel__count {
    flex: none;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--color-fg-08);
    color: var(--text-secondary);
    font: 600 0.75rem/18px var(--font-body);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.context-chooser-panel__empty {
    padding: var(--space-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* The host could not load its rows: said in the list, with a retry, never as "no results" */
.context-chooser-panel__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    text-align: center;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.context-chooser-panel__error .anticon {
    margin-right: 6px;
    color: var(--color-warning);
}

.context-chooser-panel__retry {
    padding: 4px 12px;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.context-chooser-panel__retry:hover {
    background: var(--color-primary-bg);
}

.context-chooser-panel__retry:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.context-chooser-panel__footer {
    flex: none;
    padding: 6px;
    border-top: 1px solid var(--glass-border);
}

/* Period level: label on the left, closed tag + Select on the right; the two halves wrap on a narrow panel */
.context-chooser-panel__period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    padding: 8px 10px 10px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.context-chooser-panel__period > * {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.context-chooser-panel__period > :first-child {
    white-space: nowrap;
}

/* The label takes the row's own type, as F's .ctxp-year label (13px 400 --text-2, o.html 986). The year Select sizes
   to its year, as F's .sel--year (width: auto, o.html 993): with an 88px floor the closed tag + Select no longer fit
   beside the label in the 320px panel and the row wrapped to two lines (I-054 S06, 74px vs F's 48px) */
.context-chooser-panel__period label {
    color: inherit;
    font-weight: 400;
}

/* The year Select is compact, as F's .sel--year (30px, 13px, o.html 993): a footer row, not a form row (I-054). At <=480px
   the I-012 44px lift still wins: it is a min-height. overrides.css carries the same values (I-051, with F's 10px
   padding-left) and loads later — change both together. */
.context-chooser-panel__period .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 30px;
    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;
}

/* The year Select keeps its caret, as F's .sel--year (the .sel chevron, o.html 182): the global "hide the arrow when a
   value is selected" rule (overrides.css, 0,3,0 !important) is for clearable selects, and this one is never clearable
   (I-054 TASK_09; 0,4,0 here, so it wins although app.css loads first) */
.context-chooser-panel__period .ant-select-single.ant-select-show-arrow .ant-select-arrow {
    display: flex !important;
}

.context-chooser-panel__period .context-chooser-panel__period-tag {
    height: 22px;
    margin: 0;
    font-size: 0.75rem;
    line-height: 20px;
}

/* The pattern's rule, under the period row */
.context-chooser-panel__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.context-chooser-panel__note > .anticon {
    flex: none;
    margin-top: 2px;
}

/* Overlay sidebar — the scrim behind the labelled sidebar on narrow screens */
.shell-mask {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--overlay-mask);
    animation: shellMaskIn 0.16s ease-out;
}

/* The labelled sidebar drawn over the content. !important: an AntDesign Sider carries its width as an inline style. */
.main-sider--overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    flex: 0 0 var(--sider-overlay-width) !important;
    width: var(--sider-overlay-width) !important;
    min-width: var(--sider-overlay-width) !important;
    max-width: var(--sider-overlay-width) !important;
    box-shadow: var(--shadow-panel);
    animation: shellSiderIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Opacity only: the fadeIn keyframes that win the cascade (overrides.css) also move their element 10px */
@keyframes shellMaskIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shellSiderIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shell-mask,
    .main-sider--overlay {
        animation: none;
    }
}

/* Touch targets at <=480px: an option row (and the footer action) is 44px high, like every other control */
@media (max-width: 480px) {
    .context-chooser-panel__option {
        min-height: 44px;
    }
}

/* ========================================================================
   Command palette (I-025)

   Own classes of the command palette (/design-system#command-palette): the key hint, the header command
   field and the palette panel. Colours come from tokens only; the header and the palette (a body-level
   modal) both follow the page theme. The AntDesign side — the modal that hosts the panel — is the
   "Command Palette Modal (I-025)" block of overrides.css.
   ======================================================================== */

/* Key hint: the key that does what the text beside it says */
.kbd {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid var(--glass-border-light);
    border-radius: 6px;
    background: var(--glass-bg-subtle);
    color: var(--text-muted);
    font: 500 0.71875rem/1 var(--font-mono);
    white-space: nowrap;
}

/* Command field — the palette's trigger in the header: search icon, text, key hint. line-height: the header's
   own is as tall as the header. */
.command-field {
    flex: 0 1 340px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 7px 0 12px;
    border: 1px solid var(--control-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.command-field:hover {
    border-color: var(--color-primary);
}

.command-field > .anticon {
    flex: none;
    font-size: 1rem;
}

.command-field__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The icon form: a 36px button with the icon alone. Below 1100px every field takes it (the media rule under
   this one); .command-field--icon is the same form asked for by class (the showcase's narrow frame). */
.command-field--icon {
    flex: none;
    width: 36px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    background: transparent;
    color: var(--text-primary);
}

.command-field--icon:hover {
    border-color: var(--glass-border-light);
}

.command-field--icon .command-field__text,
.command-field--icon .kbd {
    display: none;
}

@media (max-width: 1099.98px) {
    .command-field {
        flex: none;
        width: 36px;
        padding: 0;
        justify-content: center;
        border-color: transparent;
        background: transparent;
        color: var(--text-primary);
    }

    .command-field:hover {
        border-color: var(--glass-border-light);
    }

    .command-field__text,
    .command-field .kbd {
        display: none;
    }
}

/* After the icon form, so an open palette marks its trigger in both forms */
.command-field[aria-expanded="true"] {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.command-field:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* In the shell's header the field follows the sidebar toggle at the header's 12px rhythm */
.header-content > .command-field {
    margin-left: 12px;
}

/* The page inside the shell's content. MainLayout keys it on the refresh count, so "Osveži" re-creates the page;
   the wrapper itself has no box, the page lays out as a child of .content-wrapper. */
.page-refresh-scope {
    display: contents;
}

/* Command palette — the panel: input row, grouped list, key-hint footer. The modal that hosts it draws the
   surface, the border, the radius and the shadow. max-height: the modal sits 92px from the top of the
   viewport and keeps 16px under it; the list scrolls inside. */
.command-palette {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 108px);
    color: var(--text-primary);
    animation: commandPaletteIn 0.16s ease-out;
}

.command-palette__input {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    /* The row is F's .pal-in on the 15px body (the modal sets 14px); the input keeps its 16px (I-041 TASK_12) */
    font-size: var(--font-size-body);
    padding: 0 14px 0 18px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: var(--font-size-base); /* F .pal-in sits in the 15px body; the modal content would give it 14px */
}

/* The search icon before the input and the loading icon after it */
.command-palette__input > .anticon {
    flex: none;
    font-size: 1.125rem;
}

.command-palette__input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.command-palette__input input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* The page behind the modal does not scroll when the list reaches its end */
.command-palette__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 8px 8px;
}

/* Group heading: the label, the group's full count and, when the group is shortened, "još N" at the right */
.command-palette__group {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    margin-top: 4px;
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.command-palette__group-count {
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.command-palette__group-more {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

/* A row: icon, label, optional mono text (a PIB), then at the right end the hint and the Enter key hint.
   .is-active = the keyboard / pointer highlight — the only row that shows its key hint. */
.command-palette__option {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 8px 0 10px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
}

.command-palette__option > .anticon {
    flex: none;
    color: var(--text-muted);
    font-size: 1rem;
}

.command-palette__option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.command-palette__option-mono {
    flex: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* The hint never takes more than its share of a row: the label keeps the rest */
.command-palette__option-hint {
    flex: none;
    max-width: 40%;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-size: 0.78125rem;
}

/* The key hint keeps its room on every row, so a row does not shift when the highlight reaches it. Without a
   hint before it, it is the key hint that goes to the right end. */
.command-palette__option > .kbd {
    margin-left: auto;
    visibility: hidden;
}

.command-palette__option-hint + .kbd {
    margin-left: 0;
}

.command-palette__option.is-active {
    background: var(--color-primary-bg);
}

.command-palette__option.is-active > .anticon {
    color: var(--color-primary-text);
}

.command-palette__option.is-active > .kbd {
    visibility: visible;
}

.command-palette__empty {
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* A group whose rows could not be loaded: said in the group, with a retry, never as "no results" */
.command-palette__error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 36px;
    padding: 4px 8px 4px 10px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.command-palette__error > .anticon {
    flex: none;
    color: var(--color-warning);
    font-size: 1rem;
}

.command-palette__retry {
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-primary-text);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.command-palette__retry:hover {
    background: var(--color-primary-bg);
}

.command-palette__retry:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* Key hints: a key (or two) and what it does, three of them */
.command-palette__footer {
    flex: none;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 40px;
    padding: 0 16px;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg-subtle);
    color: var(--text-muted);
    font-size: 0.78125rem;
    overflow: hidden;
}

.command-palette__footer > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

@keyframes commandPaletteIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .command-palette {
        animation: none;
    }
}

/* A phone has no arrow keys: the first key hint (move) gives its room to the other two */
@media (max-width: 640px) {
    .command-palette__footer > span:first-child {
        display: none;
    }
}

/* Touch targets at <=480px: the trigger, a row and the retry are 44px high, like every other control. A row
   with a number (a client: name, PIB, entity type) has no room for all three there: the number identifies
   the row, so the hint goes and the key hint takes the right end. */
@media (max-width: 480px) {
    .command-field {
        width: 44px;
        height: 44px;
    }

    .command-palette__option {
        height: 44px;
    }

    .command-palette__option-mono + .command-palette__option-hint {
        display: none;
    }

    .command-palette__option-mono + .command-palette__option-hint + .kbd {
        margin-left: auto;
    }

    .command-palette__retry {
        min-height: 44px;
    }
}

/* ========================================================================
   Table pattern (I-028)

   Own classes of the table pattern (/design-system#table-pattern): the slim bar over a table that turns into
   the bulk bar while rows are selected, the in-place confirm, the filters in the column headers and the card
   that hosts bar + table (or bar + cards, I-034). Tokens only; nothing here is theme- or brand-specific. The AntDesign side — the
   two-line header cell, the pinned column's edge shadow and the selected row — is the "Table pattern (I-028)"
   block of overrides.css. The filter placement is decided in specs/I-028-TablePattern/FILTER_SPIKE.md.
   ======================================================================== */

/* The card that hosts a bar and a table (.glass-card.table-card) takes its padding and clip from the one .table-card
   rule ("Table section card" below). The table host inside keeps .table-card--scroll-x, so only the table scrolls
   sideways. A select in the bar is 28px high (overrides.css). */

/* A list page's row actions (I-034 TASK_05, ported by I-048): F's 28px / 13px `.btn--sm` (table cells elsewhere keep
   AntD's 24px, overrides.css "Buttons"). Scoped to the list-page archetype's table card. Evidens' list-page cell
   padding is not taken: the cells keep Operans' own .table-card rule (overrides.css "The table pattern's cells",
   I-051 AD-6 / CF-100 TASK_05 — 12px, the first cell 16px in and 0 on its right), measured against the Operans
   prototype, which a heavier list-page rule would override (I-048 PLAN Overlap 14). */
[data-pattern="list-page"] .table-card .ant-table-cell .ant-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 0.8125rem;
}

[data-pattern="list-page"] .table-card .ant-table-cell .ant-btn-sm.ant-btn-icon-only {
    width: 28px;
    padding: 0;
}

/* ... and so is a row action in a detail tab's table (F's run card .btn--sm "Reši", transfer o.html trConflicts): the
   transfer job's Prikaži / Reši (CF-098 TASK_18, O101) */
.detail-tab-section .ant-table-cell .ant-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 0.8125rem;
}

/* Slim bar: row count, reset, switches. Wraps on narrow screens instead of scrolling. */
.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md-sm);
    min-height: 52px;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* A list's status tabs as the table card's first row (InvoiceList, CreditNoteList, SupplierReturnList): the tab labels
   start at the toolbar's inset, the nav's line stays the card's full width (padding on the nav, not the root). Global:
   the class sits on AntD Tabs' own root, which carries no scope attribute, so a page's scoped rule never matched
   (CF-099 F-b10-09). */
.table-card > .status-tabs > .ant-tabs-nav {
    padding: 0 var(--space-md);
}

.table-toolbar__count {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table-toolbar__spacer {
    flex: 1;
}

/* The bulk actions of TableToolbar: a wrapper without a box (the actions stay items of the bar's flex row) that
   goes inert and aria-busy while a bulk call runs */
.table-toolbar__actions {
    display: contents;
}

/* The same bar while rows are selected: tinted with the primary, the actions act on the selection */
.table-toolbar--bulk {
    background: var(--color-primary-bg);
    animation: tableToolbarIn 160ms ease-out;
}

.table-toolbar__selected {
    margin-right: var(--space-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* A label beside a switch in the bar */
.table-toolbar__switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
}

/* I-034: a search in the bar, for a list that has no column to host it (a card list or grid, the chart tree). It
   grows to a quarter of the bar and shrinks before it wraps; its 28px / 13px follow the bar's other controls
   (overrides.css "Table pattern (I-028)"). */
.table-toolbar__search {
    flex: 0 1 260px;
    min-width: 180px;
}

/* A phone: every filter control of the bar takes the whole row, so a bar of several Selects, a period and a search
   stacks evenly — they wrapped half, two-thirds and right-of-an-empty-slot at 390 (CF-099 F-b1-15). The count, the
   reset link and the switches keep their own width */
@media (max-width: 480px) {
    .table-toolbar > .ant-select,
    .table-toolbar > .ant-picker,
    .table-toolbar > .table-toolbar__search,
    .table-toolbar > .table-toolbar__range {
        flex: 1 1 100%;
        min-width: 0;
    }

    .table-toolbar > .table-toolbar__range > .ant-picker {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@keyframes tableToolbarIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .table-toolbar--bulk {
        animation: none;
    }
}

/* In-place confirm: a question and its answers inside the bar, instead of a modal */
.inline-confirm {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.inline-confirm > .anticon {
    color: var(--color-warning);
    font-size: 1rem;
}

/* Header filter: the column title over its control, inside the header cell. The header row's own type
   (uppercase, letter-spaced, 600) stops at the control, which reads as an input, not as a heading. The
   control's AntD sizing (32px, full width) and the header cell's padding are in overrides.css. */
.table-header-filter {
    display: flex;
    flex-direction: column;
    /* F's two header rows: 6px under the titles + 4px over the filter row (I-041 TASK_12) */
    gap: 10px;
    min-width: 0;
}

.table-header-filter__title {
    overflow-wrap: break-word;
}

.table-header-filter__control {
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* I-034 (ported by I-048): the card list / card grid form of the pattern (TicketList, FeatureRequestList): the same
   .glass-card.table-card and slim bar, then this body in place of the table host, with F's .card-b inner padding.
   Padding only: the cards, and whether they stack or tile, stay the page's own. The empty faces render inside it;
   the pager stays outside the card. */
.table-card__cards {
    padding: var(--space-md) 20px 18px;
}

/* CF-099 F-b19-01 / -08 / -11 — the card list's row (TicketList, FeatureRequestList). A row is a flat tile of the card
   body, as the showcase's #table-card-list row: hairline border, the subtle fill, --radius-sm; no blur, shadow, lift or
   entrance animation (design.md § Card list: a card never sits inside the card). The head holds the record number,
   which never breaks (F-b19-08), and the tags, which wrap under it when the row is narrow; the meta is one wrapping
   line. Was each page's scoped .ticket-card / .fr-card glass card. */
.card-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.card-list__row {
    padding: 12px var(--space-md);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.card-list__row:hover {
    border-color: var(--glass-border-light);
    background: var(--glass-bg-light);
}

.card-list__row:focus-visible {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* A row with news for the user (a ticket's unread support reply): the attention stripe on its leading edge */
.card-list__row--unread {
    border-left: 3px solid var(--color-attention);
}

.card-list__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-xs);
}

.card-list__ref {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.card-list__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.card-list__tags > .ant-tag {
    margin-inline-end: 0;
}

.card-list__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.card-list__desc {
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-list__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-lg);
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.card-list__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-list__meta .anticon {
    font-size: 14px;
}

/* A meta item that is "on" for the user (a request they voted for): its icon in the primary */
.card-list__meta-item--on .anticon {
    color: var(--color-primary);
}

.card-list__preview {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-list__flag {
    display: inline-block;
    margin-top: var(--space-sm);
}

/* CF-099 F-b19-01 (VR1's computed read, TASK_49 reach): a glass element of a bare page — a stat card, a loading box, the
   logo preview — that sits inside a card surface is a flat tile of that card (the subtle fill, no backdrop blur), never a
   second glass card in the card. Reaches SelfSupplyPeriodCard's and the packaging import preview's stat cards, Billing's
   documents-tab loading box and OrganizationSettings' logo preview; the same classes on a bare page keep their glass. */
:is(.glass-card, .filter-card, .entity-drawer) :is(.stat-card, .loading-container, .image-upload-field__preview) {
    background: var(--glass-bg-subtle);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* The loading face of a card list: one skeleton per row, drawn as the row it stands for (flat, not the glass
   .skeleton-row surface of a bare page) */
.card-list > .skeleton-row {
    padding: 12px var(--space-md);
    background: var(--glass-bg-subtle);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-sm);
}

/* A titled text span in an Ellipsis cell that ellipsizes itself: as a block its box ends at the cell edge. Inline, its
   text box ran on under the cell's clip and under the pinned column beside it (VR5 at 1440 with every column fitting —
   I-060, Evidens I-044 README Decision 22); on screen the same "…" (the heavy-data twin is .heavy-data-cell--ellipsis). */
.cell-ellipsis {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Two parts in one cell (a label, then muted detail): a row of two ellipsizing parts, the label first and whole as long
   as it fits — so the detail's box ends at the cell edge too */
.cell-ellipsis--split {
    display: flex;
    gap: var(--space-xs);
}

.cell-ellipsis--split > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-ellipsis--split > :first-child {
    flex-shrink: 0;
    max-width: 100%;
}

/* A name and its type tag on one line (CF-099 F-b6-15, BankAccountList's account + Blagajna tag): the name ellipsizes — its
   title carries it whole (VR6) — and the tag keeps its whole label beside it, so the row stays one line */
.cell-ellipsis--tag {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    min-width: 0;
}

.cell-ellipsis--tag > :first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-ellipsis--tag > .ant-tag {
    flex: none;
    margin-inline-end: 0;
}

/* One tag that can be longer than its column (Evidens I-034 TASK_11, ported by I-048): the tag stays inside the cell
   and keeps its WHOLE label — it wraps onto a second line instead of ellipsizing (I-060, Evidens I-044 TASK_08: a long
   category label cut short no longer scans, and a title does not make it whole — VR6). The one shared helper for a tag
   in a narrow cell; opt-in, so no other cell tag changes (the inline-block needs vertical-align, or the tag drops to
   its bottom edge's baseline). */
.cell-tag-fit {
    min-width: 0;
    max-width: 100%;
}

/* CF-099 F-b7-14: a column of names that breaks only between words, never inside one (AntD's cells break-word) — the
   column is sized so its longest name holds two lines (ShipmentList's Vozač). F-b11-04: WorkOrderDetail's Active / Locked
   lines (a hand-built it--form grid with the actuals inputs — the product, the quantity over its unit, the figure headers:
   a header that wraps with no th-wrap floor) */
.ant-table-cell.cell-wrap-words,
:is(table.it--fit, table.it--form, table.it--dense) > :is(thead, tbody) > tr > :is(th, td).cell-wrap-words {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

/* CF-099 F-b7-16: the route plan's crew rows fit a phone modal — at ≤ 480px the vehicle and driver Selects share the row
   (the line grid's 240px floor of a wide cell is dropped), so the driver and the remove action are never past the body */
@media (max-width: 480px) {
    table.route-plan-crews > tbody > tr > td.cell-wide {
        min-width: 0;
        width: 50%;
    }

    table.route-plan-crews > tbody > tr > td.cell-wide .ant-select {
        width: 100%;
    }
}

.cell-tag-fit > .ant-tag {
    max-width: 100%;
    height: auto;
    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: middle;
    margin-inline-end: 0;
}

/* Table pattern cells and KPI row (CF-100) — the prototype's Table screen: a bold truncating name (`.cname`), a mono
   one-line figure (`.cell-mono`), a right-aligned note under a price (`.cell-note`: clock icon, "830,00 od 19.10.")
   and the row's actions side by side (`.row-actions`); the four KPI cards are `.stat-card`s without an icon whose
   value takes the status hue (`.stat-value--success|muted|warning|error`). Tokens only, so both themes follow. */
.cname {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.cell-mono {
    font-family: var(--font-mono);
    font-size: 0.875em; /* F .mono: 12.25px in a 14px cell */
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* F's mono column (td.mono — a run's stamp, transfer o.html trRunsCard): the column's Class="mono", which AntD puts on the
   th and every td; only the body cells take it, the header stays the table's (CF-098 TASK_18, O19) */
.ant-table-tbody > tr > td.mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cell-note {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-xs);
    margin-top: 2px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

/* Table pattern, document list (CF-100 AD-5) — the prototype's Orders screen: a two-line cell (`.cell-2`: the name over
   a small muted code), the period range on the right of the slim bar (`.table-toolbar__range`: a muted label, then the
   picker) and the card's footer pager (`.table-card .pagination-container`, I-042: "1–20 / 164", the pages, "20 po
   strani" — the `.table-pager__total` spans). Tokens only. */
.cell-2 {
    display: grid;
    min-width: 0;
    line-height: 1.3;
}

/* A cell-2 line that carries a tag after its text (CF-099 F-b14-16 — the open-items match legs' Storno, F's openitems row
   "no + ' ' + tag"): one row, the text then F's compact tag (18px, 11px) that takes no more of the line than the text, so
   the row keeps the two-line cell's height (O102's td) */
.cell-2__line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cell-2__line > .ant-tag {
    height: 18px;
    margin-block: -1px;
    margin-inline-end: 0;
    padding: 0 6px;
    font-size: 11px;
    line-height: 16px;
}

/* The small line is muted with no inline offset (Evidens I-038, F .cell-2 small) — one rule for the document lists and
   the line grid (I-049 Overlap 6); the grid's own extras are .it--form .cell-2 in "Document pages (I-038)". */
.cell-2 > small {
    margin-left: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* A record link inside a cell or a key fact (F .cell-link — the order number on otp): the text colour until hovered, then
   the accent text underlined; the global :focus-visible ring stays. Compose with .mono for a number (CF-097 TASK_05). */
.cell-link {
    color: inherit;
    text-decoration: none;
}

.cell-link:hover {
    color: var(--color-primary-text);
    text-decoration: underline;
}

.table-toolbar__range {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
}

.table-toolbar__range > .text-muted {
    font-size: var(--font-size-caption); /* F .tbar .dim: 12.5px */
}

.table-pager__total {
    font-size: 0.84375rem; /* F .pag: 13.5px */
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-value--success {
    color: var(--color-success);
}

.stat-value--muted {
    color: var(--text-muted);
}

.stat-value--warning {
    color: var(--color-warning);
}

/* The error hue of a mini KPI value (CF-092: the import preview's error counter; prototype --c: var(--err)) */
.stat-value--error {
    color: var(--color-error);
}

/* The mini KPI row over a list's table (CF-100, F .mini-stats / .mini; Evidens I-041's .stat-card--mini has the same
   radius and 14 / 16px padding, I-048): cards 16px in, the card radius, a 24px value over a 13px label, 12px apart. Icon-less stat cards, so the value / label stack is the card's own grid. */
.dashboard-stat-grid--mini {
    gap: var(--space-md-sm);
}

.stat-card--mini {
    padding: 14px var(--space-md);
    border-radius: var(--radius-lg);
}

.stat-card--mini > .stat-value {
    font-size: 1.5rem;
    line-height: 1.2;
}

.stat-card--mini > .stat-label {
    font-size: 0.8125rem;
}

/* ========================================================================
   Work queue (I-029)

   Own classes of the work-queue pattern (/design-system#work-queue): the prioritised list of open items — tabs
   with counts, urgency bands with their marks, rows that open their item, folded groups, the show-more row and
   the skeleton — beside its side rail; and the headline sentence above it (catalogued under typography).
   Tokens only, both themes through the token blocks: overdue and critical take the error hue (the solid fill
   --color-error with --color-on-error ink, the -light shade for rings, tints and text), warning takes the
   warning hue (--color-warning-light, which is a dark shade on light), upcoming the neutral text. Nothing here
   assumes the primary's hue. The four marks differ in shape as well as colour: solid square, ring, solid
   circle, hollow circle. Measured from prototype F (f.src.html l.225-283, 492, 875-909).
   ======================================================================== */

/* Headline: one computed sentence above the queue; its lead clause is underlined in the primary */
.headline-sentence {
    max-width: 34em;
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 1.3125rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.005em;
    text-wrap: pretty;
}

.headline-sentence__hl {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* While the queue loads: two skeleton bars in place of the sentence */
.headline-sentence--loading {
    display: grid;
    gap: 10px;
    max-width: 640px;
}

/* Skeleton bars of the headline and the queue: the AntD skeleton's shimmer (overrides.css "Skeleton
   Overrides", keyframes skeletonShimmer) on a plain element, so a row keeps the queue's own grid while
   it loads. No animation under reduced motion. Also the chart card's bars (I-030). */
.headline-sentence__bar,
.work-queue__sk,
.chart-card__sk {
    display: block;
    flex: none;
    max-width: 100%;
    height: 14px;
    border-radius: var(--radius-xs);
    background: linear-gradient(90deg, var(--color-fg-06) 25%, var(--color-fg-12) 50%, var(--color-fg-06) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.headline-sentence__bar {
    width: 100%;
    height: 20px;
}

.headline-sentence__bar:last-child {
    width: 62%;
}

/* Page body of the queue view: the queue and its rail. Below 1280px the rail sits under the queue. */
.work-queue-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

/* The queue column is a size container: its rows reflow on the column's width, not the viewport's */
.work-queue {
    min-width: 0;
    container: work-queue / inline-size;
}

/* Tabs: one per item kind, each with its count; arrow keys move between them (role=tablist) */
.work-queue__tabs {
    display: flex;
    gap: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.work-queue__tabs::-webkit-scrollbar {
    display: none;
}

.work-queue__tab {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    height: 44px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.work-queue__tab::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: transparent;
}

.work-queue__tab:hover {
    color: var(--text-primary);
}

.work-queue__tab[aria-selected="true"] {
    color: var(--color-primary-text);
    font-weight: 600;
}

.work-queue__tab[aria-selected="true"]::after {
    background: var(--color-primary);
}

.work-queue__tab:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--color-primary-glow);
}

/* The count pill (also the matrix totals' row count, .obligations-matrix__count, and a heavy-data group row's count,
   .heavy-data-group-row__count — prototype F's .cnt) */
.work-queue__tab-count,
.obligations-matrix__count,
.heavy-data-group-row__count {
    display: inline-block;
    flex: none;
    vertical-align: middle;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg-light);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* F's .cnt is --glass-2: the 8 % wash on dark, a white pill on light (CF-086 TASK_06). Before the selected rule, which
   wins at the same specificity */
:root[data-theme="light"] .work-queue__tab-count,
:root[data-theme="light"] .obligations-matrix__count {
    background: var(--glass-bg);
}

.work-queue__tab[aria-selected="true"] .work-queue__tab-count {
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
}

/* On a page (the home page's queue) the tabs sit on the ground's warm glow, not on a card: on light the plain primary
   reaches only 4.1 : 1 there (3.7 : 1 for the count on its tint), its dark shade 5.2 : 1 / 4.6 : 1 (CF-086 TASK_03).
   The label takes 60 % of the dark shade into the primary: 4.8 : 1 at the glow's strongest, within ΔE 1.6 of F's light
   --accent-text (the fidelity checker, CF-086 TASK_06); the count on its tint needs the dark shade itself */
:root[data-theme="light"] .work-queue__tab[aria-selected="true"] {
    color: color-mix(in srgb, var(--color-primary-text-strong) 60%, var(--color-primary));
}

:root[data-theme="light"] .work-queue__tab[aria-selected="true"] .work-queue__tab-count {
    color: var(--color-primary-text-strong);
}

/* Bands: Probijen rok, Hitno, Uskoro, Predstojeće — an empty band is not rendered */
.work-queue__band {
    margin-top: 22px;
}

.work-queue__band-head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 10px 4px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    scroll-margin-top: var(--space-md);
}

.work-queue__band-count {
    color: var(--text-muted);
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* Urgency marks (band heads, rail): shape and colour */
.work-queue__mark {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--text-muted);
}

.work-queue__mark--overdue {
    background: var(--color-error);
}

.work-queue__mark--critical {
    background: transparent;
    box-shadow: inset 0 0 0 2.5px var(--color-error-light);
}

.work-queue__mark--warning {
    border-radius: 50%;
    background: var(--color-warning-light);
}

.work-queue__mark--upcoming {
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--text-muted);
}

/* The rows of one band: a glass card list, rows separated by a hairline */
.work-queue__list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.work-queue__list > li + li {
    border-top: 1px solid var(--glass-border);
}

/* A row: icon tile, title over client · meta, days (or the "kasni" pill, or a tag), Otvori */
.work-queue__row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto 76px;
    grid-template-areas: "ic main days act";
    align-items: center;
    column-gap: 14px;
    min-height: 64px;
    padding: 10px var(--space-md);
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.work-queue__row:hover {
    background: var(--glass-bg-subtle);
}

/* A folded group is a <button> row: N items of one kind and date in one band */
button.work-queue__row {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
}

button.work-queue__row:hover {
    background: var(--glass-bg-subtle);
}

button.work-queue__row:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--color-primary-glow);
}

.work-queue__icon {
    grid-area: ic;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-fg-08);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* The overdue / critical tile is F's --err at 14 % with the icon in it (a mark: --color-error-mark) */
.work-queue__row--overdue .work-queue__icon,
.work-queue__row--critical .work-queue__icon {
    background: color-mix(in srgb, var(--color-error-mark) 14%, transparent);
    color: var(--color-error-mark);
}

.work-queue__row--warning .work-queue__icon {
    background: color-mix(in srgb, var(--color-warning-light) 14%, transparent);
    color: var(--color-warning-light);
}

.work-queue__row--upcoming .work-queue__icon {
    background: var(--color-fg-08);
    color: var(--text-secondary);
}

.work-queue__main {
    grid-area: main;
    display: grid;
    gap: 1px;
    min-width: 0;
}

.work-queue__title {
    min-width: 0;
    overflow: hidden;
    font-size: 0.90625rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-queue__sub {
    display: flex;
    gap: 6px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.work-queue__client,
.work-queue__meta {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-queue__meta,
.work-queue__dot {
    color: var(--text-muted);
}

.work-queue__row--group .work-queue__client {
    color: var(--text-primary);
    font-weight: 600;
}

.work-queue__days {
    grid-area: days;
    justify-self: end;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Overdue: the days in a solid error pill with a warning icon */
.work-queue__late {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px 0 8px;
    border-radius: 12px;
    background: var(--color-error);
    color: var(--color-on-error);
    font-size: 0.78125rem;
    font-weight: 700;
}

/* An undated row's state (SEF "Greška"): the error tint with its own icon */
.work-queue__tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    height: 22px;
    padding: 0 var(--space-sm);
    border: 1px solid color-mix(in srgb, var(--color-error-light) 45%, transparent);
    border-radius: var(--radius-xs);
    background: color-mix(in srgb, var(--color-error-light) 13%, transparent);
    color: color-mix(in srgb, var(--color-error-light) 68%, var(--text-primary));
    font-size: 0.75rem;
    font-weight: 600;
}

/* An item's document state (WorkQueueItem.StateTag, e.g. a CF-082 StatusTag) before its days or late pill, 6px apart */
.work-queue__state {
    display: inline-flex;
    align-items: center;
    margin-inline-end: 6px;
    vertical-align: middle;
}

.work-queue__state .ant-tag {
    margin-inline-end: 0;
}

.work-queue__act {
    grid-area: act;
    justify-self: end;
    display: flex;
}

/* Otvori (and the matrix's Izaberi): an anchor, so middle-click opens a tab and the target is an href, with the
   tokens of the small default button (overrides.css § Buttons, I-036 F .btn--sm): the glass fill, the
   --glass-border-light border, --text-primary ink, 6px radius; hover and keyboard focus recolour the border
   (--color-primary-light) and the ink (--color-primary-text), focus adds the glow ring. Not <Button Href Size=Small>: a small Button outside a table cell fails design-lint button-size,
   and the row needs this 28px size. */
.work-queue__open,
.obligations-matrix__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--glass-border-light);
    border-radius: 6px;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.work-queue__open:hover,
.work-queue__open:focus-visible,
.obligations-matrix__open:hover,
.obligations-matrix__open:focus-visible {
    border-color: var(--color-primary-light);
    color: var(--color-primary-text);
    text-decoration: none;
}

.work-queue__open:focus-visible,
.obligations-matrix__open:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* A child row's Otvori: the text-button form (no fill, no border until hovered) */
.work-queue__open--text {
    border-color: transparent;
    background: transparent;
}

.work-queue__chev {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.work-queue__row--group[aria-expanded="true"] .work-queue__chev {
    transform: rotate(180deg);
}

/* The children of an expanded group: two columns of client + Otvori */
.work-queue__kids {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    margin: 0;
    padding: 6px var(--space-md) 10px 66px;
    list-style: none;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg-subtle);
}

.work-queue__kids[hidden] {
    display: none;
}

.work-queue__kid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 38px;
    font-size: 0.875rem;
}

.work-queue__kid > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The selected tab has no item */
.work-queue__none {
    margin: 0;
    padding: 28px 4px;
    color: var(--text-muted);
}

/* "Prikaži još": the next page of rows, under the last band */
.work-queue__more {
    display: flex;
    justify-content: center;
    margin-top: var(--space-md);
}

/* Compact list (a narrow column, e.g. an overview card): shorter rows, smaller tiles. The row modifier
   (.work-queue__row--compact) gives a single row the same form — the needs-attention strip's rows (I-030). */
.work-queue__list--compact .work-queue__row,
.work-queue__row--compact {
    min-height: 52px;
    padding: 7px 14px;
    column-gap: 12px;
}

.work-queue__list--compact .work-queue__icon,
.work-queue__row--compact .work-queue__icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
}

.work-queue__list--compact .work-queue__title,
.work-queue__row--compact .work-queue__title {
    font-size: 0.875rem;
}

.work-queue__list--compact .work-queue__sub,
.work-queue__row--compact .work-queue__sub {
    font-size: 0.78125rem;
}

/* A narrow queue column: a row takes two lines, the days under the title; an empty days cell goes away */
@container work-queue (max-width: 520px) {
    .work-queue__row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-areas:
            "ic main act"
            "ic days act";
        row-gap: 6px;
    }

    .work-queue__icon {
        align-self: start;
    }

    .work-queue__days {
        justify-self: start;
    }

    .work-queue__days:empty {
        display: none;
    }

    .work-queue__sub {
        flex-wrap: wrap;
        row-gap: 0;
    }

    /* Two lines are the narrow row's budget: client and meta wrap whole — an amount is never cut (I-060, Evidens I-044
       VR6) */
    .work-queue__client,
    .work-queue__meta {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .work-queue__kids {
        grid-template-columns: minmax(0, 1fr);
        padding-left: var(--space-md);
    }
}

/* Loading: the same tabs, bands and rows with skeleton bars (.work-queue__sk + a size modifier) in place of the
   text; aria-busy on the block and a visually hidden status name it */
.work-queue--loading .work-queue__row:hover {
    background: none;
}

.work-queue--loading .work-queue__icon {
    background: none;
}

.work-queue--loading .work-queue__main {
    gap: var(--space-sm);
}

.work-queue__sk--tile {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.work-queue__sk--title {
    width: 46%;
}

.work-queue__sk--sub {
    width: 64%;
    height: 11px;
}

.work-queue__sk--days {
    width: 64px;
}

.work-queue__sk--act {
    width: 62px;
    height: 28px;
}

.work-queue__sk--tab {
    width: 56px;
}

.work-queue__sk--count {
    width: 22px;
    height: 20px;
}

.work-queue__sk--mark {
    width: 10px;
    height: 10px;
}

.work-queue__sk--band {
    width: 110px;
    height: 10px;
}

.work-queue__sk--line {
    width: 80%;
}

/* Side rail: Otvorene stavke (band counts), Raspored posla (owner only), Obaveštenja. Under the queue it is a
   two-column card grid with the notifications card spanning both rows; at 1280px and up a 320px column. */
.work-queue-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    align-items: start;
    min-width: 0;
}

.glass-card.work-queue-rail__card {
    padding: var(--space-md) 18px;
}

.work-queue-rail > .work-queue-rail__card:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.work-queue-rail__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.work-queue-rail__head h2,
.work-queue-rail__head h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.work-queue-rail__total,
.work-queue-rail__head small {
    color: var(--text-muted);
    font-size: 0.78125rem;
    font-variant-numeric: tabular-nums;
}

/* A rail row (button or link): mark or icon, label, the count in bold at the end; muted and inert at 0 */
.work-queue-rail__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% + 16px);
    min-height: 36px;
    margin-inline: -8px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.work-queue-rail__item:hover {
    background: var(--glass-bg-light);
    color: var(--text-primary);
    text-decoration: none;
}

/* The selected row of a filter card ("Po magacinu"): the hover background, semibold; the focus ring is unchanged */
.work-queue-rail__item[aria-pressed="true"] {
    background: var(--glass-bg-light);
    font-weight: 600;
}

.work-queue-rail__item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--color-primary-glow);
}

.work-queue-rail__item:disabled,
.work-queue-rail__item[aria-disabled="true"] {
    background: none;
    color: var(--text-muted);
    cursor: default;
}

.work-queue-rail__item > b {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.work-queue-rail__item > .anticon {
    color: var(--color-warning-light);
}

/* Workload: a member's name, then four numbers */
.work-queue-rail__member {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.work-queue-rail__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-sm);
    margin: 10px 0 var(--space-sm);
}

.work-queue-rail__stats dt {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-queue-rail__stats dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

/* Two columns whose labels wrap (the rail's "Danas" card — prototype .wl-stats--wrap) */
.work-queue-rail__stats--wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
}

.work-queue-rail__stats--wrap dt {
    white-space: normal;
}

/* A notification: level dot (warning circle, error square), title, body, date */
.work-queue-rail__note {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
}

.work-queue-rail__note + .work-queue-rail__note {
    border-top: 1px solid var(--glass-border);
}

.work-queue-rail__note > i {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--color-warning-light);
}

.work-queue-rail__note--error > i {
    border-radius: 2px;
    background: var(--color-error-light);
}

.work-queue-rail__note b {
    display: block;
    font-size: 0.84375rem;
    font-weight: 600;
}

.work-queue-rail__note span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.work-queue-rail__note time {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.work-queue-rail__link {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-underline-offset: 3px;
}

/* The lede above the queue: the headline sentence, the view switch beside it (under it when narrow) */
.work-queue-lede {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* The queue column when it carries a note under the queue (e.g. "first 2000 items shown") */
.work-queue-layout__main {
    display: grid;
    gap: var(--space-sm);
    min-width: 0;
}

.work-queue__truncated {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* The dashboard header's freshness: the "updated just now" pill (fades out over 3 s) and the last-updated time.
   Moved from the deleted App/Pages/Index.razor.css (I-029 TASK_09). */
.updated-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success);
    background: var(--color-success-bg);
    border: 1px solid var(--color-success);
    border-radius: 999px;
    animation: updatedPillFade 3s ease-in-out forwards;
}

@keyframes updatedPillFade {
    0% { opacity: 0; transform: translateY(-4px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-4px); }
}

.last-updated-text {
    margin-top: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-variant-numeric: tabular-nums;
}

/* A scope note under the page subtitle, e.g. "Magacin MP-01 — naplata i e-fakture su za celu firmu" (prototype .xnote):
   a 13px muted line with a 14px icon */
.page-header__note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: var(--space-xs) 0 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.page-header__note > .anticon {
    flex: none;
    font-size: 0.875rem;
}

/* The activity view: a card holding a wide AntD Timeline (prototype .act-card / .tl--wide); the timeline's dots,
   tails and content come from the global .ant-timeline rules in overrides.css */
.activity-card {
    padding: 4px 0 8px;
}

/* No divider under the activity head (prototype v16.1 .act-card .mx-hd { border-bottom: 0 }) */
.activity-card > .obligations-matrix__head {
    border-bottom: 0;
}

.activity-card .timeline--wide {
    padding: 16px 22px 4px;
}

/* The item's own ink is the text colour (F's li; AntD leaves its 88 % black on the li) and its dot is F's .ok mark */
.timeline--wide .ant-timeline-item {
    color: var(--text-primary);
    font-size: 0.90625rem;
}

.timeline--wide .ant-timeline-item-head-green,
.timeline--wide .ant-timeline-item-head[style*="border-color:green"] {
    border-color: var(--color-status-operational) !important;
    background: var(--color-status-operational) !important;
}

.timeline--wide time,
.timeline--wide .timeline-event__time {
    margin-top: 2px;
    font-size: var(--font-size-caption);
}

@media (min-width: 1280px) {
    .work-queue-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
    }

    /* A view without the rail (calendar, matrix) spans the content width */
    .work-queue-layout--full {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-queue-rail {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-queue-rail > .work-queue-rail__card:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 1100px) {
    .headline-sentence {
        font-size: 1.1875rem;
    }
}

@media (max-width: 640px) {
    .work-queue-rail {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-queue-rail > .work-queue-rail__card:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .headline-sentence__bar,
    .work-queue__sk,
    .chart-card__sk {
        animation: none;
    }

    .updated-pill {
        animation: none;
    }

    .work-queue__chev {
        transition: none;
    }
}

/* ========================================================================
   Obligations matrix (I-029)

   Own classes of the status chip (/design-system#status-chip) and of the client-by-obligation matrix
   (/design-system#obligations-matrix), which is the table pattern (I-028) with a header of its own: a
   .glass-card.table-card.obligations-matrix hosts the head, then .table-card--scroll-x > Table. The pinned
   client and Izaberi columns reuse the I-028 pinned background and overflow-only edge shadow; the AntDesign
   side (cell padding, min-width, the totals row, the phone rule) is the "Obligations matrix (I-029)" block
   of overrides.css. A chip never relies on colour alone: each tone has its own icon or shape (README
   Decision 4). Prototype F l.300-327, 355-370, 887, 911.
   ======================================================================== */

/* Status chip: one obligation's state in a cell — icon or dot, an optional bold count, the date, the days.
   Upcoming is the default look; the tones re-point --status-chip-hue. */
.status-chip {
    --status-chip-hue: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--glass-border-light);
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78125rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.status-chip__dot {
    flex: none;
    width: 8px;
    height: 8px;
    border: 1.5px solid var(--text-muted);
    border-radius: 50%;
}

.status-chip__count {
    font-weight: 700;
}

.status-chip__detail {
    color: var(--text-muted);
    font-weight: 500;
}

/* F .chip--overdue: --err-solid (= --color-error-mark in both themes) with --on-err ink — was --color-error, which the
   O22 pair never compared until CF-099 TASK_13 calibrated its chip keys variant against variant */
.status-chip--overdue {
    border-color: var(--color-error-mark);
    background: var(--color-error-mark);
    color: var(--color-on-error-mark);
}

.status-chip--critical {
    --status-chip-hue: var(--color-error-mark);
}

.status-chip--warning {
    --status-chip-hue: var(--color-warning-light);
}

.status-chip--critical,
.status-chip--warning {
    border-color: color-mix(in srgb, var(--status-chip-hue) 45%, transparent);
    background: color-mix(in srgb, var(--status-chip-hue) 13%, transparent);
    color: color-mix(in srgb, var(--status-chip-hue) 68%, var(--text-primary));
}

.status-chip--overdue .status-chip__detail,
.status-chip--critical .status-chip__detail,
.status-chip--warning .status-chip__detail {
    color: inherit;
}

.status-chip--upcoming {
    border-color: var(--glass-border-light);
    color: var(--text-secondary);
}

/* In the matrix the chips sit seven columns abreast: a 7px side and 5px inner gap keep all six obligation columns
   inside the card at 1440 */
.obligations-matrix .status-chip:not(.status-chip--muted) {
    gap: 5px;
    padding: 0 7px;
}

/* Nothing open: the dash, no chip box */
.status-chip--muted {
    height: auto;
    padding: 0;
    border: 0;
    color: var(--text-muted);
    font-weight: 400;
}

/* Matrix head: title, small subtitle, legend, then the Sve / Samo otvorene stavke filter at the right */
.obligations-matrix__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px var(--space-md);
    padding: 12px 14px 12px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.obligations-matrix__title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.obligations-matrix__subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.obligations-matrix__spacer {
    flex: 1;
}

.obligations-matrix__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--text-secondary);
    font-size: 0.78125rem;
}

.obligations-matrix__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.obligations-matrix__legend-item::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xs);
}

.obligations-matrix__legend-item--overdue::before {
    border-color: var(--color-error-mark);
    background: var(--color-error-mark);
}

.obligations-matrix__legend-item--open::before {
    border-color: color-mix(in srgb, var(--color-warning-light) 50%, transparent);
    background: color-mix(in srgb, var(--color-warning-light) 16%, transparent);
}

/* The pinned first column: client name (ellipsis, full name in its title) + entity tag. Capped so the column stays
   at its 240px Width (18px + 8px cell padding): a long name never pushes the obligation columns out of the card at
   1440 */
.obligations-matrix__client {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    max-width: 214px;
}

.obligations-matrix__client-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Totals row ("Ukupno"): counts and sums over the visible rows; the RFZO total turns error-coloured when any RFZO
   deadline is overdue. The row's surface and pinned cells are in overrides.css. */
.obligations-matrix__totals {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.obligations-matrix__total--error {
    color: var(--color-error-light);
}

@media (max-width: 1100px) {
    .obligations-matrix__legend {
        display: none;
    }
}


/* ========================================================================
   Chart card (I-030)

   Own classes of the chart-card pattern (/design-system#chart-card) and its companions on the client overview:
   the chart card (eyebrow, one computed headline, the plot, direct labels, a visually hidden summary table,
   legend, "Prikaži sve"; empty, sparse and loading faces) and its grid; the needs-attention strip (the compact
   form of the work queue, /design-system#work-queue); the ruled counts row. (Evidens' client-overview page rules are
   not ported: they are Evidens wiring, I-047.)
   Tokens only, both themes through the token blocks; nothing here assumes the primary's hue. The canvas charts
   cannot read these tokens — App/Components/ChartPalette.cs mirrors them (TASK_03); these rules style only the
   HTML around the chart. Measured from prototype F (f.src.html l.487-544, 874).
   ======================================================================== */

/* The grid of chart cards: one column, two from a 1200px viewport. An ancestor declared
   `container: chart-grid-host / inline-size` that is narrower than 900px keeps one column (a narrow panel; the
   showcase's 834px frame). */
.chart-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
}

@media (min-width: 1200px) {
    .chart-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@container chart-grid-host (max-width: 899px) {
    .chart-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-md);
    }
}

/* The card: a .glass-card (its surface is not restyled here), a flex column: the plot sits right under the headline,
   and a card shorter than its grid-row neighbour keeps the spare height below its legend (never a blank band above
   the plot — I-030 merge gate) */
.chart-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--space-md) 20px 14px;
}

/* Eyebrow row: the card's name (h2) and "Prikaži sve" */
.chart-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}

.chart-card__eyebrow {
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chart-card__link {
    margin-left: auto;
    color: var(--color-primary-text);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.chart-card__link:hover {
    color: var(--color-primary-text);
}

.chart-card__link:focus-visible {
    outline: none;
    border-radius: 2px;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* The computed one-line headline: the figures in <strong>, a status tag may follow */
.chart-card__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.4;
}

.chart-card__headline strong {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Body: right under the headline; the plot host (role="img", aria-label = the headline) has a fixed height so a
   chart never jumps while it draws. Its text colour is the axis colour of a static or SVG plot. */
.chart-card__body {
    padding-top: 14px;
    min-width: 0;
}

.chart-card__plot {
    height: 220px;
    min-width: 0;
    overflow: hidden;
    color: var(--text-muted);
}

.chart-card__plot--sm {
    height: 160px;
}

/* The unit of a month chart's values ("hilj. RSD"), written once above the plot, left-aligned and horizontal —
   prototype F's plot text (11.5px / 500, muted). Its 12px line + 6px margin are ChartMonths.UnitLinePx: the chart
   under it is drawn that much shorter, so the plot host keeps its fixed height (Evidens I-041 Decision 12, ported by
   I-048; it replaces CF-087's absolute ChartCard.Unit span) */
.chart-card__unit {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.71875rem;
    font-weight: 500;
    line-height: 12px;
    font-variant-numeric: tabular-nums;
    text-align: left;
    white-space: nowrap;
}

.chart-card__plot > svg {
    display: block;
    width: 100%;
    height: 100%;
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
}

/* One line of small text under the plot (e.g. invoices in a currency without a rate) */
.chart-card__note {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.78125rem;
    line-height: 1.4;
}

/* Legend: what the marks mean, the scope of the numbers, the current month. Every chart also carries direct
   labels and the summary table (.chart-card__summary + .visually-hidden): never colour alone. */
.chart-card__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--space-md);
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.78125rem;
    line-height: 1.4;
}

.chart-card__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* A swatch fills with its colour (currentColor), so a modifier also colours an SVG mark: <g class="…--primary">
   <rect fill="currentColor"> */
.chart-card__swatch {
    flex: none;
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: currentColor;
}

.chart-card__swatch--primary,
.chart-card__swatch--net {
    color: var(--color-primary);
}

.chart-card__swatch--gross {
    color: color-mix(in srgb, var(--color-primary) 24%, transparent);
    border-color: color-mix(in srgb, var(--color-primary) 75%, transparent);
}

/* The current month's band */
.chart-card__swatch--now {
    color: color-mix(in srgb, var(--text-primary) 6%, transparent);
    border-color: var(--glass-border-light);
}

.chart-card__swatch--warning {
    color: var(--color-warning);
}

/* Ageing 31-60 and 61-90 days: the warning hue turning into the error hue */
.chart-card__swatch--warning-error {
    color: color-mix(in srgb, var(--color-warning) 58%, var(--color-error));
}

.chart-card__swatch--error-warning {
    color: color-mix(in srgb, var(--color-warning) 24%, var(--color-error));
}

.chart-card__swatch--error {
    color: var(--color-error);
}

/* No due date: a dashed neutral mark */
.chart-card__swatch--neutral {
    color: color-mix(in srgb, var(--text-primary) 9%, transparent);
    border: 1px dashed var(--text-muted);
}

/* .chart-card__summary — the summary table with the plotted numbers — composes the existing .visually-hidden
   utility; it has no rule of its own. .chart-card--sparse (1-4 data points: gaps, never zeros) changes nothing
   beyond the plot; it marks the state for E2E and the docs. */

/* Empty: the <EmptyState> molecule (.empty-state.empty-state--section) in place of the plot, laid out as a dashed
   box — icon ring left, title over the sentence, the action right (under them on a phone) */
.chart-card__empty {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
        "icon title cta"
        "icon desc cta";
    align-items: center;
    gap: 2px var(--space-md);
    min-height: 132px;
    padding: 18px 20px;
    border: 1px dashed var(--glass-border-light);
    border-radius: var(--radius-md);
    text-align: left;
}

.chart-card__empty .empty-state__icon {
    grid-area: icon;
    width: 44px;
    height: 44px;
    margin: 0;
    background: var(--color-fg-08);
    color: var(--text-secondary);
    font-size: 1.375rem;
}

.chart-card__empty .empty-state__title {
    grid-area: title;
    align-self: end;
    font-size: 0.9375rem;
    line-height: 1.3;
}

.chart-card__empty .empty-state__description {
    grid-area: desc;
    align-self: start;
    font-size: 0.84375rem;
}

.chart-card__empty .empty-state__cta {
    grid-area: cta;
    margin-top: 0;
}

@media (max-width: 640px) {
    .chart-card__empty {
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon desc"
            "cta cta";
        row-gap: 4px;
    }

    .chart-card__empty .empty-state__cta {
        justify-content: flex-start;
        margin-top: var(--space-sm);
    }
}

/* The bank card's accounts: bank, account number, currency, "Primarni", balance or "nema uvoza" */
.chart-card__accounts {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--glass-border);
}

.chart-card__account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    min-height: 38px;
    padding: 5px 0;
    color: var(--text-primary);
    font-size: 0.84375rem;
}

.chart-card__account + .chart-card__account {
    border-top: 1px solid var(--glass-border);
}

.chart-card__account-bank {
    font-weight: 600;
}

.chart-card__account-number {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.chart-card__account-currency {
    color: var(--text-secondary);
}

.chart-card__account-balance {
    margin-left: auto;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Loading: skeleton bars (.chart-card__sk — the shared shimmer of the "Work queue (I-029)" block, none under
   reduced motion) in place of the eyebrow, headline, columns and legend; aria-busy on the card */
.chart-card__sk--eyebrow {
    width: 140px;
    height: 12px;
}

.chart-card__sk--link {
    width: 70px;
    height: 12px;
    margin-left: auto;
}

.chart-card__sk--headline {
    width: 58%;
    height: 20px;
}

.chart-card__sk--legend {
    width: 46%;
    height: 11px;
}

.chart-card--loading .chart-card__headline,
.chart-card--loading .chart-card__legend {
    display: block;
}

.chart-card__sk-plot {
    display: flex;
    align-items: flex-end;
    gap: 3.2%;
    height: 100%;
    padding-left: 34px;
}

.chart-card__sk-plot > .chart-card__sk {
    flex: 1;
    height: 52%;
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

.chart-card__sk-plot > .chart-card__sk:nth-child(4n + 1) {
    height: 38%;
}

.chart-card__sk-plot > .chart-card__sk:nth-child(4n + 2) {
    height: 70%;
}

.chart-card__sk-plot > .chart-card__sk:nth-child(4n + 4) {
    height: 84%;
}

@media (max-width: 640px) {
    .chart-card {
        padding-inline: var(--space-md);
    }
}

/* Needs-attention strip: the compact work queue of one client — a heading (the first item's band mark,
   "Potrebna pažnja", the count) over one card of .work-queue__list rows (.work-queue__row--compact, the I-029
   rows unchanged); from four items two lists side by side when the strip is at least 900px wide; "Sve je u redu"
   when there is nothing. The strip is a work-queue size container, so its rows take the I-029 two-line form at
   <= 520px. */
.work-queue-strip {
    min-width: 0;
    container: work-queue / inline-size;
}

.work-queue-strip__head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 10px 4px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.work-queue-strip__count {
    color: var(--text-muted);
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* WorkQueueStrip.HeadExtra: the last thing in the head, at the right — "8 od 12 · Red posla" when the strip shows only
   the first items (prototype F's .band-h .lnk, CF-087). Not the head's uppercase label type; a link in it is the
   underlined link of the pattern (as .chart-card__link) */
.work-queue-strip__head-extra {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
}

.work-queue-strip__head-extra a,
.work-queue-strip__head-extra button {
    color: var(--color-primary-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* A head control that acts in place (the partner strip's "Prikaži sve") reads as the link it sits beside */
.work-queue-strip__head-extra button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.work-queue-strip__head-extra a:hover,
.work-queue-strip__head-extra button:hover {
    color: var(--color-primary-text);
}

.work-queue-strip__head-extra a:focus-visible,
.work-queue-strip__head-extra button:focus-visible {
    outline: none;
    border-radius: 2px;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* One card (a .glass-card, its surface not restyled) holding one or two lists */
.work-queue-strip__lists {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
}

/* A list without its own card surface, for a list that sits inside a card (the strip) */
.work-queue__list--bare {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
}

.work-queue-strip__list + .work-queue-strip__list {
    border-top: 1px solid var(--glass-border);
}

@container work-queue (min-width: 900px) {
    .work-queue-strip--two .work-queue-strip__lists {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-queue-strip--two .work-queue-strip__list + .work-queue-strip__list {
        border-top: 0;
        border-left: 1px solid var(--glass-border);
    }
}

/* Nothing open for the client: one quiet line with a success check */
.work-queue-strip__ok {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;
    padding: 2px 4px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.work-queue-strip__ok .anticon {
    color: var(--color-success);
}

/* Counts row: the client's record counts as a ruled row of links — cells divided by the border token, wrapping;
   label (icon + text) over the bold value */
.client-counts {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.client-counts__item {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    margin-left: -1px;
    padding: 12px 18px 12px 17px;
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.client-counts__item:hover {
    background: var(--glass-bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
}

.client-counts__item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--color-primary-glow);
}

/* A count that links nowhere (Rok plaćanja, Klasifikacija — CF-087): a div with the same cell, no hover ground */
.client-counts__item--static:hover {
    background: none;
}

.client-counts__label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78125rem;
    white-space: nowrap;
}

.client-counts__value {
    min-width: 0;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ========================================================================
   Context bar (CF-087)

   The entity context bar (EntityContextBar, prototype F #cbar, o.html 478-487 / 886-918): which partner or warehouse
   an overview is about — icon + name, tags, small facts, Izmeni — in the shell between the header and the content
   (MainLayout's "context-bar" SectionOutlet), so it spans the content column outside the page gutter. Tokens only.
   Package 5b's point-3 values (I-053, PLAN Overlap 1) sit on this block: the light fact label, the warning-mark icon,
   Izmeni in the link ink with its 2px hover / focus underline, and the phone back link.
   ======================================================================== */

.context-bar {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--space-md);
    min-height: 46px;
    padding: 7px var(--content-padding-inline); /* 24px, 16px at <= 640px: the content's gutter (F 917) */
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg-subtle);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* Tags sit on the bar's gap, not AntD's own right margin */
.context-bar .ant-tag {
    margin: 0;
}

.context-bar__name {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    max-width: 100%;
    height: 32px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
}

.context-bar__name > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* CF-099 F-b3-03: the name's own line box holds its glyphs (Ć, Đ); at line-height 1 the clip cut them by 2px. The
       name box stays 32px (the row's height) — only the span inside it grows */
    line-height: var(--line-height-body);
}

.context-bar__name > .anticon {
    flex: none;
    color: var(--text-muted);
    font-size: 1rem;
}

.context-bar__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--space-md);
    min-width: 0;
}

.context-bar__fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.context-bar__fact small {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

/* F .cbar-f small: F's --muted (.55 dark / .60 light, o.html 485, 13 / 38). The light --text-muted is .62; on the bar's
   subtle ground the .60 step (--color-fg-45 on light) still reads ≈ 4.6 : 1 (I-053) */
:root[data-theme="light"] .context-bar__fact small {
    color: var(--color-fg-45);
}

/* F .cbar-f .ic: a fact's icon in F's --warn (a mark, not text; o.html 486) */
.context-bar__fact .anticon {
    color: var(--color-warning-mark);
}

.context-bar__fact .mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
}

/* A fact without a value: the muted dash */
.context-bar__none {
    color: var(--text-muted);
}

.context-bar__spacer {
    flex: 1;
}

/* Izmeni: the underlined link look (F .lnk, o.html 176 / 487) on a button, in F's --accent-text (o.html 15 / 40): the link
   ink on a subtle ground (--color-link-text-on-subtle — the link ink on dark, a step darker on light, CF-099 F-b3-04) */
.context-bar__edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-link-text-on-subtle);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.context-bar__edit .anticon {
    font-size: 0.875rem;
}

/* Hover and keyboard focus thicken the underline to 2px (I-053 point 3); the ink stays the link ink */
.context-bar__edit:hover:not(:disabled),
.context-bar__edit:focus-visible {
    color: var(--color-link-text-on-subtle);
    text-decoration-thickness: 2px;
}

.context-bar__edit:focus-visible {
    outline: none;
    border-radius: 2px;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* The phone back link (F .cbar-back, o.html 479): a 32px .btn--text icon link in the --text ink, pulled 8px into the
   gutter; hidden above 640px */
.context-bar__back {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    margin-left: calc(-1 * var(--space-sm));
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.context-bar__back:hover {
    background: var(--glass-bg-light);
}

.context-bar__back:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

/* Tablet: the name and Izmeni on the first line, the facts on a second (F 890) */
@media (max-width: 1100px) {
    .context-bar__facts {
        order: 5;
        flex-basis: 100%;
        padding-bottom: 2px;
    }
}

/* Phone: the back link shows (o.html 917) */
@media (max-width: 640px) {
    .context-bar__back {
        display: inline-flex;
    }
}

/* Touch: the back link is a 44px target */
@media (max-width: 480px) {
    .context-bar__back {
        width: 44px;
        height: 44px;
    }
}

/* ========================================================================
   Modal and error summary (I-031)

   Own classes of the modal pattern (/design-system#modal-template) and the form error summary
   (/design-system#form-error-summary): the context row under the title (what the action applies to), the meta row
   under the fields, the visible reason of a disabled action (next to the blocking field, or in the footer), the inline
   footer a form-submit modal places inside its <Form>, the error summary at the top of a form after a submit attempt,
   and the drawer form's section heads (with the APR card of "Dodaj klijenta"). The AntD modal chrome itself (header /
   body / footer spacing, solid danger) is in overrides.css "Modal/Drawer Overrides". Tokens only, both themes through
   the token blocks; nothing here assumes the primary's hue. Measured from prototype F (f.src.html l.203-207, 372-401,
   556-566, 979).
   ======================================================================== */

/* Description (the modal's lead paragraph under the title — the step-up and the ownership-transfer modals): secondary
   text with the body's rhythm below it (CF-099 F-b1-10: TransferOwnershipModal's p.hint had no rule). Scoped to the modal
   body so it outranks overrides.css' generic `.ant-modal-body p` (fg-70, 16px) — the step-up modal's scoped copy did */
.ant-modal-body .modal-description {
    color: var(--text-secondary);
    margin: 0 0 var(--space-lg) 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* An alert's wrapper (a modal's server / validation error, a page's info alert above its card): the body's rhythm below
   it, so the alert never touches the next block (CF-099 F-b2-17 — `div.mb-alert` is used by 17 Razor files and had no
   rule, so a modal's failure alert sat on its preview table at 0 px). */
.mb-alert {
    margin-bottom: var(--space-md);
}

/* Context row (F .md-ctx): one line naming the record — lead · party · value right-aligned. It is the first child of
   the modal body, so the body's side padding gives F's 22px; the negative top margin takes back the body's top
   padding so it sits right under the title as in F. */
.modal-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin: 0 0 16px;
    padding: 9px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg-subtle);
    color: var(--text-secondary);
    font-size: 0.84375rem;
    line-height: 1.5;
}

.ant-modal-body > .modal-context:first-child,
.ant-modal-body > [data-pattern="modal-page"]:first-child > .modal-context:first-child {
    margin-top: -16px;
}

.modal-context__lead {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-context__sep {
    color: var(--text-muted);
}

.modal-context__value {
    margin-left: auto;
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A record name that gives way (CF-099 F-b2-20): it truncates with its title the full name, and from 768 px the row
   does not wrap, so a label + value on the right ("Trenutna cena 790,00") keep the row; below 768 the row wraps as before */
.modal-context__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-context__label {
    color: var(--text-muted);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .modal-context:has(> .modal-context__name) {
        flex-wrap: nowrap;
    }
}

/* A document number in the row (F .mono), and a mono cell in a modal's table (F's .mono is global: the denomination
   calculator's notes, CF-098 TASK_12) */
.modal-context .mono,
.modal-table .mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
}

/* Meta row (F .md-meta): a fact on the left ("Ostatak: …"), a preview on the right ("Posle ove uplate: [tag]") */
.modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    min-height: 24px;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.84375rem;
    font-variant-numeric: tabular-nums;
}

/* CF-099 F-b7-09 / F-b7-10: a note (.form-hint) or the meta row under a modal's table keeps the modal's gap above it — they
   sat flush on the table's border (IssueGoodsModal's note, LotAllocationModal's "Dodeljeno") */
.modal-table + :is(.form-hint, .modal-meta) {
    margin-top: var(--space-md);
}

.modal-meta > :last-child:not(:first-child) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Field reason: why the action is disabled, under the field that blocks it (F .ferr). role="status" — it stays
   visible while the condition holds, no entrance animation that could hide it. An AntD FormItem's own error state
   is still the field's validation message; this one names the rule the action waits on. */
.field-reason {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
    color: var(--color-error-light);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.field-reason__icon {
    flex: none;
    margin-top: 2px;
    font-size: 0.8125rem;
}

/* A neutral format hint ("dd.mm.gggg") in the same slot */
.field-reason--hint {
    color: var(--text-muted);
}

/* A modal body's last field with a character counter (TextArea ShowCount): AntD hangs the counter 22px under the field
   (`.ant-input-textarea-in-form-item::after { margin-bottom: -22px }`, into the item's own margin), and the last form item
   keeps no margin (overrides.css), so the counter sat on the footer's buttons. The item keeps the counter's 22px plus
   0.75rem (AntD's own -24px explain offset takes 2px of it), so the buttons sit ≈ 18px under the counter, as they sit
   under any last field (CF-099 F-b5-18). Three classes beat the AntD sheet. */
.ant-modal-body .ant-form-item.ant-form-item:last-child:has(.ant-input-textarea-show-count.ant-input-textarea-in-form-item) {
    margin-bottom: calc(22px + 0.75rem);
}

/* Inline footer: the ModalActionsFooter of a form-submit modal, inside its <Form> (Enter submits, OnFinish
   validates). Cancel, then the action, right-aligned with F's 10px gap; it closes the body like the footer slot
   (the body's 4px + 14px = F's 18px below the buttons). */
.modal-actions-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
}

.ant-modal-body .modal-actions-footer {
    padding-bottom: 14px;
}

/* A third, left-aligned action (Unlink, Back, Re-upload) */
.modal-actions-footer__extra {
    margin-right: auto;
}

/* The disabled action's reason when no single field blocks it: left of the buttons, above them on a phone */
.modal-actions-footer__reason {
    flex: 1 1 0;
    min-width: 0;
    margin-right: auto;
    color: var(--color-error-light);
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: left;
}

@media (max-width: 480px) {
    .modal-actions-footer__reason {
        flex: 1 1 100%;
    }
}

/* Step counter (o.html .md-step l.980, CF-089 AD-5): "Korak 1 od 2" after the title of a multi-step modal
   (ModalStepTitle in the Modal's TitleTemplate), at the header row's end as F draws it (overrides.css
   ".ant-modal-title:has(> .modal-step)"). The title around it keeps its 18px / 600. */
.modal-step {
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 0.78125rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Preview table (o.html .md-tbl l.982-983 + .it / .it--fit l.549-551, 960; CF-089 AD-6): the AntD Table of a modal
   step scrolls in its own box, up to min(46vh, 420px) high, with the header row sticky on F's --solid-2
   (--color-solid-2: #202226 dark / #f7f8fa light, the same values). Full width, no card around it. Cells 9px 14px,
   18px at the row's two ends, whatever the table's Size — heavier than overrides.css' Middle / Small densities and
   the shared header fill (!important there, so here too). */
.modal-table {
    max-height: min(46vh, 420px);
    overflow: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.modal-table .ant-table-wrapper .ant-table {
    width: 100%;
    background: transparent;
}

/* A table with ScrollX (a 5+ column preview): AntD wraps it in a sideways scroller of its own (inline overflow), which
   would also become the sticky header's scroll container — the .modal-table box scrolls both ways instead — and fixes
   its layout, which cuts a long figure. Laid out by content like o.html's .it--fit, the column widths are minimums. */
.modal-table .ant-table-wrapper .ant-table-content {
    overflow: visible !important;
}

.modal-table .ant-table-wrapper .ant-table table {
    table-layout: auto !important;
}

.modal-table .ant-table-wrapper .ant-table :is(.ant-table-thead, .ant-table-tbody) > tr > :is(th, td) {
    padding: 9px 14px;
    white-space: nowrap;
}

.modal-table .ant-table-wrapper .ant-table :is(.ant-table-thead, .ant-table-tbody) > tr > :is(th, td):first-child {
    padding-left: 18px;
}

/* CF-099 TASK_25: a preview cell of names wraps between words (.cell-wrap-words) — the box's nowrap cells would push the
   figures past it (BulkPriceUpdateModal's Naziv) */
.modal-table .ant-table-wrapper .ant-table .ant-table-tbody > tr > td.cell-wrap-words {
    white-space: normal;
}

/* CF-099 F-b7-10: a dense preview (seven columns with an input, LotAllocationModal) — 8px cell sides and heads that wrap
   between words, so it fits the 720px modal at 1440; the box still scrolls on a phone */
.modal-table--dense .ant-table-wrapper .ant-table :is(.ant-table-thead, .ant-table-tbody) > tr > :is(th, td) {
    padding-left: 8px;
    padding-right: 8px;
}

.modal-table--dense .ant-table-wrapper .ant-table :is(.ant-table-thead, .ant-table-tbody) > tr > :is(th, td):first-child {
    padding-left: 12px;
}

.modal-table--dense .ant-table-wrapper .ant-table .ant-table-thead > tr > th {
    white-space: normal;
}

.modal-table .ant-table-wrapper .ant-table :is(.ant-table-thead, .ant-table-tbody) > tr > :is(th, td):last-child {
    padding-right: 18px;
}

/* A text block inside a nowrap cell (SubmissionDetailModal's SEF error, a long note or name) wraps within its column
   instead of stretching it to the text's full line (PR 746 thread 11972); figures and codes keep the one-line rule. */
.modal-table .modal-table__wrap {
    white-space: normal;
    overflow-wrap: anywhere;
}

.modal-table .ant-table-wrapper .ant-table .ant-table-thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--color-solid-2) !important;
}

/* The preview's figures line up (o.html .num); the column's Align puts them on the right */
.modal-table .ant-table-wrapper .ant-table .ant-table-tbody > tr > td {
    font-variant-numeric: tabular-nums;
}

/* The price a preview row would get (o.html 2836: bold, .t-err when it would be negative) */
.price-preview__new {
    font-weight: 600;
}

.price-preview__new--error {
    color: var(--color-error-light);
}

/* A unit inside a number field, on the right (o.html .inpwrap--suffix l.569–570): "%", "RSD". The field is AntD's
   InputNumber affix wrapper (the visible box, overrides.css "InputNumber affix wrapper"), the unit its last child,
   muted 13px, 12px from the field's outer edge (the wrapper's 1px border + 11px). Like the prototype's text field it has no stepper: the arrow keys still step. */
.input-unit__suffix {
    display: inline-flex;
    flex: none;
    align-items: center;
    padding: 0 11px 0 8px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    pointer-events: none;
}

.input-unit .ant-input-number-handler-wrap {
    display: none;
}

/* Form error summary (F #errsum): the error alert family — icon, a counted heading, one link per invalid field.
   Shown after a submit attempt (role="alert"); a link focuses and scrolls to its field (data-field names it). */
.form-error-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--space-md);
    padding: 14px 16px;
    border: 1px solid rgba(var(--color-error-rgb), 0.45);
    border-radius: var(--radius-md);
    background: rgba(var(--color-error-rgb), 0.1);
    color: var(--text-primary);
}

.form-error-summary__icon {
    flex: none;
    margin-top: 2px;
    color: var(--color-error-light);
    font-size: 1.125rem;
}

.form-error-summary__body {
    flex: 1;
    min-width: 0;
}

.form-error-summary__heading {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.form-error-summary__list {
    display: grid;
    gap: 4px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.form-error-summary__link {
    color: var(--color-error-light);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    border-radius: var(--radius-xs);
}

.form-error-summary__link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.form-error-summary__link:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* Drawer form sections (F .fsec + h3.sec-label, o.html l.396–397): each opens with an h3.section-label (16px icon +
   label; type as the wizard's section label below), 16px above it and 14px above the fields; between sections a hairline
   with 8px above and 4px below it. A section is a block that never widens its drawer (a field grid / table inside
   shrinks with it) — the base rule the first section had none of (I-060, Evidens I-044 VR3). */
.drawer-section {
    min-width: 0;
}

.drawer-section + .drawer-section {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--glass-border);
}

.drawer-section > .section-label,
.vacts > .section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 14px;
}

.drawer-section > .section-label .anticon,
.vacts > .section-label .anticon {
    font-size: 16px;
}

/* A searchable Select's own "nothing found / type to search" face (NotFoundContent), rendered in AntD's dropdown portal —
   so a global rule, not a component's scoped one (I-060, Evidens I-044 Decision 34 (b)). */
.select-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-sm);
    color: var(--text-muted);
    font-size: var(--font-size-xs2);
    text-align: center;
}

.select-search-empty .anticon {
    font-size: 1.5rem;
}

/* The form error summary as F's #errsum on top of the drawer body (.dr-b > .alert): 14px above the form */
.ant-drawer.form-drawer--medium .entity-drawer-body > .form-error-summary {
    margin-bottom: 14px;
}

/* The default drawer chrome as F's drawer (.dr-h 64px, 12px 14px 12px 24px, h2 20px/700; .dr-b 18px 24px 28px;
   .dr-f 14px 24px, gap 12px — f.src.html l.372–401, o.html l.382–391). CF-088: every EntityFormDrawer carries
   .form-drawer--medium, so this is the chrome of every entity drawer at any width (an explicit Width keeps it).
   `.ant-drawer` lifts it over FormDrawer's scoped header rule; the footer keeps the ≤480px sticky stack. */
.ant-drawer.form-drawer--medium .form-drawer__header {
    min-height: 64px;
    padding: 12px 14px 12px 24px;
}

.ant-drawer.form-drawer--medium .form-drawer__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

/* Operans' form drawer is EntityFormDrawer (PLAN AD-4), whose header is AntD's own: the same chrome on
   .ant-drawer-header / .ant-drawer-title (I-047 TASK_06 fidelity: it measured 55px and 16px/500 against F's 64px and
   20px/700). The right padding stays overrides.css' 56px, the room of AntD's absolute close button. */
.ant-drawer.form-drawer--medium .ant-drawer-header {
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 24px;
}

.ant-drawer.form-drawer--medium .ant-drawer-title {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
}

.ant-drawer.form-drawer--medium .entity-drawer-body {
    padding: 18px 24px 28px;
}

/* .form-actions-footer: EntityFormDrawer's footer also carries it, and overrides.css' later
   `.entity-drawer .entity-drawer-footer.form-actions-footer` (16px 24px) won the tie (I-047 TASK_06 fidelity) */
@media (min-width: 480.02px) {
    .ant-drawer.form-drawer--medium .entity-drawer-footer,
    .ant-drawer.form-drawer--medium .entity-drawer-footer.form-actions-footer {
        padding: 14px 24px;
        gap: 12px;
    }
}

/* An EntityFormDrawer is never wider than the viewport: a form that passes its own Width (wider than 560px) stays on
   screen between 641px and that width, where the ≤640px rule below does not reach it. AntD writes only the width
   inline, so a plain max-width caps it. */
.form-drawer--medium .ant-drawer-content-wrapper {
    max-width: 100vw;
}

/* EntityFormDrawer's default chrome (CF-088 AD-1 — every entity drawer carries .form-drawer--medium, whatever its
   width; F's drawer is 560px with a 1px edge like the modal's border, o.html l.377): full width only at ≤ 640px, where
   the edge goes, with 16px side paddings on header / body / footer — the prototype's 640px block (o.html l.905; .drawer
   l.912, .dr-h / .dr-b / .dr-f l.914; CF-088 AD-1a; Evidens I-041 TASK_12 moved its own rule there from < 1000px).
   AntD writes the width inline, hence !important. */
.ant-drawer.form-drawer--medium .ant-drawer-content {
    border-left: 1px solid var(--color-fg-10);
}

@media (max-width: 640px) {
    .form-drawer--medium .ant-drawer-content-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .ant-drawer.form-drawer--medium .ant-drawer-content {
        border-left: 0;
    }

    .ant-drawer.form-drawer--medium .ant-drawer-header {
        padding-left: 16px;
    }

    .ant-drawer.form-drawer--medium .entity-drawer-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ant-drawer.form-drawer--medium .entity-drawer-footer,
    .ant-drawer.form-drawer--medium .entity-drawer-footer.form-actions-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* APR info card — the selected APR company in "Dodaj klijenta" (primary-tinted). Moved verbatim from
   CreateClient.razor.css (which TASK_06 deletes); the class names stay. */
.apr-info-card {
    background: var(--color-primary-bg);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.apr-info-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.apr-info-card__clear {
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.apr-info-card__clear:hover {
    color: var(--text-primary);
}

.apr-info-card__name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.apr-info-card__details {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.875rem;
}


/* ========================================================================
   Heavy-data pattern (I-032)

   The ledger anatomy of a heavy-data page (/design-system#heavy-data-report-template; prototype F, "Bruto
   bilans"): a toolbar over a table that scrolls inside its own region, with a sticky header, sticky group
   header rows and a sticky totals row, pinned key columns, compact rows, ellipsised names with the full text in
   `title`, right-aligned tabular amounts and zero as a muted dash.

   Mechanism (I-032 TASK_01, README Decisions 7 / 8): the AntD <Table> keeps ScrollX for its pinned columns and
   gets NO ScrollY. The .heavy-data-scroll wrapper is the one scroll container for both axes; header, group rows
   and the summary row stick with CSS `position: sticky`, AntD's own pins (`position: sticky; left: …` inline)
   resolve against the same wrapper. ScrollY was ruled out: AntD 1.6 splits the header into a second table (a
   group row can then not stick under it), never makes the summary sticky, and the scroll body is AntD's
   element, so it cannot carry tabindex / role="region" / aria-label.

   This block holds the pattern's own classes and the sticky positions; the AntDesign side — opaque backgrounds
   over AntD's translucent ones, the content scroller, the summary's stacking, the z-index order and the edge
   shadow — is the "Table pattern (I-028)" block of overrides.css. Tokens only: the two surfaces are derived from
   --table-pinned-bg, which already switches with the theme.
   ======================================================================== */

/* The own scroll region. Markup: <div class="heavy-data-scroll" tabindex="0" role="region" aria-label="…">
   around the <Table> — tabindex so a keyboard user can scroll it, role + label so it is a named landmark.
   Height follows prototype F: the viewport minus the page chrome, never under 300px. The chrome is Evidens'
   client-page shell, not F's 440px: top bar, client bar, header card, filter card, toolbar + hint above the
   region, main-content padding and the footer below it — measured on the trial balance at 1440 x 900 (region
   top 506px, main-content ends at 844px with 32px padding), so the totals row stays in view without scrolling
   the page (I-032 TASK_07). A page with less chrome lowers --heavy-data-chrome-h.
   With script the region takes the height actually left (I-032 merge gate): HeavyDataRegionScroll calls
   appScroll.fitRegion, which measures the content area under the region's top and sets --heavy-data-fit-h; the
   chrome offset is then only the no-script fallback. */
.heavy-data-scroll {
    --heavy-data-chrome-h: 600px;
    --heavy-data-head-h: 44px;
    --heavy-data-row-h: 34px;
    --heavy-data-solid: var(--table-pinned-bg);
    /* F --solid-2: the header, group, totals and hover surface a 3 % step over the rows (#202226 over #191b20 dark,
       #f7f8fa over #fff light; I-041 TASK_11 — 5 % read lighter than F's header in the dark theme) */
    --heavy-data-solid-2: color-mix(in srgb, var(--text-primary) 3%, var(--table-pinned-bg));
    position: relative;
    height: clamp(300px, var(--heavy-data-fit-h, calc(100dvh - var(--heavy-data-chrome-h))), 2400px);
    overflow: auto;
    overscroll-behavior: contain;
    /* Drives the pinned columns' edge shadow without script (overrides.css) */
    scroll-timeline: --heavy-data-x inline;
}

/* CF-091: a block that is short by nature (a session's few lines, a partner's packaging types, a one-row summary)
   sizes to its rows and scrolls only past the region's height; the report's main table keeps the full region */
.heavy-data-scroll.heavy-data-scroll--fit {
    height: auto;
    max-height: clamp(300px, var(--heavy-data-fit-h, calc(100dvh - var(--heavy-data-chrome-h))), 2400px);
}

.heavy-data-scroll:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: -2px;
}

/* Sticky header: on top of every body row while the region scrolls */
.heavy-data-scroll thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: var(--heavy-data-head-h);
    line-height: 1.25;
}

/* Sticky group header rows: each sticks under the header until the next one replaces it */
.heavy-data-scroll .heavy-data-group-row > td {
    position: sticky;
    top: var(--heavy-data-head-h);
    z-index: 3;
}

/* Sticky totals row: AntD's SummaryRow renders a bare <tr> in tfoot.ant-table-summary, so every tfoot row in
   the region is a totals row; .heavy-data-totals-row names it in static markup. The .ant-table step out-ranks
   AntD's own `.ant-table tfoot > tr > td { position: relative }` — same specificity otherwise, and
   ant-design-blazor.css loads after app.css, so only the pinned cells (AntD's inline sticky) stuck (I-032 TASK_06) */
.heavy-data-scroll .ant-table tfoot > tr > td,
.heavy-data-scroll .heavy-data-totals-row > td {
    position: sticky;
    bottom: 0;
    z-index: 4;
}

/* Fixed layout at the column widths: the table scrolls sideways inside the region instead of squeezing */
.heavy-data-scroll table {
    table-layout: fixed;
}

/* One-line cell: the full text goes in the element's `title` */
td.heavy-data-cell--ellipsis,
th.heavy-data-cell--ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.heavy-data-cell--ellipsis:not(td):not(th) {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Amounts: right-aligned tabular figures come from the shared .numeric-cell rule; the pattern adds F's mono at
   12.5px — the table-cell selectors out-rank the compact row size and overrides.css's body-cell size */
.amount-cell,
.ant-table-tbody > tr > td.amount-cell,
.ant-table-summary > tr > td.amount-cell {
    font-family: var(--font-mono);
    font-size: 0.78125rem;
    white-space: nowrap;
}

th.amount-cell {
    font-family: inherit;
}

.heavy-data-scroll th.amount-cell {
    text-align: right;
}

/* Zero as a muted dash: <span class="amount-zero" aria-label="0,00">—</span>. F dims it further (opacity .65);
   the muted token alone keeps the dash at ≥ 4.5:1 in both themes. */
.amount-zero {
    color: var(--text-muted);
}

/* A row's key (account code, PIB, document number): mono, a step quieter than the name */
.heavy-data-key {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-weight: var(--font-weight-semibold);
    font-variant-numeric: tabular-nums;
}

/* Group header row: the key column holds the toggle (chevron + key badge), the name column the label */
.heavy-data-group-row > td {
    font-weight: var(--font-weight-semibold);
}

/* The toggle needs the key cell's width: F's 4px inset instead of the compact 12px */
.heavy-data-table--compact .heavy-data-group-row > td.ant-table-cell:first-child {
    padding-left: var(--space-xs) !important;
}

.heavy-data-group-toggle {
    appearance: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0 var(--space-xs);
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-weight: var(--font-weight-semibold);
    text-align: left;
    cursor: pointer;
}

.heavy-data-group-toggle:hover {
    background: var(--glass-bg-light);
}

.heavy-data-group-toggle:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: -2px;
}

.heavy-data-group-toggle__chevron {
    flex: none;
    display: inline-flex;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.heavy-data-group-toggle[aria-expanded="false"] > .heavy-data-group-toggle__chevron {
    transform: rotate(-90deg);
}

@media (prefers-reduced-motion: reduce) {
    .heavy-data-group-toggle__chevron {
        transition: none;
    }
}

/* The group's key (an account class) as a small badge */
.heavy-data-group-row__key {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 var(--space-xs);
    border-radius: 6px;
    /* The primary tint mixed into the group row's own ground (F --solid-2; the pinned ground outside a region), not
       laid over it: over the toggle's hover ground the translucent tint took the key to 4.2 : 1 in dark (I-060,
       Evidens I-044 Decision 21 (g), VR2). */
    background: color-mix(in srgb, var(--color-primary) 14%, var(--heavy-data-solid-2, var(--table-pinned-bg)));
    color: var(--color-primary-text);
    font: var(--font-weight-bold) 0.78125rem/1 var(--font-display);
}

/* CF-099 F-b16-05: on light the primary text read 4.0 : 1 on the chip's tint (Lager lista's "GM1", Kartica robe's
   "GP002"); the primary's dark step reads 5.0 : 1 there. Dark keeps the lighter primary ink. */
:root[data-theme="light"] .heavy-data-group-row__key {
    color: var(--color-primary-text-strong);
}

.heavy-data-group-row__label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.heavy-data-group-row__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The group's row count is the shared count pill (.work-queue__tab-count; prototype F's .cnt) */

/* Totals row: bold; the label cell uppercase with a small note ("sva konta" while a filter hides rows) */
.heavy-data-totals-row > td,
.heavy-data-scroll tfoot > tr > td {
    font-weight: var(--font-weight-bold);
}

/* The .ant-table-cell step out-ranks the compact row size (13.5px), which otherwise won over F's 12.5px label */
.heavy-data-totals-row__label,
.heavy-data-table--compact .ant-table-cell.heavy-data-totals-row__label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78125rem;
}

.heavy-data-totals-row__label small {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* A column head's sub-line (CF-099 F-b17-12: a week's dates under "Ned. 41") — the totals label's small on its own line,
   so a period head wraps between its parts, never inside the dates; two lines fit the 44px head */
.heavy-data-table--compact .ant-table-thead > tr > th small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

/* Toolbar: the I-028 .table-toolbar (52px, wraps, count / switch / spacer) with F's ledger padding. Search grows,
   the count is .table-toolbar__count (aria-live="polite"), the switch .table-toolbar__switch. */
.heavy-data-toolbar {
    padding: 9px var(--space-md);
}

.heavy-data-toolbar:has(+ .heavy-data-hint) {
    border-bottom: 0;
}

.heavy-data-toolbar__search {
    flex: 1 1 220px;
    max-width: 300px;
}

/* A link in the toolbar ("Skupi sve magacine") is F's .lnk (o.html 3346): text with no button box, 13px, so the bar
   keeps F's 52px instead of growing to the 36px button. From 481px up — on a phone it keeps the touch target. */
@media (min-width: 481px) {
    .heavy-data-toolbar .ant-btn-link {
        height: auto;
        padding: 0;
        font-size: 0.8125rem;
    }
}

/* A one-line explanation under the toolbar (what the switch adds), closing the bar with its rule */
.heavy-data-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 var(--space-md) 10px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.78125rem;
}

/* Tablet: the client bar and the toolbar wrap onto a second line (≈ 60px more chrome at 834px) */
@media (max-width: 1024px) {
    .heavy-data-scroll {
        --heavy-data-chrome-h: 670px;
    }
}

/* A filter whose label sits beside its control on one row (prototype F's "Period [od → do]"; I-032 merge gate): the
   control keeps its natural width, so a period picker no longer stretches across the whole card. Below 768px the
   filter row stacks and the control takes the row's width (the global column-stack rule makes the item 100%). */
.filter-item--inline {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.filter-item--inline > .filter-label {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Below 768px the filter row is a column stack with every label above its control; the inline item joins it (label
   above, control the item's full width — I-041 TASK_11, the L2 filter probe measured the picker 49px short) */
@media (max-width: 768px) {
    .filter-item--inline {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .filter-item--inline > .filter-label {
        margin-bottom: var(--space-xs);
    }

    .filter-item--inline > :not(.filter-label) {
        flex: none;
        min-width: 0;
        width: 100%;
    }
}

/* CF-099 F-b16-10: a switch pair (a label around the switch and its text — CF-091 AD-10) stays one row at every width: the
   switch at its own size beside its text. The column stack above stretched the switch's track across the row and put
   the text under it. */
@media (max-width: 768px) {
    label.filter-item--inline:has(> .ant-switch) {
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
    }

    label.filter-item--inline:has(> .ant-switch) > .ant-switch {
        width: auto;
    }

    label.filter-item--inline:has(> .ant-switch) > :not(.ant-switch) {
        flex: 1 1 auto;
        width: auto;
        margin-bottom: 0;
    }
}

/* CF-091: the filter bar of a heavy-data page (prototype F .lg-filter, o.html 589): the Filteri strip and the run's
   status tag beside it (Lager lista's balance tag), one row that wraps */
.heavy-data-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px var(--space-md);
}

.heavy-data-filter-bar > .filter-card {
    flex: 0 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.heavy-data-filter-bar__status {
    display: inline-flex;
    align-items: center;
}

.heavy-data-filter-bar__status .ant-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

/* CF-091: the Filteri strip (F .card.lg-period, o.html 590–593): a bold title with the filter icon, label + control
   pairs (.filter-item--inline) and the small Run button on one row that wraps; labels 13px muted. The card's padding
   and corners are the heavy-data filter card's (below). Page-independent: any heavy-data filter card adds
   .filter-strip. */
.filter-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) 10px;
}

/* CF-091 TASK_07: from 769px the strip and the saved-searches strip are as wide as their row (F's .lg-filter is a
   wrapping flex row, so a one-row .lg-period ends after its last control; a long set wraps at the content width).
   At <= 768px the controls take the row (.filter-item--inline), so both strips keep the full width. */
@media (min-width: 769px) {
    .filter-strip,
    .saved-searches {
        width: fit-content;
        max-width: 100%;
    }
}

.filter-strip__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
}

.filter-strip .filter-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* F .lg-period label (o.html 592): every label in the strip is 13px muted — a checkbox's text too (F's Povratna ruta
   .fswitch; CF-098 TASK_14). The colour beats overrides.css's !important checkbox text (--text-primary) by specificity
   [ShipmentList Redosled rute] */
.filter-strip .ant-checkbox-wrapper,
.filter-strip .ant-checkbox-wrapper:hover {
    color: var(--text-muted) !important;
    font-size: 0.8125rem;
}

/* CF-091 AD-10: a switch in the strip is a label around the switch and its text (F .fswitch inside .lg-period, o.html
   343, 591): the whole pair toggles, the text is a strip label */
.filter-strip label.filter-item--inline {
    cursor: pointer;
}

/* The run's blocking reasons beside the strip's Run (aria-live; o.html 5744), on the strip's row */
.filter-strip .filter-actions__hint:empty {
    display: none;
}

/* CF-091 TASK_07: the blocking reasons carry F's warn mark (o.html 4071 why() → .sdot--warn, 777–778: an 8px diamond
   7px before 13.5px secondary text) — beside the strip's Run and on the idle face (ReportPlaceholder Missing) */
.filter-strip .filter-actions__hint:not(:empty),
.empty-state .filter-actions__hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84375rem;
}

.filter-strip .filter-actions__hint:not(:empty)::before,
.empty-state .filter-actions__hint::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: var(--color-warning-mark);
    transform: rotate(45deg);
}

/* The strip's controls at F's widths (o.html 1002, 593): a select 230px, a date 148px; 13.5px, tabular dates.
   !important: AntD's Select writes an inline `width: 100%`, which in a shrink-to-fit pair collapses it to its arrow */
.filter-strip .filter-item--select > .ant-select {
    width: 230px !important;
}

.filter-strip .filter-item--date > .ant-picker {
    width: 148px !important;
}

/* A period picker (one range control) and a number input in the strip: a range holds two dates, a number a short figure */
.filter-strip .filter-item--range > .ant-picker {
    width: 260px !important;
}

.filter-strip .filter-item--number > .ant-input-number {
    width: 140px !important;
}

/* CF-099 F-b7-21: the compact strip controls — a select beside a page's own filters (F has none there), a time of day
   (HH:mm) and a short number with its unit (the .input-unit affix wrapper, F's .inpwrap--suffix) — so Redosled rute's strip
   holds one row at 1440 as F `route` */
.filter-strip .filter-item--select-sm > .ant-select {
    width: 132px !important;
}

.filter-strip .filter-item--time > .ant-picker {
    width: 84px !important;
}

.filter-strip .filter-item--number > .input-unit {
    width: 80px;
}

.filter-strip .ant-select,
.filter-strip .ant-picker-input > input {
    font-size: 0.84375rem;
    font-variant-numeric: tabular-nums;
}

/* The strip's Run button is F's small primary (.btn--sm, o.html 168): 28px, 10px sides, 13px, radius 6. From 481px
   up — on a phone it keeps the 44px touch target. A Filteri strip on any page takes it too (CF-098 TASK_06). */
@media (min-width: 481px) {
    [data-pattern="heavy-data-page"] .filter-strip .ant-btn-primary,
    [data-pattern="heavy-data-page"] .filter-strip > .ant-btn,
    .filter-card.filter-strip .ant-btn-primary,
    .filter-card.filter-strip > .ant-btn {
        height: 28px;
        padding: 0 10px;
        border-radius: 6px !important;
        font-size: 0.8125rem;
    }
}

/* A multiple select in a heavy-data filter card is F's 34px control too (the single select and the picker already are,
   overrides.css): 24px chips with 2px margins inside 2px padding. From 481px up — the I-012 44px phone lift stays. */
@media (min-width: 481px) {
    [data-pattern="heavy-data-page"] .filter-card .ant-select-multiple .ant-select-selector,
    .filter-card.filter-strip .ant-select-multiple .ant-select-selector {
        min-height: 34px;
        padding-top: 2px;
        padding-bottom: 2px;
    }
}

/* Below 769px the strip joins the column stack: the label above, the control the strip's width */
@media (max-width: 768px) {
    .heavy-data-filter-bar > .filter-card {
        flex: 1 1 100%;
    }

    .filter-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-strip .filter-item--select > .ant-select,
    .filter-strip .filter-item--date > .ant-picker,
    .filter-strip .filter-item--range > .ant-picker,
    .filter-strip .filter-item--number > .ant-input-number,
    .filter-strip .filter-item--number > .input-unit {
        width: 100% !important;
    }
}

/* CF-091 AD-10: every heavy-data filter card is F's period strip from 769px up — the strip's 13px muted labels, 13.5px
   selects and pickers (34px high in overrides.css) and the small primary Run (.btn--sm, o.html 168) — whether or not
   the page has moved its card to .filter-strip yet. Below 769px the stacked filter rules stay. */
@media (min-width: 769px) {
    [data-pattern="heavy-data-page"] .filter-card .filter-label {
        color: var(--text-muted);
        font-size: 0.8125rem;
        font-weight: 400;
    }

    [data-pattern="heavy-data-page"] .filter-card .ant-select,
    [data-pattern="heavy-data-page"] .filter-card .ant-picker-input > input {
        font-size: 0.84375rem;
        font-variant-numeric: tabular-nums;
    }

    [data-pattern="heavy-data-page"] .filter-card .ant-btn-primary {
        height: 28px;
        padding: 0 10px;
        border-radius: 6px !important;
        font-size: 0.8125rem;
    }
}

/* CF-091 AD-10: the saved-searches strip (SavedSearchesDropdown; F .card.lg-period[aria-labelledby], o.html 5721–5729):
   the Filteri strip's card — 10 / 14px, --radius-md — with the bold label and the 230px select (34px in
   overrides.css); the buttons 28px (below). The component's scoped CSS holds only its row. */
.saved-searches {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.saved-searches__label {
    margin-right: 4px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
}

/* The strip's and the export bar's buttons are F's .btn--sm (o.html 168): 28px, 10px sides, 13px, radius 6. From 481px
   up — on a phone they keep the 44px touch target (design-lint button-size: no Size="Small" outside a table cell). */
@media (min-width: 481px) {
    .saved-searches .ant-btn,
    .report-export-bar .ant-btn {
        height: 28px;
        padding: 0 10px;
        border-radius: 6px !important;
        font-size: 0.8125rem;
    }
}

/* !important: AntD's Select writes an inline `width: 100%` */
.saved-searches > .ant-select {
    width: 230px !important;
    max-width: 100%;
    font-size: 0.84375rem;
}

@media (max-width: 480px) {
    .saved-searches {
        padding: var(--space-sm);
    }

    .saved-searches > .ant-select {
        flex: 1 1 100%;
        width: 100% !important;
    }
}

/* CF-091 AD-10: the export bar (ReportExportBar; F .card.lg-tools, o.html 5758–5764): F's tools bar as a card — 52px,
   9 / 16px, 14px — with the run's context left (bold name, dim mono code, dim period) and the small exports right.
   The component's scoped CSS holds only its row. */
.report-export-bar {
    min-height: 52px;
    padding: 9px var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

.export-bar__info {
    color: var(--text-primary);
}

.export-bar__code {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.export-bar__period {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
    .report-export-bar {
        padding: var(--space-sm);
    }
}

/* CF-091: a row that leads the table without being a figure of it (Kartica kupca's opening balance, o.html 5776): the
   header's --solid-2 surface and 600, neutral — never the primary tint of .heavy-data-row--negative */
.heavy-data-scroll .ant-table .ant-table-tbody > tr.ant-table-row.heavy-data-row--emphasis > td {
    background: var(--heavy-data-solid-2) !important;
    font-weight: var(--font-weight-semibold);
}

/* CF-091 AD-7: a row whose balance is below zero (Lager lista): F's tr.has — the primary token mixed 9 % into the
   pinned surface (opaque under the sticky rows), the name 600. Out-ranks the body-row rule of overrides.css. */
.heavy-data-scroll .ant-table .ant-table-tbody > tr.ant-table-row.heavy-data-row--negative > td {
    background: color-mix(in srgb, var(--color-primary) 9%, var(--heavy-data-solid)) !important;
}

.heavy-data-scroll .ant-table .ant-table-tbody > tr.ant-table-row.heavy-data-row--negative: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--negative > td.ant-table-cell-fix-left-last {
    font-weight: var(--font-weight-semibold);
}

/* CF-099 F-b16-04: a negative figure in a heavy-data table — the danger text token (--color-error) read 4.46 : 1 on the
   negative row's tint in dark; the error's text shade (--color-error-light: lighter on dark, darker on light) keeps it
   at AA on the tint, its hover and the plain row in both themes */
.heavy-data-scroll .ant-table-tbody .text-danger {
    color: var(--color-error-light);
}

/* CF-091: the table's own empty line (F .lg-none, o.html 630) — "no rows for this filter" with the way back, inside
   the table under its header; pinned to the region's left edge while the table scrolls sideways */
.heavy-data-none {
    position: sticky;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    max-width: min(100%, 720px);
    padding: 28px 18px;
    color: var(--text-secondary);
    text-align: left;
    white-space: normal;
}

.heavy-data-none__action.ant-btn {
    height: auto;
    padding: 0;
}

.heavy-data-none__hint {
    flex-basis: 100%;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* CF-091: the loading face of a heavy-data table (o.html 3341–3343): a toolbar bar and compact skeleton rows */
.heavy-data-skeleton {
    padding: 9px var(--space-md) var(--space-md);
}

.heavy-data-skeleton__bar {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: var(--space-sm);
}

.heavy-data-skeleton__bar .ant-skeleton-element,
.heavy-data-skeleton__bar .ant-skeleton-input {
    width: 260px;
    max-width: 100%;
}

.heavy-data-skeleton__row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px repeat(3, 96px);
    gap: var(--space-md);
    align-items: center;
    height: var(--heavy-data-row-h, 34px);
}

.heavy-data-skeleton__row .ant-skeleton-element,
.heavy-data-skeleton__row .ant-skeleton-input {
    width: 100%;
    min-width: 0;
}

/* CF-099 F-b16-06: AntD's sheet loads after app.css and gives the small skeleton input 120px (width and min-width) at
   the same specificity, so each cell's bar ran past its 48 / 96px track and past the card's edge — the row's bars take
   their track (one class more than AntD's rule) */
.heavy-data-skeleton .heavy-data-skeleton__row .ant-skeleton-element .ant-skeleton-input {
    width: 100%;
    min-width: 0;
}

@media (max-width: 640px) {
    .heavy-data-skeleton__row {
        grid-template-columns: 48px minmax(0, 1fr) 72px;
    }

    .heavy-data-skeleton__row > :nth-child(n + 4) {
        display: none;
    }
}

/* Heavy-data pages give the rows the height (I-032 merge gate; F shows ≈ 11 ledger rows at 1440 x 900): from 769px up
   the chrome above the region is tighter than a form page's — the page padding, the header card and the filter card
   (one row on the trial balance: label beside the control) and the gaps between them — measured to leave ≥ 10 body
   rows in the trial balance's region at 1440 x 900. Below 769px the responsive paddings stay as they are. */
@media (min-width: 769px) {
    /* The page padding is F's content gutter (.main-content .page-wrapper) and the header is the shared PageHeader
       (.page-header--simple, no card, I-051): no padding of its own, so the title lines up with the cards as F's
       .page-hd does, and F's 24px to the first block */
    [data-pattern="heavy-data-page"] .page-header {
        margin-bottom: var(--space-lg);
    }

    /* F's period strip (.card.lg-period): 10px / 14px (Evidens I-041 TASK_11, ported by I-048) */
    [data-pattern="heavy-data-page"] .filter-card {
        padding: 10px 14px;
        margin-bottom: var(--space-md);
    }

    /* ... and so is a Filteri strip on any other page (CF-098 TASK_06: the open-items workbench, F openitems .lg-period;
       the page keeps its own rhythm below the strip) */
    .filter-card.filter-strip {
        padding: 10px 14px;
    }

    [data-pattern="heavy-data-page"] .book-totals {
        margin-bottom: var(--space-md);
    }

    [data-pattern="heavy-data-page"] .page-container > :not(style):not(.dev-path-badge) + :not(style):not(.dev-path-badge) {
        margin-top: var(--space-md);
    }
}
/* The heavy-data filter card, and a Filteri strip on any page (CF-098 TASK_06), has F's period-strip corners (.lg-period,
   --r-md 12px) at every width (I-041 TASK_11) */
[data-pattern="heavy-data-page"] .filter-card,
.filter-card.filter-strip,
[data-pattern="heavy-data-page"] .book-totals {
    border-radius: var(--radius-md);
}

/* A book's running totals (I-060, Evidens I-044 README Decision 22): one strip between the period filter and the
   book's table card, the totals side by side (stacked below 768px). Chrome from .glass-card; the rhythm is the filter
   card's — a book's aria-live wrapper is out of the .page-container owl's reach, and the card sat flush on the table
   card (VR4). One shared rule instead of a scoped copy per book. */
.book-totals {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.book-totals__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.book-totals__label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.book-totals__value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.book-totals__value--strong {
    color: var(--text-primary);
}

/* A negative total (CF-099 F-b17-10: Kartica kupca's foreign closing saldo) — the heavy-data negative ink (F-b16-04) */
.book-totals__value--negative {
    color: var(--color-error-light);
}

@media (max-width: 768px) {
    .book-totals {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Phone: the region leaves room for the page header only */
@media (max-width: 640px) {
    .heavy-data-scroll {
        height: clamp(300px, calc(100dvh - 300px), 2400px);
    }
}

/* CF-091 AD-14: a report hub (/reports/robno, /reports/finansije) — the hub's NavCards in one grid inside its glass
   card; one column on a phone */
.report-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

@media (max-width: 480px) {
    .report-hub-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================================================
   Wizard and settings patterns (I-033)

   The approved anatomy of the two pattern families (prototype F, screens "Wizard" and "Settings";
   /design-system#wizard-template and #settings-page-template).

   Wizard: a centred column (--wizard-column-width), a step strip card (.wizard-progress) holding AntD <Steps>
   with done / current / upcoming / error steps, the step card (.glass-card.wizard-step) that ends in the
   footer (.wizard-actions: a rule on top, Back left, the primary action right), and the result step
   (.wizard-result: ring, title, three CTA cards, a full-width primary button).
   Mechanism (I-033 TASK_01, README Decision 2): AntD Blazor 1.6 <Step Status="StepsStatus.Error"> renders
   .ant-steps-item-error next to Steps.Current (finish = check, error = close by default; IconTemplate takes a
   custom icon); <Step> has no attribute splatting, so the current-step marker and the hidden error count are
   visually hidden text in the step's TitleTemplate, not aria-current.

   Settings: .settings-tabs-layout--side (opt-in; the plain .glass-card.settings-tabs-layout stays for Billing,
   README Decision 8) around <Tabs TabPosition="TabPosition.Left">: the tab nav (--settings-nav-width) beside a
   content column capped at --settings-content-max at >= 1100px, one column with the nav as a horizontal,
   scrollable strip below. Each TabPane holds ONE .glass-card.settings-card whose .settings-section blocks are
   separated by a rule. Mechanism (README Decision 7): TabPosition.Left always plus CSS that flips the nav into
   the strip below 1100px — no JS, no re-render; ActiveKey and AntD's keyboard arrows are unaffected. AntD
   positions its ink bar with inline top / height for a vertical nav, so the pattern hides it and draws the
   selected bar itself (overrides.css, "Tabs Overrides").

   This block holds the pattern's own classes; everything on an .ant-* element (step bullets, labels, rails,
   tab items, the strip) is in overrides.css ("Steps Overrides", "Tabs Overrides"), which loads after AntD.
   Tokens only; the colours switch with the theme.
   ======================================================================== */

/* --- Wizard: the centred column (F .wz) --- */
[data-pattern="wizard-page"] .page-container--narrow {
    max-width: var(--wizard-column-width);
}

/* --- Wizard: the step strip is a card (F .steps); the AntD Steps inside are styled in overrides.css --- */
.wizard-progress {
    margin-bottom: 18px;
    padding: 14px 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* --- Wizard: hosted in an entity drawer (CF-092 TASK_06: the fiscal-year close). The drawer body is full-bleed (padding 0,
   for a sticky footer) and the shell's ".main-content .page-wrapper" zeroes the page padding, so the strip and the step
   card ran edge to edge and the last step's label was clipped; the wrapper takes the drawer body's inset and scroll
   (as .entity-drawer-body) --- */
.entity-drawer .ant-drawer-body > .page-wrapper[data-pattern="wizard-page"] {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-lg);
}

/* A drawer-hosted result step's exits (the fiscal-year close, a wrapping <Space> under .wizard-result) stay centred
   when they wrap (F .result .el-row: justify-content center). Scoped to .entity-drawer like the ≤ 480px stacking rule
   below, so the page-hosted results (packaging import, onboarding) keep their own layout (PR 986 thread 15823) */
.entity-drawer .wizard-result .ant-space {
    justify-content: center;
}

/* --- Wizard: the strip without its card (CF-092, F .steps--flat) — a wizard hosted in a drawer
   (<WizardSteps Flat="true">); the AntD Steps inside keep overrides.css "Steps", margin-bottom stays --- */
.wizard-progress.wizard-progress--flat {
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
}

/* --- Wizard: the step card (F .wz-card); .wizard-step__* below style its body --- */
.glass-card.wizard-step {
    padding: 26px 32px 22px;
}

/* The step's two-column field grid (F .wz-grid: gap 0 16px) — the fields' own bottom margin spaces the rows */
.wizard-step .form-grid {
    gap: 0 16px;
}

/* The step's header (F .wz-hd: the hint 4px under the title, the header 8px above the step's body); a body hint keeps
   its own 24px (CF-092 TASK_06, by eye on the import's steps 2 and 3) */
.wizard-step__title + .wizard-step__hint {
    margin-bottom: 8px;
}

/* A field's label inside the step card is F's form label (.flabel: 14px / 500, o.html 574), not the 13px filter-bar
   label it shares the class with (CF-092 TASK_06, O09 wizardFieldLabel) */
.wizard-step .filter-label {
    font-size: 0.875rem;
}

/* A step's field groups (.form-section: a label + a grid) are ruled groups inside the one step card, never a card
   in a card (B-008, F .fsec): every group has a rule above it (also the first, which follows the step's title and
   hint) and the parents' gap spaces them. This owns what the later card-chrome .form-section block (a surface of
   its own), ".form-section:first-child" (no padding, no rule) and "* + .form-section" (a margin on top of the gap)
   would otherwise set. */
.wizard-step .form-section {
    margin: 0;
    padding: var(--space-lg) 0 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-top: 1px solid var(--glass-border);
    border-radius: 0;
    animation: none;
}

/* A group's label inside the step card — and a drawer section's head (CF-088), a rail card's sub-heading (the
   eOtpremnica QR, CF-097) — is F's section label (.sec-label): the display face at 15px in the accent text colour, not
   the form page's uppercase eyebrow (I-033 TASK_08) */
.wizard-step .section-label,
.drawer-section > .section-label,
.vacts > .section-label {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-primary-text);
}

.wizard-step .section-label .anticon,
.drawer-section > .section-label .anticon,
.vacts > .section-label .anticon {
    color: inherit;
}

/* --- Wizard: the footer at the bottom of the step card, behind a rule (F .wz-f) --- */
.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    /* Inside an AntD <Form> the footer would inherit the form's light-theme near-black text */
    color: var(--text-primary);
}

/* A step without Back keeps its primary action on the right */
.wizard-actions > :only-child {
    margin-left: auto;
}

/* The reason a blocked primary action is disabled, right-aligned under the footer inside the card (F .wz-f + p.hint:
   12.5px muted, 5px under the footer — CF-092 TASK_06, the import's "fix the errors" line) */
.wizard-actions + .form-field__hint {
    margin: 5px 0 0;
    text-align: right;
}

/* A footer that keeps Cancel next to Back (the in-shell reporting wizards): both sit on the left, the primary
   action stays on the right */
.wizard-actions__start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* --- Wizard: choice cards (F .rcard) — a step that is one choice between options (onboarding account type).
   Promoted from AccountTypeStep.razor.css (I-036, README Decision 22); same look. A card that advances at once is a
   click / Enter / Space target with an arrow cue; a card that stays chosen takes .choice-card--selected. --- */
.choice-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
}

.choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: 20px;
    border: 1.5px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg-subtle);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.choice-card:hover {
    border-color: var(--color-primary-light);
    background: var(--color-primary-bg);
}

.choice-card:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* The chosen option (F .rcard:has(input:checked)) */
.choice-card--selected {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.choice-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    background: var(--color-fg-08);
    color: var(--text-secondary);
    font-size: 1.375rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.choice-card:hover .choice-card__icon,
.choice-card--selected .choice-card__icon {
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
}

.choice-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.choice-card__desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* The cue that a click moves on */
.choice-card__arrow {
    align-self: flex-end;
    margin-top: auto;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.choice-card:hover .choice-card__arrow {
    color: var(--color-primary-text);
}

/* Phone — stack the cards */
@media (max-width: 576px) {
    .choice-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- Wizard: the result step (F .result) --- */
.wizard-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0 2px;
    text-align: center;
}

.wizard-result__ring {
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--color-success) 14%, transparent);
    color: var(--color-success);
    font-size: 34px;
}

.wizard-result__ring--error {
    background: color-mix(in srgb, var(--color-error) 14%, transparent);
    color: var(--color-error);
}

.wizard-result__ring--muted {
    background: var(--color-fg-08);
    color: var(--text-secondary);
}

.wizard-result__title {
    margin: 0;
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

/* The title takes programmatic focus when the result step opens (tabindex="-1"), so no ring */
.wizard-result__title:focus {
    outline: none;
}

.wizard-result__subtitle {
    margin: 0;
    color: var(--text-secondary);
}

/* The result's secondary line under the subtitle — breakdown, reference, state (F .result > p.dim, o.html 3453) */
.wizard-result__meta {
    margin: 0;
    color: var(--text-muted);
}

.wizard-result__ctas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 22px 0 16px;
}

.wizard-result__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 18px 12px;
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg-subtle);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.wizard-result__cta > .anticon {
    color: var(--color-primary-text);
    font-size: 20px;
}

.wizard-result__cta:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-text);
}

.wizard-result__cta:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* The block button under the CTAs: <Button Type="Primary" Block Class="wizard-result__primary">. Two classes,
   because AntD's own .ant-btn height loads after this file. */
.ant-btn.wizard-result__primary {
    width: 100%;
    height: 42px;
}

/* --- Settings: the side layout (F .set) — the tab nav and the capped content column; the tab items and the
   <= 1100px strip are AntD elements and live in overrides.css --- */
.settings-tabs-layout.settings-tabs-layout--side {
    padding: 0;
}

/* --- Settings: one card per tab (F .set-card), capped in both layouts --- */
.glass-card.settings-card {
    max-width: var(--settings-content-max);
    padding: 4px 24px 20px;
}

/* Ruled sections (F .ssec): block padding instead of the stacked margin, a rule between neighbours */
.settings-card .settings-section {
    gap: 12px;
    padding: 18px 0;
}

.settings-card .settings-section + .settings-section {
    margin-top: 0;
    border-top: 1px solid var(--glass-border);
}

.settings-section__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

/* Icon slot before the title text, a trailing tag (e.g. "Novo") after it */
.settings-section__title > .anticon {
    color: var(--color-primary-text);
    font-size: 18px;
}

.settings-section__title > .ant-tag {
    margin-inline-end: 0;
}

/* The subtitle sits 4px under the title (the section's 12px gap minus 8) and 14px above the body */
.settings-section__subtitle {
    margin: -8px 0 2px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* A lone form control in a settings section is capped at F's 360px (F general tab: .fitem max-width 360px), so a
   short value such as the language does not span the card (I-033 merge gate, README Decision 26). Only a field that
   is a direct child of the section (a bare .form-field / .field-group) or a direct FormItem of an AntD Form in it (the
   Form sits in AntD's spin wrapper) is capped: fields inside a .form-grid row, tables, checkboxes, radio groups and
   buttons keep their width. */
.settings-section > :is(.form-field, .field-group) > :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-select, .ant-picker),
.settings-section .ant-form > .ant-form-item :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-select, .ant-picker) {
    max-width: var(--settings-field-max);
}

/* A read-only label / value row inside a section (F .info-row) */
.settings-info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    min-height: 40px;
    font-size: 14.5px;
    color: var(--text-primary);
}

.settings-info-row__label {
    min-width: 120px;
    color: var(--text-secondary);
}

/* A card's own closing row (the org page's "Sačuvaj izmene", a direct child of the card) is F's .set-save: at the
   content's start, 20px under the last section (o.html 1008, 3489). A section's own actions keep the pattern's
   right alignment (I-047 FIDELITY, pattern choices shipped with Evidens) — CF-090 TASK_03 */
.settings-card > .settings-section-actions {
    justify-content: flex-start;
    margin-top: 20px;
}

/* A field grid in a settings card (F .wz-grid of .fitem, o.html 393, 397, 665): 16px columns, no row gap, 14px under
   each field, the label 6px above its control; a hint hangs 5px under its control inside the item (AntD's -24px
   margin-offset would let a two-line hint run into the next row's label) — CF-090 TASK_03 */
.settings-card .form-grid {
    gap: 0 16px;
}

.settings-card .form-grid > .ant-form-item.ant-form-item {
    margin-bottom: 14px;
}

.settings-card .form-grid > .ant-form-item .ant-form-item-label {
    padding-bottom: 6px;
}

.settings-card .form-grid > .ant-form-item-with-help .ant-form-item-margin-offset.ant-form-item-margin-offset {
    margin-bottom: 0 !important;
}

.settings-card .form-grid > .ant-form-item-with-help .ant-form-item-explain {
    min-height: 0;
    margin-top: 5px;
}

/* The logo field in a settings section (F Brendiranje, o.html 1009, 3496): a 52px tile, the upload and remove
   actions on its row 10px apart, the hint 5px under the row — CF-090 TASK_03 */
.settings-section .image-upload-field {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.settings-section .image-upload-field__preview {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: var(--control-bg);
}

.settings-section .image-upload-field__preview img {
    object-fit: contain;
}

.settings-section .image-upload-field__preview .anticon {
    font-size: 24px;
}

.settings-section .image-upload-field__actions {
    gap: 10px;
}

.settings-section .image-upload-field__hint,
.settings-section .image-upload-field > .ant-alert {
    flex-basis: 100%;
}

.settings-section .image-upload-field__hint {
    margin-top: -3px;
    font-size: 12.5px;
}

/* Phone (F <= 640px): the step card and the settings card tighten, the result CTAs and the step's field grid
   stack. The step strip keeps only the current / error label (overrides.css). */
@media (max-width: 640px) {
    .wizard-progress {
        padding: 12px 14px;
    }

    /* The flat strip (CF-092) stays unpadded */
    .wizard-progress.wizard-progress--flat {
        padding: 0;
    }

    .glass-card.wizard-step {
        padding: 20px 18px 18px;
    }

    .wizard-step .form-grid,
    .wizard-result__ctas {
        grid-template-columns: minmax(0, 1fr);
    }

    .glass-card.settings-card {
        padding-inline: 16px;
    }
}


/* ========================================================================
   Icon row action (I-045)

   An icon-only row action (/design-system#icon-row-action, IconRowAction) and the page's one row confirm
   (RowConfirmHost), which replace AntD's Tooltip + Button + Icon + Popconfirm components in table rows (I-045 AD10).
   The button is AntD 1.6's own link-button markup (ant-btn ant-btn-link, -dangerous, -loading, [disabled]), so its
   rest / hover / focus / danger / loading / disabled looks stay AntD's and overrides.css's; this block adds only
   what replaces the Tooltip component: a CSS bubble on the button itself (::after) with its arrow (::before),
   measured against the global .ant-tooltip-inner (overrides.css "Tooltip Overrides", prototype F .tip) — the
   inverted ink chip, radius 6, padding 6px 10px, 12.5px / 500, line-height 1.4, the tooltip shadow, at most 250px
   wide — and AntD's geometry: 4px from the trigger plus AntD's 14.31px arrow band, an 11.31px square arrow turned
   45deg (radius 2 at the tip) centred on the button; AntD's 100 ms show and hide delays and its 100 ms zoom.
   Tokens only, so both themes follow the token blocks.
   The bubble never takes pointer events. An overflow ancestor (a table's scroll host) clips it, so a row within
   40px of the top of its scroll region opens it below: data-tooltip-placement="bottom" (IconRowAction
   TooltipPlacement). The row confirm is AntD's popover markup, styled by overrides.css "Popover / Popconfirm";
   js/row-confirm.js moves it under <body> and places it under its anchor (above when there is no room below).
   ======================================================================== */

/* 4px offset + AntD's 14.3137px arrow band (.ant-tooltip-placement-top padding-bottom) + the button's 1px border (the
   pseudo-elements resolve against its padding box, AntD measures from its border box); the arrow's centre sits on
   the bubble's edge, half its 11.3137px side inside */
.icon-row-action[data-tooltip] {
    --icon-row-action-gap: 19.3137px;
    --icon-row-action-arrow: 11.3137px;
}

/* The wrapper AntD's Popconfirm drew around its trigger (div.antblazor-overlay-trigger-wrapper, inline style
   display: inline-flex). A cell that keeps an AntD Button as the RowConfirmHost anchor keeps the wrapper too, so the
   cell's box does not change; the class replaces the inline style the lint refuses. Both classes: AntD's
   .antblazor-overlay-trigger-wrapper { display: block } loads after app.css, and a block trigger after another button
   in the cell drops to its own line (I-062 TASK_23: RetailLocationDetail's prices at 390). */
.antblazor-overlay-trigger-wrapper.row-confirm-trigger {
    display: inline-flex;
}

/* .ant-btn::before is AntD's loading wash (display: none, inset -1px; overrides.css hides it again on
   .ant-btn.ant-btn-loading): every inset is reset here, at a specificity above both */
.ant-btn.icon-row-action[data-tooltip]::before,
.ant-btn.icon-row-action[data-tooltip]::after {
    position: absolute;
    top: auto;
    right: auto;
    left: 50%;
    display: block;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    /* Hiding: AntD's 100 ms leave delay, then its zoom-big-fast leave curve */
    transition: opacity 0.1s cubic-bezier(0.78, 0.14, 0.15, 0.86) 0.1s,
                transform 0.1s cubic-bezier(0.78, 0.14, 0.15, 0.86) 0.1s,
                visibility 0s linear 0.2s;
}

/* The bubble: the text is the button's own data-tooltip (its aria-label) */
.icon-row-action[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + var(--icon-row-action-gap));
    z-index: 1070;
    box-sizing: border-box;
    width: max-content;
    min-width: 30px;
    max-width: 250px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--text-primary);
    color: var(--color-bg-dark);
    box-shadow: var(--shadow-tooltip);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 500;
    font-variant: tabular-nums;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    white-space: normal;
    overflow-wrap: break-word;
    transform: translateX(-50%) scale(0.8);
    transform-origin: 50% 100%;
}

/* The arrow: a square turned 45deg whose half inside the bubble is clipped away (it paints over the bubble's
   shadow, as AntD's arrow does) */
.icon-row-action[data-tooltip]::before {
    content: '';
    bottom: calc(100% + var(--icon-row-action-gap) - var(--icon-row-action-arrow) / 2);
    z-index: 1071;
    width: var(--icon-row-action-arrow);
    height: var(--icon-row-action-arrow);
    border-radius: 0 0 2px;
    background: var(--text-primary);
    box-shadow: 3px 3px 7px rgba(var(--color-shadow-rgb), 0.07);
    clip-path: polygon(150% -50%, 150% 150%, -50% 150%);
    transform: translateX(-50%) rotate(45deg);
}

.icon-row-action[data-tooltip]:is(:hover, :focus-visible)::before,
.icon-row-action[data-tooltip]:is(:hover, :focus-visible)::after {
    opacity: 1;
    visibility: visible;
    /* Showing: AntD's 100 ms enter delay, then its zoom-big-fast enter curve */
    transition: opacity 0.1s cubic-bezier(0.08, 0.82, 0.17, 1) 0.1s,
                transform 0.1s cubic-bezier(0.08, 0.82, 0.17, 1) 0.1s,
                visibility 0s linear 0.1s;
}

.icon-row-action[data-tooltip]:is(:hover, :focus-visible)::after {
    transform: translateX(-50%) scale(1);
}

/* Disabled: overrides.css fades a disabled button to .55 ("Disabled (every type but Primary)"), which would fade the
   bubble with it — AntD's tooltip over a disabled button is full strength. The fade moves to the button's content
   (the icon), so the button looks the same and the bubble does not dim. */
.ant-btn.icon-row-action[data-tooltip]:is([disabled], :disabled) {
    opacity: 1;
}

.icon-row-action[data-tooltip]:is([disabled], :disabled) > span {
    opacity: 0.55;
}

/* Below the button (a row at the top of its scroll region) */
.icon-row-action[data-tooltip][data-tooltip-placement="bottom"]::after {
    top: calc(100% + var(--icon-row-action-gap));
    bottom: auto;
    transform-origin: 50% 0;
}

.icon-row-action[data-tooltip][data-tooltip-placement="bottom"]::before {
    top: calc(100% + var(--icon-row-action-gap) - var(--icon-row-action-arrow) / 2);
    bottom: auto;
    box-shadow: -2px -2px 5px rgba(var(--color-shadow-rgb), 0.06);
    transform: translateX(-50%) rotate(225deg);
}

/* Above with the bubble's right edge on the button's (AntD's topRight): the last action of a right-pinned column, where
   a centred bubble would run past the scroll host's right edge and be clipped (I-045 TASK_09). The arrow stays centred
   on the button. */
.icon-row-action[data-tooltip][data-tooltip-placement="top-end"]::after {
    left: auto;
    right: 0;
    transform: scale(0.8);
    transform-origin: 100% 100%;
}

.icon-row-action[data-tooltip][data-tooltip-placement="top-end"]:is(:hover, :focus-visible)::after {
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .ant-btn.icon-row-action[data-tooltip]::before,
    .ant-btn.icon-row-action[data-tooltip]::after,
    .ant-btn.icon-row-action[data-tooltip]:is(:hover, :focus-visible)::before,
    .ant-btn.icon-row-action[data-tooltip]:is(:hover, :focus-visible)::after {
        transition: none;
    }
}

/* The row confirm. The host stays where the page put it (display: contents, no box); the popover inside it is moved
   under <body> by js/row-confirm.js, placed in document coordinates like AntD's overlays (absolute, z-index 9999,
   inline-flex) and shown once placed, so it never flashes at its in-page position. */
.row-confirm-host {
    display: contents;
}

.ant-popover.row-confirm {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    display: inline-flex;
    visibility: hidden;
}

.ant-popover.row-confirm.row-confirm--placed {
    visibility: visible;
}

/* A Popconfirm whose title is a sentence (OverlayClassName="popconfirm--wrap"): the text wraps at a confirm's width and
   never past the viewport, so AntD places a box that fits beside its anchor (CF-099 F-b11-05: TransferDetail's Aktiviraj
   ran 141px past the left edge at 834 on one line). Opt-in: a short confirm keeps its own width. */
.ant-popover.popconfirm--wrap {
    max-width: min(360px, calc(100vw - 32px));
}

.ant-popover.popconfirm--wrap .ant-popover-message-title {
    white-space: normal;
    overflow-wrap: break-word;
}


/* ========================================================================
   Playground-only utilities (F-176)

   These classes back demo-only chrome on `/design-system/playground/*` pages —
   variant comparison grids, "5-states-in-a-row" decorators, demo controls
   rows, in-frame caveats. They are NOT for production features. The `.pg-`
   prefix marks them as such.

   When a real feature legitimately needs a similar layout, promote the
   pattern out of this block into the main app.css utilities above. Do NOT
   reach into `.pg-*` from real feature pages.

   Source: specs/F-176-PlaygroundScopedCssCleanup/AUDIT_REPORT.md
   ======================================================================== */

/* Variant switcher control row — Empty, StatusResult */
.pg-variant-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: var(--space-xl);
    animation: pageSlideUp 0.4s ease-out;
}

/* Section-heading inside a playground glass-card — Tags, Feedback, Skeleton,
   Inputs, FileUpload, Drawers */
.pg-section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-md);
}

/* A .pg-section-title that opens a second demo further down the page, not the top of a card — Tables (I-034) */
.pg-section-gap {
    margin-top: var(--space-xl);
}

/* Companion body copy under .pg-section-title — FileUpload, Inputs, Drawers */
.pg-section-copy {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-md);
}

.pg-section-copy code {
    color: var(--color-primary-text);
    font-family: var(--font-mono);
}

/* Compare-N-variants block (top-border separator) — Skeleton, Wizard,
   Subscription, Inputs */
.pg-variant {
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

.pg-variant:first-of-type {
    padding-top: 0;
    border-top: none;
}

/* UPPERCASE letterspaced caption above each .pg-variant block */
.pg-variant-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}

/* 2-column variant-comparison grid (stacks at 768) — Inputs */
.pg-variant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
}

/* "label + control + hint" vertical stack inside .pg-variant-grid — Inputs */
.pg-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Inline-natural controls (Switch / Checkbox / Radio / Rate / Segmented) shouldn't
   stretch to fill the grid cell — they have intrinsic widths. Input / Select /
   DatePicker still stretch because they have their own width: 100%. */
.pg-field > .ant-switch,
.pg-field > .ant-radio-group,
.pg-field > .ant-checkbox-wrapper,
.pg-field > .ant-rate,
.pg-field > .ant-segmented {
    align-self: flex-start;
}

/* Generic vertical stack of demo items, gap-sm — Detail, Tags, Feedback */
.pg-stack-sm {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* "Label on left, control on right" demo row — Settings */
.pg-split-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

/* Centered single-state wrapper — Notifications */
.pg-center-row {
    display: flex;
    justify-content: center;
    padding: var(--space-md);
}

/* Flex-wrap row of demo trigger buttons — Modals, Drawers */
.pg-trigger-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.pg-trigger-row--center {
    align-items: center;
    gap: var(--space-lg);
}

/* One table-row skeleton (key, name, amount, status) — Skeleton (I-036, F skel('table')) */
.pg-skeleton-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 72px 48px;
    gap: var(--space-md);
    align-items: center;
}

.pg-skeleton-row .ant-skeleton-element,
.pg-skeleton-row .ant-skeleton-input,
.pg-skeleton-row .ant-skeleton-button {
    width: 100%;
    min-width: 0;
}

/* Static message toasts laid out in place (the live ones sit in the fixed .ant-message host) — Feedback (I-036) */
.pg-message-preview {
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.pg-message-preview .ant-message-custom-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.pg-message-preview .ant-message-custom-content > span:last-child {
    font-size: 14px;
}

/* Caveat / failure-mode notes list under a demo card — Modals */
.pg-notes-list {
    margin: 0;
    padding-left: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pg-notes-list code {
    font-family: var(--font-mono);
    color: var(--color-primary-text);
}

/* Single `margin-bottom` spacer for a demo control row — Settings */
.pg-demo-spacer {
    margin-bottom: var(--space-md);
}

/* Secondary-color helper paragraph under a demo — Skeleton */
.pg-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Flex-wrap row of demo controls (slider + button) above a demonstrator —
   Skeleton */
.pg-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

/* Inline-flex label wrapping a slider/switch in .pg-controls-row — Skeleton */
.pg-control-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Bare reset + flex column container for a "loaded list" demo — Skeleton */
.pg-demo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* 3-column "ref / label / amount" row used inside .pg-demo-list — Skeleton */
.pg-demo-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.pg-demo-list-item__ref {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.pg-demo-list-item__label {
    color: var(--text-primary);
}

.pg-demo-list-item__amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 500;
    color: var(--text-primary);
}

/* Visually-hidden file input for playground file-picker demos — FileUpload */
.pg-visually-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Viewport-fitting demo card to keep a long feed visible on-screen — AuditLog */
.pg-scroll-card-70vh {
    max-height: 70vh;
    overflow-y: auto;
}

/* Heavy-data playground: the grouped-ledger section (I-032) under the infinite-scroll one, its heading row with
   the render-time readout (ms from data ready to rows painted) */
.pg-heavy-ledger {
    margin-top: var(--space-xl);
}

.pg-heavy-ledger__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-md);
}

.pg-heavy-ledger__readout {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

/* Written by js/heavy-data-timing.js; a dash until the first measurement */
.pg-heavy-ledger__readout-value:empty::before {
    content: "—";
}

/* Variant cards side by side, one column from 992px down — ContextChooser */
.pg-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: start;
    margin-bottom: var(--space-lg);
}

@media (max-width: 992px) {
    .pg-card-row {
        grid-template-columns: 1fr;
    }
}

/* A strip of the dark sidebar a shell control sits on; pair it with .theme-dark-island — ContextChooser */
.pg-island-strip {
    max-width: var(--sider-width);
    margin-top: var(--space-md);
    padding: var(--space-sm);
    border: 1px solid var(--color-fg-08);
    border-radius: var(--radius-md);
    background: var(--color-bg-dark);
}

/* The same strip as wide as the icon rail */
.pg-island-strip--rail {
    display: flex;
    justify-content: center;
    width: var(--sider-rail-width);
}

/* --- Responsive: Tablet (768px) --- */
@media (max-width: 768px) {
    /* I-008 (D4): column stack; stretch, not the base flex-end, so a narrower item never drifts right */
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* I-008 (D4): 0,3,0 out-ranks a scoped `.filter-item--x[b-…]` (0,2,0) — the scoped flex-basis would
       otherwise become the item's HEIGHT in the column stack (audit: 240-280px items from a page's scoped
       `.filter-item--x` modifier). The doubled class gains that specificity without requiring a .filter-card
       ancestor, so filter rows inside a glass-card reset the global --actions/--date basis too */
    .filter-row > .filter-item.filter-item {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    /* I-008 (D4): wrap, so a button pair never pushes past the card's left edge */
    .filter-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .page-header__actions {
        flex-direction: column;
        width: 100%;
        align-items: flex-start; /* B-028 (1329): Tags/Segmented keep their natural width; buttons are widened below */
    }

    /* B-009 (AD9) + B-028 (1343, 1360): equal-width, centred mobile header buttons — direct buttons and
       links, and a Popconfirm/Tooltip/Dropdown wrapper around a button together with its button.
       B-008 (2589, 2648): a Button.Group / Space.Compact / Dropdown.Button is one control, not split 50/50 */
    .page-header__actions > .ant-btn,
    .page-header__actions > a,
    .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button),
    .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button) > .ant-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* B-008 (2620): a Space-wrapped action row stretches like direct buttons instead of shrinking to its
       intrinsic width under `align-items: flex-start` */
    .page-header__actions > .ant-space {
        width: 100%;
    }

    .page-header__actions > .ant-space > .ant-space-item {
        flex: 1 1 0;
    }

    .page-header__actions > .ant-space > .ant-space-item > .ant-btn {
        width: 100%;
    }

    /* I-008 (D10): the catalog's "tabs become horizontally scrollable" — native scroll + a thin visible scrollbar as
       the affordance; AntD's JS translate would fight the native scroll, its "more" button is redundant with it */
    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-wrap {
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--glass-border) transparent;
    }

    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-list {
        transform: none !important;
    }

    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-operations {
        display: none;
    }

    /* I-012: keep the overflow inside the wrap. A card that is a flex/grid item keeps min-width: auto = the strip's
       min-content, grows past its container and leaves the wrap nothing to scroll (wrap scrollWidth == clientWidth);
       min-width: 0 down the flex chain stops that. The list, not the wrap, carries the overflow (flex: none), and an
       individual `translate` on it — which `transform: none` does not reach — would push the first tab past the
       wrap's left edge, where scrollLeft cannot go. */
    .settings-tabs-layout {
        min-width: 0;
        max-width: 100%;
    }

    .settings-tabs-layout > .ant-tabs,
    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav,
    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-wrap {
        min-width: 0;
    }

    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-wrap {
        flex: 1 1 auto;
    }

    .settings-tabs-layout > .ant-tabs > .ant-tabs-nav .ant-tabs-nav-list {
        flex: none;
        translate: none !important;
    }

    .page-wrapper {
        padding: var(--space-lg);
    }

    /* Stacked: the title block and the actions start at the left edge (the row form aligns them on the bottom line) */
    .page-header--with-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    /* Playground utilities — mobile collapse */
    .pg-variant-grid {
        grid-template-columns: 1fr;
    }

    .pg-demo-list-item {
        grid-template-columns: 1fr;
    }

    .pg-demo-list-item__amount {
        text-align: left;
    }
}

/* --- I-012: 44px touch targets at <=480px (AntD default controls are 32px) ---
   specs/I-012-MobileTouchTargetsWideTables/PLAN.md AD3/AD7. Every interactive control outside a table cell is at least
   44px tall on a phone; desktop keeps AntD's default sizes (nothing here applies above 480px). Measured by the L2 probe
   (scripts/audit-page-design/mobile-probes.js) and the E2E probe (MobileLayoutProbe.cs) with the same selector list.
   Specificity: `ant-design-blazor.css` loads AFTER app.css (index.html), so an equal-specificity rule here loses to
   AntD's own `display` / `height` / `align-items`. AntD sets no `min-height` on these controls, so the lift itself
   needs no extra weight (exception: AntD's `textarea.ant-input { min-height: 32px }` outweighs `.ant-input` — every
   template TextArea has Rows >= 2, so none renders under 44px); the doubled class (0,2,0 — the `.filter-item.filter-item` idiom above) is used only where a
   property AntD does set must change. No `!important`: AntD uses none on these rules. A page's scoped rule
   (App.styles.css, loaded after app.css) of equal weight still wins, so `.sidebar-toggle-btn` / `.logout-btn` keep
   their own flex layout and only grow taller. */
@media (max-width: 480px) {
    /* Buttons, every size (`-sm` included). `min-height` beats AntD's fixed `height: 32px` / `24px`; inline-flex
       centres the label in the taller box (AntD's inline-block would leave it at the top). Icon-only buttons
       (incl. circle icon buttons) also get a 44px width so they stay square/round instead of a 32x44 sliver */
    .ant-btn.ant-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* The header's notification bell is a plain button (F #bell .btn--icon, lifted by F v16.1's 480px block): 44px square
       (CF-096 TASK_05, the `bell` key at 390 on O05 / O32) */
    .shell-header-actions .notification-bell-button {
        width: 44px;
        height: 44px;
    }

    .ant-btn.ant-btn-icon-only {
        min-width: 44px;
    }

    /* Table cells keep AntD's compact row actions (AD3 exemption, as design-lint `button-size`). Written as a later,
       heavier reset instead of an ancestor `:not()`, so the lift above stays one plain selector: `:is()` takes its
       heaviest argument (0,1,0), giving 0,3,0 over the 0,2,0 lift. `unset` = `auto` — AntD sets no min-height or
       min-width here, so the 24/32px box returns; `inline-block` is AntD's own `.ant-btn` display */
    :is(td, th, .ant-table-cell) .ant-btn.ant-btn {
        min-height: unset;
        min-width: unset;
        display: inline-block;
    }

    /* Running text keeps its line (B-051 AD5): a Link/Text button (not icon-only) whose parent is a text container
       flows with the sentence instead of breaking it into a 44px box. Standalone Link/Text buttons (action rows,
       list items, card footers) keep the lift. The same parent list is `RUNNING_TEXT` in mobile-probes.js, which
       exempts these controls (`inRunningText`) — change the two together. Same idiom as the cell reset: `:is()` takes
       its heaviest argument, so parent (0,1,0) + type (0,1,0) + `:not()` (0,1,0) = 0,3,0 over the 0,2,0 lift.
       `min-height: unset` / `height: auto` / `padding: 0` / `inline-block` let the label set the box, as an inline
       link does. Never `li`, `.ant-list-item` or an action row: those are standalone targets */
    :is(p, dd, label, small, .ant-typography, .section-copy, .page-subtitle, .ant-alert-message, .ant-alert-description,
        .ant-form-item-extra, .ant-form-item-explain, .ant-empty-description) > :is(.ant-btn-link, .ant-btn-text):not(.ant-btn-icon-only) {
        min-height: unset;
        height: auto;
        padding: 0;
        display: inline-block;
    }

    /* Inputs, number inputs, pickers. The affix wrapper (prefix/suffix, password) is the 44px box; its inner input
       drops the lift and stretches to the wrapper's content height (AntD: `height: auto` in an inline-flex row).
       The number input's inner <input> is AntD's `height: 30px` (32 minus borders) — 42px keeps the text centred */
    .ant-input,
    .ant-input-affix-wrapper,
    .ant-input-number,
    .ant-picker {
        min-height: 44px;
    }

    .ant-input-affix-wrapper > input.ant-input {
        min-height: 0;
    }

    /* MoneyInput's currency wrapper (`.ant-input-number-affix-wrapper`, 1px border, no padding) is the visible box;
       its borderless inner InputNumber takes 42px so the whole field is 44px, not 44 + 2 */
    .ant-input-number-affix-wrapper > .ant-input-number {
        min-height: 42px;
    }

    .ant-input-number:not(:is(td, th, .ant-table-cell) *) .ant-input-number-input {
        height: 42px;
    }

    /* Selects. AntD fixes the single selector at `height: 32px` with a 30px line-height on the selected item and
       placeholder; the selector is already `display: flex`, so `align-items: center` keeps the text centred at any
       height (AntD sets no align-items on it). The absolutely placed search input (AntD `height: 30px`, 0,4,0) is
       stretched to the selector so a typed query sits on the same line as the selected item. Multiple selectors
       already centre their chips (`align-items: center`) */
    .ant-select-single .ant-select-selector,
    .ant-select-multiple .ant-select-selector {
        min-height: 44px;
    }

    .ant-select-single .ant-select-selector {
        align-items: center;
    }

    .ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input {
        height: 100%;
    }

    /* Clickable tags and filter chips: tag links, checkable tags, button-role tags, radio buttons, segmented items.
       AntD's `display: inline-block` (0,1,0) needs the extra class/attribute/element to give way to inline-flex */
    a.ant-tag,
    .ant-tag.ant-tag-checkable,
    .ant-tag[role="button"],
    .ant-radio-button-wrapper.ant-radio-button-wrapper,
    .ant-segmented-item.ant-segmented-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Checkbox and radio: the hit box is the wrapper <label>, not the 16px box. AntD aligns the row on its baseline,
       which in a 44px box pins box and label to the top; centring needs the box's `top: 0.2em` baseline nudge
       removed, or it sits ~3px below its label */
    .ant-checkbox-wrapper.ant-checkbox-wrapper,
    .ant-radio-wrapper.ant-radio-wrapper {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .ant-checkbox-wrapper .ant-checkbox,
    .ant-radio-wrapper .ant-radio {
        top: 0;
    }

    /* Pagers: page items, prev/next and the ••• jump items are AntD's fixed 32px boxes (`height`, so the doubled
       class). The table's own mini pager is pinned at 32px with `!important` in overrides.css, the one place this
       block must answer in kind */
    .ant-pagination-item.ant-pagination-item,
    .ant-pagination-prev.ant-pagination-prev,
    .ant-pagination-next.ant-pagination-next,
    .ant-pagination-jump-prev.ant-pagination-jump-prev,
    .ant-pagination-jump-next.ant-pagination-jump-next {
        min-width: 44px;
        height: 44px;
        line-height: 42px;
    }

    /* Every mini pager — a table's and a standalone one (the record-history drawer's, I-047) — keeps the 44px items */
    .ant-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item,
    .ant-pagination.ant-pagination-mini .ant-pagination-prev.ant-pagination-prev,
    .ant-pagination.ant-pagination-mini .ant-pagination-next.ant-pagination-next,
    .ant-pagination.ant-pagination-mini .ant-pagination-jump-prev.ant-pagination-jump-prev,
    .ant-pagination.ant-pagination-mini .ant-pagination-jump-next.ant-pagination-jump-next,
    .ant-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link.ant-pagination-item-link,
    .ant-pagination.ant-pagination-mini .ant-pagination-next .ant-pagination-item-link.ant-pagination-item-link {
        min-width: 44px !important;
        height: 44px !important;
        line-height: 42px !important;
    }

    /* Switch: the 24px (I-036, F .sw; small: 16px) track stays as drawn — a transparent top/bottom border grows the hit
       box to 44px and `background-clip` keeps the colour inside it. The handle is placed against the padding box, so it
       does not move. In a .switch-field the extra border is taken back from the top margin so the track stays on the
       label — one custom property carries the border, so each size (10px default, 14px small) takes back its own */
    .ant-switch.ant-switch {
        --touch-switch-border: 10px;
        height: 44px;
        border-block: var(--touch-switch-border) solid transparent;
        background-clip: padding-box;
    }

    .ant-switch.ant-switch-small {
        --touch-switch-border: 14px;
    }

    .switch-field > .ant-switch {
        margin-top: calc(var(--space-xs) - var(--touch-switch-border));
    }

    /* Table cells keep their dense rows (AD3, as the button reset above): every other listed control drops the lift.
       `:is()` adds 0,1,0 over each lift selector, and this block comes later */
    :is(td, th, .ant-table-cell) :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-picker),
    :is(td, th, .ant-table-cell) .ant-input-number-affix-wrapper > .ant-input-number,
    :is(td, th, .ant-table-cell) :is(.ant-select-single, .ant-select-multiple) .ant-select-selector,
    :is(td, th, .ant-table-cell) :is(a.ant-tag, .ant-tag.ant-tag-checkable, .ant-tag[role="button"]),
    :is(td, th, .ant-table-cell) .ant-radio-button-wrapper.ant-radio-button-wrapper,
    :is(td, th, .ant-table-cell) .ant-segmented-item.ant-segmented-item,
    :is(td, th, .ant-table-cell) .ant-checkbox-wrapper.ant-checkbox-wrapper,
    :is(td, th, .ant-table-cell) .ant-radio-wrapper.ant-radio-wrapper {
        min-height: unset;
    }

    /* A labelled checkbox/radio in a cell keeps AntD's own alignment (B-051 AD6): its wrapper is not 44px tall
       there, so the lift's centring and `top: 0` only take the box off its label's text line. Wrapper: 0,1,0 (`:is()`)
       + 0,1,0 = 0,2,0, equal to the 0,2,0 lift and later, so it wins. Box: `:is()` takes its heaviest argument
       (`.ant-checkbox-wrapper .ant-checkbox`, 0,2,0) + 0,1,0 = 0,3,0 over the 0,2,0 `top: 0`. Outside cells nothing
       changes */
    :is(td, th, .ant-table-cell) :is(.ant-checkbox-wrapper, .ant-radio-wrapper) {
        align-items: baseline;
    }

    :is(td, th, .ant-table-cell) :is(.ant-checkbox-wrapper .ant-checkbox, .ant-radio-wrapper .ant-radio) {
        top: 0.2em;
    }

    :is(td, th, .ant-table-cell) .ant-switch.ant-switch {
        --touch-switch-border: 0px;
        height: 24px;
        border-block-width: 0;
    }

    :is(td, th, .ant-table-cell) .ant-switch.ant-switch-small {
        height: 16px;
    }
}

/* --- Responsive: Small mobile (480px) — playground utilities --- */
@media (max-width: 480px) {
    .pg-controls-row {
        gap: var(--space-sm);
    }
}

/* Responsive - Mobile */
@media (max-width: 576px) {
    .page-wrapper {
        padding: var(--space-md);
    }
}

/* Prototype F ≤ 640: the page title steps down to 24px; the subtitle stays body text */
@media (max-width: 640px) {
    .page-title {
        font-size: 1.5rem;
    }
}

/* --- CF-023 SLA countdown chip urgency pulse (global; F-176: no component-scoped CSS) ---
   Applied via the `sla-chip--urgent` class on SlaCountdownChip's ATag when an inbound
   purchase invoice is overdue, at the PricingStatusBadge pulse cadence. CF-099 F-b9-07: the cue is a ring that breathes
   around the tag in its own error colour — the tag and its text stay at full opacity, so the label keeps its AA contrast
   in both themes at every frame (the 55 % opacity pulse read 2.91:1); no motion under prefers-reduced-motion. */
.sla-chip--urgent {
    animation: slaUrgentPulse 1.8s ease-in-out infinite;
}

@keyframes slaUrgentPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--color-error-bg);
    }
    50% {
        box-shadow: 0 0 0 3px var(--color-error-bg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sla-chip--urgent {
        animation: none;
    }
}

/* --- CF-023 E-Fakture inbox accept/reject modal + detail meta (global; F-176: no component-scoped CSS) --- */
.ar-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ar-modal-comment {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.required-marker {
    color: var(--color-error);
    margin-left: 2px;
}

.prerequisite-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-left: 3px solid var(--color-warning);
    border-radius: var(--radius-sm, 4px);
    background: rgba(var(--color-warning-rgb), 0.08);
}

/* CF-099 F-b10-06: the year-sealed / lock banner's action link (ApprovedBanner's "Upravljanje fiskalnim godinama") read
   4.1 : 1 on light's warning alert ground — the link ink for a subtle ground (--color-link-text-on-subtle, F-b3-04) clears
   4.5 : 1; dark keeps its link colour (it passed) */
:root[data-theme="light"] .lock-banner .ant-alert-action a {
    color: var(--color-link-text-on-subtle);
}

/* CF-099 F-b7-08: on light the default link (the primary) read 4.18 : 1 on the hint's warning tint — the link ink for a
   subtle ground (--color-link-text-on-subtle, F-b3-04) clears 4.5 : 1; dark keeps its link colour (it passed) */
:root[data-theme="light"] .prerequisite-hint a {
    color: var(--color-link-text-on-subtle);
}

.field-error {
    color: var(--color-error);
    font-size: var(--font-size-xs);
}

.detail-header__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

.detail-header__meta-item {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ========================================
   Report page utilities — ledger tables, empty states, numeric columns.
   Promoted globally (CF-039 TASK_18) so report pages that correctly carry
   zero scoped CSS (CashDaybookReport, KepuReport, etc.) can compose from
   globals only, per F-176 / heavy-data-page catalog rule.
   Canonical source: CustomerLedgerReport.razor.css
   ======================================== */

/* Secondary / muted inline text inside report sections. */
.muted {
    color: var(--text-muted);
}

/* Table section card — the one owner of a table card's box (B-070 L139): no inner padding, so the bar and the table reach
   the card edge (it outranks .glass-card's padding by coming later at the same weight), clipped to its radius. */
.table-card {
    padding: 0;
    overflow: hidden;
}

/* CF-099 TASK_52: the hand-written .ledger-table (and .ledger-table-wrapper) left with the last report moved onto
   LiteTable — no App Razor file renders it, so its rules are deleted (CF-098 TASK_19 hand-over). */

/* Table-header tier (I-051 AD-7, F th): 12.5px / 600, sentence case — for the hand-built report tables
   (.articles-table, .movements-table, .pivot-table), the document line tables and the transfer field-change table
   alike; a page's scoped CSS sets only its own padding, border and background, never the header's type */
.articles-table th,
.movements-table th,
.pivot-table th,
.line-table th,
.field-changes-table th {
    color: var(--text-secondary);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

/* Table-cell tier (I-051 AD-6, F td). These tables are not AntD's, so without a size of their own they inherit the
   15px body (overrides.css). The report tables are F's ledger text, 13.5px (.lg, the same size as the heavy-data
   compact rows); the document line tables are F's item grid, which keeps F's table text, 14px (.it in `table`) */
.articles-table td,
.movements-table td,
.pivot-table td {
    font-size: 0.84375rem;
}

.line-table td {
    font-size: var(--font-size-sm);
}

/* Subtotal / closing-balance row — visually distinct from data rows. */
.totals-row td {
    background: var(--glass-bg);
    border-top: 2px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-primary);
}

/* Error/alert container at the top of a report page — separates alert from filter block. */
.error-container {
    margin-bottom: var(--space-md);
}

/* Filter grid layout for report filter rows — responsive auto-fit columns. */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    align-items: end;
}

/* Filter item modifier: spans two columns (e.g., the register/partner picker
   that should be wider than a single date or status field). */
.filter-item--full-md {
    grid-column: span 2;
}

/* Filter item modifier: right-aligns action buttons (Generate, Print, etc.)
   at the trailing edge of the filter row. */
.filter-item--actions {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .filter-item--full-md {
        grid-column: span 1;
    }

    .filter-item--actions {
        align-items: stretch;
    }
}

/* ========================================
   Report summary band + per-section header + grand total.
   Promoted globally (CF-034 TASK_10) so report pages carrying zero scoped CSS
   (PackagingBalanceReport, and eventually KartoniReport) can compose from
   globals only, per F-176 / heavy-data-page catalog rule. Canonical source:
   KartoniReport.razor.css. Composed entirely from CSS variables.
   ======================================== */

/* Horizontal band of label/value summary stats inside a .glass-card. */
/* CF-099 F-b16-09: the band lays its stats out on the stat-grid rule (.dashboard-stat-grid, I-060): at most
   --stat-grid-max (4) per row, each track the larger of 160px and an even share of the row, auto-fit collapsing the
   tracks no stat uses — four stats are one row at 834 instead of three and an orphan; two per row at <= 768 and on a
   phone (a 2 x 2 band, never four stacked rows). */
.summary-band {
    --stat-grid-max: 4;
    display: grid;
    grid-template-columns: repeat(auto-fit,
        minmax(max(160px, (100% - (var(--stat-grid-max) - 1) * var(--space-md)) / var(--stat-grid-max) - 0.1px), 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.summary-stat__label {
    font-size: var(--font-size-xs2);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.summary-stat__value {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Per-group (partner/driver) section header inside a .heavy-data-section. */
.driver-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}

/* CF-099 F-b16-11: a section head with actions — the title block on the left, the actions at their natural width on the
   title row (they wrap under it on a phone); the plain head above keeps its column */
.driver-section-header--with-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-md);
}

.driver-section-header__title {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

.driver-section-header__actions {
    display: flex;
    flex: none;
    gap: var(--space-sm);
}

.section-eyebrow {
    font-size: var(--font-size-xs2);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.section-title-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Grand-total section — the trailing .heavy-data-section.glass-card already
   stands apart; the larger .grand-total-row type carries the emphasis. No brand
   color here (--color-primary is reserved for CTAs / active states). */
.grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-md);
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

.grand-total-row .num {
    font-variant-numeric: tabular-nums;
}

/* Two per row from 992px down (the shared stat grid's step, .dashboard-stat-grid): at 834 the band is narrower than four
   160px tracks, so auto-fit drew 3 + 1 (CF-099 F-b16-09) */
@media (max-width: 992px) {
    .summary-band {
        --stat-grid-max: 2;
    }
}

@media (max-width: 768px) {
    .summary-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* A phone keeps the 2 x 2 band; the figure one step smaller so a long amount stays on its line */
@media (max-width: 480px) {
    .summary-stat__value {
        font-size: var(--font-size-lg);
    }
}


/* ========================================================================
   Document pages (I-038)
   Prototype F's two document models (f.src.html "Shared design-system additions", parts 1 and 2) under F's own class
   names: the detail model (F "Faktura" / invoiceDetail: .doc-layout > .doc-main + aside.doc-rail) and the form model
   (F "Nova faktura" / invoice: titled cards, .card-b.fgrid, .cols-2, the line grid, the sticky .actbar). Showcase:
   /design-system#detail-page-template, #form-page-template, #line-grid, #doc-rail; seeds: the detail and form
   playgrounds; components: DocRailCard, DocActionBar (App/Components/Shared/DocumentPage). The AntDesign side (Table
   cells and inputs inside .it--*, Descriptions in .doc-main, Steps / Timeline in .rs) is the block of the same title
   in overrides.css — this file loads before AntD's stylesheet, so AntD internals are styled there.
   Every rule is scoped to these classes (README I-038 Decision 14). F's tokens map to the App's: --glass → --glass-bg,
   --glass-2 → --glass-bg-light, --glass-subtle → --glass-bg-subtle, --border → --glass-border, --border-2 →
   --glass-border-light, --text / --text-2 / --muted → --text-primary / --text-secondary / --text-muted, --solid /
   --solid-2 → --color-solid / --color-solid-2, --err → --color-error-light, --r-sm / --r-md / --r-lg → --radius-sm /
   --radius-md / --radius-lg, --overlay-bg → --color-bg-elevated (as the modal, I-031), --pop-shadow → --shadow-pop.
   ======================================================================== */

/* F --pop-shadow: the raised bar's shadow (new token; light: the ink at 0.18, as F) */
:root, .theme-dark-island {
    --shadow-pop: 0 16px 48px rgba(var(--color-shadow-rgb), 0.4);
}

:root[data-theme="light"] {
    --shadow-pop: 0 16px 48px rgba(16, 19, 26, 0.18);
}

/* ── Cards: F's .card is the App's .glass-card. A document card pads its parts, not itself (.doc-card); its head is
   .mx-hd (h2 18px / 600), its body .card-b, its footer .card-ft. A table card is .glass-card.table-card (F .tcard). ── */
.glass-card.doc-card {
    padding: 0;
}

.mx-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 14px 12px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.mx-hd > h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
}

/* A drawer section's label as the title of a card head (I-038: the journal drawer's lines section carries its balance tag
   in the head): the label keeps no margin of its own under it */
.mx-hd > .section-label {
    margin: 0;
}

/* ... and such a head in a drawer section is the section's label row, not a card head: no card-head padding or rule, so
   it lines up with the other section labels (F .fsec h3.sec-label; I-038 TASK_10 — the journal and payroll drawers) */
.drawer-section > .mx-hd {
    padding: 0;
    margin-bottom: 12px;
    border-bottom: 0;
}

/* The push-right spacer of a card head or footer, or of a line grid's tools row (F .sp) */
.mx-hd > .doc-sp,
.card-ft > .doc-sp,
.lg-tools > .doc-sp {
    flex: 1 1 auto;
}

/* A card head's small facts (F .mx-hd small, o.html 305: 13px muted) — a crew's kg / km / late totals (CF-098 TASK_14)
   [ShipmentList Redosled rute] */
.mx-hd > small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* The count pill after a card or rail title (F .cnt) */
.mx-hd .cnt,
.rs-h .cnt {
    display: inline-block;
    flex: none;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg-light);
    color: var(--text-secondary);
    font: 600 12px/18px var(--font-body);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* F's .cnt is --glass-2: a white pill on light (as the work queue's counts, CF-086 TASK_06) — the card head's count and
   the sortable list's sequence (CF-098 TASK_14) */
:root[data-theme="light"] :is(.mx-hd .cnt, .rs-h .cnt, .sortable-list__seq) {
    background: var(--glass-bg);
}

.card-b {
    padding: 16px 20px 18px;
}

.card-ft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    min-height: 52px;
    padding: 10px 16px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.card-ft b {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── The record's number after the page title (F .page-hd h1 .mono: the title's size at .875, mono) and a mono value
   anywhere in a document (F .mono); PageHeader renders TitleContent beside the h1, so it repeats the h1's box. ── */
.page-header__title-row > .mono {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: calc(1.75rem * 0.875);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* The title is 1.5rem at <= 576px ("Responsive - Mobile"); the number follows it at .875 */
@media (max-width: 576px) {
    .page-header__title-row > .mono {
        font-size: calc(1.5rem * 0.875);
    }
}

/* A master-data record's name after the kind title (CF-097 PLAN AD-10: the name in the title's own type, the code as
   .mono in the subtitle; CF-099 F-b2-14). PageHeader renders TitleContent beside the h1, so it repeats the h1's type. */
.page-header__title-row > .page-header__record {
    margin: 0;
    min-width: 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

/* ...and its code in the subtitle, mono (PageHeader SubtitleContent; CF-099 F-b2-14) */
.page-subtitle > .mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .page-header__title-row > .page-header__record {
        font-size: 1.5rem;
    }
}

/* The read-only document variant has no .doc-layout (heavy-data-detail: the journal entry, the opening inventory —
   CF-097 TASK_11); :where keeps its weight at .mono's own, so .doc-hd > .mono still sets the number */
:is(.doc-layout, .actbar) .mono,
:where([data-pattern="heavy-data-detail"]) .mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
}

/* A form whose children are the page's cards and its action bar (F <form style="display:contents">): spaced like the
   page container's children, one column that never grows past the container */
.doc-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
}

/* ── Detail model: main column + rail (F .doc-layout). One column below 1280px; at 701–1279 the rail's cards go two
   across under the document (.doc-rail--split); from 1280 the rail is a 320px column, sticky. ── */
.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* A document without a rail (the lint rule detail-grid-structure: a .doc-layout has a .doc-rail or this modifier) */
.doc-layout.doc-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.doc-main {
    display: grid;
    /* One column that never grows past the main column (I-038 TASK_10): an implicit auto track took the min-content of a
       wide table in a .doc-card (PPP-PD's amendments, 600px) and pushed every card past the viewport at 480 / 390, where
       main clipped it; with the track capped, the table's own .table-card--scroll-x host scrolls. */
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    align-content: start;
}

/* The main column's rhythm is its gap (CF-098 TASK_12, the cash register day): the block-flow margins a list page's filter
   card (below it) and the block after a stat grid (above it) carry would add to the gap — 40px between the Dan filter and
   the session card and between the stat cards and the movements, where F keeps one step between every block. */
.doc-main > .filter-card {
    margin-bottom: 0;
}

.doc-main > .dashboard-stat-grid + :not(style) {
    margin-top: 0;
}

.doc-rail {
    display: grid;
    /* One column that never grows past the rail (I-038 TASK_12, as .doc-main in TASK_10): the implicit auto track took
       the min-content of the PIO panel's empty-state button (350px) and pushed every rail card 30px past the 320px rail
       at 1440 — OccupationalDiseaseDetail. The split rule below still sets two columns at 701–1279. */
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    align-content: start;
}

@media (min-width: 701px) and (max-width: 1279px) {
    .doc-rail.doc-rail--split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (min-width: 1280px) {
    .doc-layout:not(.doc-layout--single) {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
    }

    /* A page that draws its rail only with the record renders its loading / error / not-found face in .doc-main
       alone: one column, as a face outside the layout — never an empty 320px track beside it (I-060, Evidens I-044
       README Decision 25). Only a lone .doc-main: a form bottom's main + totals panel keeps its column. */
    .doc-layout:not(.doc-layout--single):has(> .doc-main:only-child) {
        grid-template-columns: minmax(0, 1fr);
    }

    .doc-rail {
        position: sticky;
        top: 16px;
    }
}

/* ── Rail card (DocRailCard: section.glass-card.rs > .rs-h > h2 [+ .cnt] [+ extra], then the body) ── */
.glass-card.rs {
    padding: 16px 18px;
}

/* An empty state's call to action in a rail card wraps its label instead of overflowing the 284px card body
   (I-038 TASK_12: "Pokreni PIO veštačenje / invalidnost" needs 288px on one line); a one-line label keeps the 36px height.
   The floor stops at 480px, where the global touch-target rule's 44px minimum applies (this selector outweighs it). */
.glass-card.rs .empty-state__cta > .ant-btn {
    height: auto;
    white-space: normal;
}

@media (min-width: 481px) {
    .glass-card.rs .empty-state__cta > .ant-btn {
        min-height: 36px;
    }
}

.rs-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.rs-h > h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
}

.rs-h small {
    color: var(--text-muted);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

/* The rail's vertical action list (F .vacts): full-width buttons, label at the start */
.vacts {
    display: grid;
    gap: 8px;
}

/* Linked / related records and payments (F .alist): 46px rows split by a rule */
.alist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alist > li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.alist > li + li {
    border-top: 1px solid var(--glass-border);
}

.alist .nm {
    flex: 1;
    min-width: 0;
    display: grid;
}

.alist .nm small {
    color: var(--text-muted);
    font-size: 12.5px;
}

/* A record link as the row's name (an AntD link button): F's <b> line, flush left over its <small> — the grid stretched
   the button across the row with its text centred and its 16px padding (I-060, Evidens I-044 Decision 21 (e)). */
.alist .nm > .ant-btn-link {
    justify-self: start;
    max-width: 100%;
    height: auto;
    padding: 0;
    text-align: left;
}

/* The row's icon tile (F .q-ic) */
.alist .q-ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-fg-08);
    color: var(--text-secondary);
}

/* ── Document header card: number + status tags (F .doc-hd), the parties (F .parties / .party) ── */
.doc-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* A header card whose .doc-hd is all it holds (PayrollRunDetail: the tags; its facts are the stat cards) keeps the card's
   own padding below it (I-038 TASK_10) */
.card-b > .doc-hd:last-child {
    margin-bottom: 0;
}

.doc-hd > .mono {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* A header card whose record has no number names it in the body face (CF-099 F-b11-07: OpeningInventoryDetail's warehouse
   name — mono is for numbers and codes); the same size and weight as the number, a long name wraps */
.doc-hd > .doc-hd__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.party {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg-subtle);
    color: var(--text-secondary);
    font-size: 13.5px;
}

.party b {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* The key facts of a document's header card (F .cgrid > dl.desc — every Operans document screen, otp first): bordered
   Descriptions Column=1 (the dl.desc look is the bordered Descriptions' own, overrides.css), one column below 1200px and
   two from 1200px (CF-097 TASK_05) */
.cgrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 1200px) {
    .cgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* ── Totals (F .totals): a right-aligned dl, the last row .is-total ── */
.totals {
    display: grid;
    gap: 6px;
    max-width: 320px;
    margin: 0 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.totals > div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--text-secondary);
}

.totals dt {
    font-weight: inherit;
}

.totals dd {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.totals > .is-total {
    padding-top: 8px;
    border-top: 1px solid var(--glass-border-light);
    color: var(--text-primary);
    font-weight: 700;
}

.totals > .is-total dd {
    font-size: 1em;
}

/* In a card footer the totals take the row's end (F: .card-ft > .sp + .totals) */
.card-ft > .totals {
    margin-left: auto;
}

/* A display number (F .big-num) */
.big-num {
    display: block;
    font: 700 26px/1.2 var(--font-display);
    font-variant-numeric: tabular-nums;
}

/* ── Form model: the form grid (F .fgrid: 190px tracks), a field spanning two (.span-2), two cards side by side
   (.cols-2) ── */
.fgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0 16px;
}

.fgrid > .span-2 {
    grid-column: span 2;
}

/* A field in the grid (F .fgrid .fitem: 12px under it); the AntD FormItem's is in overrides.css */
.fgrid > .form-field {
    margin-bottom: 12px;
}

/* A nested block of the grid (.fgrid.span-2, design.md § The form model) is an item of it like a field: the same 12px under it */
.fgrid > .fgrid.span-2 {
    margin-bottom: 12px;
}

/* Its label (F .fitem > label: 14px / 500, --text-2); a filter bar's .filter-label keeps 13px (CF-096 TASK_05, O05) */
.fgrid > .form-field > .filter-label {
    font-size: var(--font-size-sm);
}

.cols-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

/* A filter label and its control never split on wrap (F .lg-pair) */
.lg-pair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.lg-pair > label {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Line grid (F .it--*): the classes go on the table host — AntD's Table Class (AntD 1.6 puts it on div.ant-table) or a hand-built
   <table> — and on the columns (Column Class on each td, HeaderClass on th). This file styles the hand-built table
   and the parts AntD does not draw; the AntD cells are in overrides.css. ── */
table.it--form,
table.it--fit,
table.it--dense {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

/* The head of a hand-built grid (F's table th: 12.5px / 600, the secondary text on the subtle glass — the AntD tables
   get it from the table pattern; I-038 TASK_06) */
:is(table.it--form, table.it--fit, table.it--dense) > thead > tr > th {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--glass-bg-subtle);
}

/* A hand-built read-only table (F .it--fit). An AntD Table keeps its own min-width: 100% (overrides.css, I-038 TASK_08). */
table.it--fit {
    min-width: 0;
}

/* 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, so a table does not inherit the body's 1.5), where the inherited 1.5 made it 37.75px (CF-097
   TASK_05; the AntD side is in overrides.css). CF-099 F-b12-17: a hand-built form grid's head is F's 35px too — the retail
   grid opts in (it--f-head: O110 keys its th); the other form grids keep the inherited 1.5 until a pair keys their head */
table.it--fit > thead > tr > th,
table.it--form.it--f-head > thead > tr > th {
    line-height: normal;
}

table.it--form > :is(thead, tbody, tfoot) > tr > :is(th, td),
table.it--fit > :is(thead, tbody, tfoot) > tr > :is(th, td),
table.it--dense > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    padding: 9px 14px;
    white-space: nowrap;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
}

table.it--form > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child,
table.it--fit > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
    padding-left: 18px;
}

table.it--form > :is(thead, tbody, tfoot) > tr > :is(th, td):last-child,
table.it--fit > :is(thead, tbody, tfoot) > tr > :is(th, td):last-child {
    padding-right: 18px;
}

table.it--form > tbody > tr > td {
    padding-top: 6px;
    padding-bottom: 6px;
}

table.it--tight > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    padding-left: 8px;
    padding-right: 8px;
}

table.it--dense > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    padding: 9px 8px;
}

table.it--dense > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
    padding-left: 12px;
}

table.it--dense > :is(thead, tbody, tfoot) > tr > :is(th, td):last-child {
    padding-right: 12px;
}

table.it--form > tfoot > tr > td,
table.it--dense > tfoot > tr > td {
    border-top: 1px solid var(--glass-border-light);
    background: var(--glass-bg-subtle);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

table.it--form > tfoot > tr > td {
    padding-top: 10px;
    padding-bottom: 10px;
}

table.it--dense > tfoot > tr > td {
    padding-top: 11px;
    padding-bottom: 11px;
}

/* Cell kinds — on a hand-built table and on AntD columns alike (Column Class lands on the td) */
:is(.it--form, .it--fit, .it--dense) td.rn,
:is(.it--form, .it--fit, .it--dense) th.rn {
    width: 44px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

:is(.it--form, .it--fit, .it--dense) :is(td, th).num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.it--form td.cell-wide {
    min-width: 240px;
}

/* CF-099 F-b12-04: an editor in a read-only table's wide cell (the count's Razlike cause — a hand-built read-only table.it--fit; a form grid's
   wide cell is .it--form's own) holds a line of text: the cell keeps the grid's 240px floor and the editor fills it, its counter dropped (data-table-cell) */
table.it--fit:not(.it--form) > tbody > tr > td.cell-wide {
    min-width: 240px;
}

table.it--fit:not(.it--form) > tbody > tr > td.cell-wide .ant-input {
    width: 100%;
}

/* CF-099 F-b7-13: the line editor in edit mode inside a detail page's 794px doc-main card (SalesOrderDetail's Izmeni) is a
   tablet-wide grid at any viewport — the wide cell drops its 240px floor, a long product label no longer sizes its column
   and the quantity keeps its value and unit — so the grid fits the card at 1440 (it ran 161px past it) */
.doc-main table.it--tab-fit > tbody > tr > td.cell-wide {
    min-width: 140px;
}

.doc-main table.it--tab-fit > tbody > tr > td.cell-wide > .ant-select {
    contain: inline-size;
    width: 100%;
}

.doc-main table.it--tab-fit > tbody > tr > td.cell-num > .input-unit {
    min-width: 132px;
}

/* CF-099 F-b7-12: the read-only line editor (ProductLineEditor ReadOnly, a hand-built table.it--fit) fits its card at
   1440 — the product column takes what the number columns leave (they keep their content width), a long name
   ellipsizes with its title, and the column never drops under 100px (below that the card's scroller takes over) — the Service
   Draft 00142's figures (800.000,0000 · 1.200.000.000,00) leave the name 123px at 1440 */
.product-line-editor > table.it--fit > tbody > tr > td.col-product,
table.it--fit > tbody > tr > td.cell-name-fill {
    width: 100%;
    min-width: 100px;
    max-width: 0;
}

.product-line-editor > table.it--fit > tbody > tr > td.col-product .cell-2 > *,
table.it--fit > tbody > tr > td.cell-name-fill .cell-2 > * {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CF-099 F-b11-03 / -04: the same on any hand-built read-only lines table that opts in (td.cell-name-fill — TransferDetail,
   WorkOrderDetail's read-only faces), with F-b8-02's tight figure columns (cell-tight, below): every row stays one line
   (the otp pairs O88 / O89 pin the head and the product row's height), the name takes what the figures leave */
table.it--fit > :is(thead, tbody) > tr > :is(th, td).cell-tight {
    padding-left: 8px;
}

table.it--fit > :is(thead, tbody) > tr > :is(th, td).cell-tight:not(:last-child) {
    padding-right: 8px;
}

/* …and a tight figure that breaks between its words (td.cell-tight.cell-wrap-words — WorkOrderDetail's quantity over its
   unit, its lot code at the hyphen) sets its two lines at 1.15, inside the two-line name's 33.8px (cell-2: 14px and 12px at
   1.3), so the row keeps the product row's height (O89's td: 52.8px) */
table.it--fit > tbody > tr > td.cell-tight.cell-wrap-words {
    line-height: 1.15;
}

.it--form td.cell-mid {
    min-width: 150px;
}

/* A long-label select in a line grid's cell-mid column fills its cell and never sizes the column — its longest label
   would widen the grid past its card at 1440; the dropdown shows the labels in full. The cell's hints wrap inside the cell
   for the same reason. Scoped to a grid whose class is .line-items-form: inert until a grid uses it (CF-096 / CF-098
   measure with overflowX). */
.line-items-form td.cell-mid > :is(.ant-select, .form-field__hint) {
    contain: inline-size;
}

.line-items-form td.cell-mid > .form-field__hint {
    white-space: normal;
}

/* The same for the product select of a many-column grid's cell-wide column (CF-096 TASK_13, the self-supply): the column
   keeps its 240px floor and takes the free width, the chosen product's label ellipsizes there and reads in full in the
   dropdown — the longest product name would otherwise widen the grid past its card at 1440. */
.line-items-form td.cell-wide > .ant-select {
    contain: inline-size;
}

/* …and a quantity with its unit keeps room for a four-decimal value beside the unit ("12,5000 kom"): the free width a
   many-column grid shares out would otherwise leave it at the 110px cell-num floor, which clips the value. */
.line-items-form td.cell-num:has(> .input-unit) {
    min-width: 140px;
}

/* The same floor for a hand-built it--form grid's quantity cell that opts in (td.cell-num.cell-unit — PurchaseReceiptCreate,
   SupplierReturnCreate; TransferCreate, WorkOrderCreate's two grids and OpeningInventoryCreate, CF-099 F-b11-09): at
   834 / 390 the grid already scrolls sideways and the cell sat at the 110px cell-num floor, so the unit took the box and
   "10,0000" was cut inside the input (CF-099 F-b10-13). 160px holds a four-decimal thousands value beside its unit
   ("1.250,0000 kom" — an opening inventory's quantity cut at 140px, F-b11-09). Opt-in: no other grid changes. */
.it--form td.cell-num.cell-unit {
    min-width: 160px;
}

/* An amount cell that opts in (td.cell-num.cell-money — the journal line grid's Iznos, the opening balance's two amounts,
   CF-099 F-b14-13): the 110px cell-num floor cut "125.000,0(" inside the input. From 1200px the floor is 128px — a
   seven-digit amount, and the journal grid still fits its card at 1440 (O79 / O82's lineGridFit: its other columns' floors
   take 1013 of the 1142px); below, where the grid already scrolls sideways, the cell holds a nine-digit amount
   ("999.999.999,99" in its 140px control). Opt-in: no other grid changes. */
.it--form td.cell-num.cell-money {
    min-width: 128px;
}

@media (max-width: 1199.98px) {
    .it--form td.cell-num.cell-money {
        min-width: 156px;
    }
}

/* A two-span option (.vat-opt) for such a select: in its 150px cell the name ellipsizes and the short value after it always
   shows ("Standar… (20%)"); in the dropdown the label reads in full. */
.vat-opt {
    display: inline-flex;
    max-width: 100%;
    vertical-align: top;
}

.vat-opt__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vat-opt__rate {
    flex: none;
    white-space: pre;
}

/* The name ellipsizes itself; the selected item's own ellipsis would only mark AntD's 0-width ::after placeholder. */
.ant-select-selection-item:has(> .vat-opt) {
    text-overflow: clip;
}

/* AntBlazor renders a Select's label template straight into .ant-select-selector (there is no .ant-select-selection-item to
   carry the arrow's room), so the selected option keeps clear of the 12px arrow (right: 11px) through the selector's own
   padding: the rate never runs under the caret in a narrow cell (CF-096 B2). */
/* (ant-design-blazor.css loads after this file: its `.ant-select-single:not(.ant-select-customize-input) .ant-select-selector`
   padding has the same specificity, hence the doubled class.) */
.ant-select.ant-select-single .ant-select-selector:has(.vat-opt) {
    padding-inline-end: 28px;
}

/* In a .line-items-form grid the short numeric cells hold their 84px control (cell-sm) instead of the 110px cell-num
   floor, and the remove button is F's 28px icon button, so a wide grid fits its card at 1440 (measured by the checker's
   overflowX metric). Inert until a grid uses .line-items-form. */
.line-items-form td.cell-num.cell-sm {
    min-width: 100px;
}

.line-items-form td.col-actions .ant-btn {
    width: 28px;
    min-width: 28px;
    padding-inline: 0;
}

.it--form td.cell-num {
    min-width: 110px;
}

/* A quantity with its unit (CF-096 AD-4; o.html .inpwrap--suffix in td.cell-num): the .input-unit affix wrapper is the
   visible field, as wide as any cell-num control (overrides.css caps those at 140px), so the InputNumber fills it up to
   the unit instead of keeping its own cell-sm cap inside a wider box. */
table.it--form td.cell-num > .input-unit {
    max-width: 140px;
}

.it--form td.cell-out {
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

:is(.it--form, .it--fit, .it--dense) th.th-wrap {
    min-width: 96px;
    white-space: normal;
}

/* The one flexible, wider column of a fixed-layout table (e.g. Opis) */
:is(th, col).cell-grow {
    width: 40%;
}

/* Two-line cell in the grid: the control (or name) over a small name / code / error line (F .cell-2, .t-err). The base
   .cell-2 rule is the table pattern's (CF-100 AD-5, earlier in this file — I-049 Overlap 6). */
.it--form .cell-2 > small {
    max-width: 320px;
    margin: 3px 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.it--form .cell-2 > small.t-err {
    color: var(--color-error-light);
}

/* F .t-err (o.html 329: --err) on a figure in a line grid or sheet: the retail grid's over-cap margin % and the kalkulacija's
   capped / negative margin % cell (CF-098 TASK_10) — no global .t-err exists, so the class painted nothing there */
.it .t-err {
    color: var(--color-error-light);
}

/* A tag under its control (the journal's Storno line, CF-096 TASK_15) keeps no trailing gap: F's .tag has none, and AntD's 8px
   would widen the column and push a many-column grid past its card at 1440. */
.it--form .cell-2 > .ant-tag {
    justify-self: start;
    margin-inline-end: 0;
}

/* The grid's error strip under the table (F .line-err, role=alert). Its ink is F's --err: --color-error-mark is that value in
   both themes (#ff7875 dark, #cf222e light) — --color-error-light is darker on light (I-069 TASK_06, fidelity O122) */
.line-err {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 0;
    color: var(--color-error-mark);
    font-size: 13px;
}

/* ── Sticky action bar at the bottom of a form or document page (DocActionBar, F .actbar): the summary (.sum) pushes
   the buttons right; the reason a button is disabled (.why) takes its own row, right-aligned. ── */
.actbar {
    position: sticky;
    bottom: 0;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: -8px;
    padding: 12px 16px;
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-pop);
}

.actbar > .sum {
    display: grid;
    min-width: 0;
    margin-right: auto;
    line-height: 1.3;
}

.actbar > .sum small {
    color: var(--text-muted);
    font-size: 12.5px;
}

.actbar > .sum b {
    color: var(--text-primary);
    font: 700 18px/1.3 var(--font-display);
    font-variant-numeric: tabular-nums;
}

/* No summary: the buttons still sit at the right end */
.actbar > .actbar__spacer {
    margin-right: auto;
}

.actbar > .why {
    flex-basis: 100%;
    order: 9;
    color: var(--text-muted);
    font-size: 12.5px;
    text-align: right;
}

/* One reason (DocActionBar Reasons; F whyBar → .sdot.sdot--warn, o.html 777–778): an 8px warn diamond 7px before 13.5px
   secondary text — the CF-091 hint mark (CF-096 TASK_05) */
.actbar > .why > .why__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84375rem;
    color: var(--text-secondary);
}

/* F's reasons sit 12.5px apart (the space between them + this) */
.actbar > .why > .why__item + .why__item {
    margin-left: 10px;
}

.actbar > .why > .why__item::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: var(--color-warning-mark);
    transform: rotate(45deg);
}

/* ── Stat cards in a narrow column (F .scards--tight: four across, no icon tile) on the App's .stat-card ── */
.scards--tight {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.scards--tight > .stat-card {
    padding: 12px 14px;
}

.scards--tight > .stat-card > .stat-icon {
    display: none;
}

/* F .scards--tight .scard b: a tight card's value is 20px (the full card's 22px); I-038 TASK_10 (P58) */
.scards--tight > .stat-card > .stat-value {
    font-size: 1.25rem;
}

/* A stat card that opens its list (F .scard--link) */
a.scard--link,
button.scard--link {
    appearance: none;
    width: 100%;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--transition-base), background var(--transition-base);
}

/* The same hover and keyboard ring as the App's clickable stat card (.stat-card--clickable) */
.scard--link:hover {
    border-color: var(--color-primary);
    background: var(--glass-bg-light);
}

.scard--link:focus-visible {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 2px;
}

/* A template picker four across with no icon tile (F .rcards--compact) on the App's choice cards */
.rcards--compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rcards--compact > .choice-card {
    position: relative;
    padding: 14px 16px;
    /* A choice card that is a <button role="radio"> (the journal's template picker) keeps the card's left-aligned text */
    text-align: left;
}

/* The radio mark in the card's corner (F .rc-check): an empty ring, filled with the brand and its check once chosen */
.rcards--compact > .choice-card > .choice-card__check {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--glass-border-light);
    border-radius: 50%;
    color: transparent;
    font-size: 14px;
}

.rcards--compact > .choice-card--selected > .choice-card__check {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.rcards--compact > .choice-card > .choice-card__icon {
    display: none;
}

.rcards--compact > .choice-card :is(b, .choice-card__title) {
    font-size: 15px;
}

@media (max-width: 1100px) {
    .rcards--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* The line grid fits a tablet: the running column folds away, the totals stay (F .it--tab-fit) */
    table.it--tab-fit,
    .it--tab-fit .ant-table-content > table {
        min-width: 0;
    }

    :is(table.it--tab-fit, .it--tab-fit .ant-table-content > table) col:nth-child(6) {
        visibility: collapse;
    }

    /* CF-099 F-b7-13: the hand-built grid's wide cell drops its 240px floor here too (F's tab-fit has no min-width) to 192px —
       the empty product Select's "Izaberite proizvod" stays whole — and a long product label no longer sizes its column; the
       quantity keeps its value and its unit ("165,0000 kom" read "165,C") — so the grid fits the 834 card, and at 390 it
       scrolls inside the card's scroller */
    table.it--tab-fit > tbody > tr > td.cell-wide {
        min-width: 192px;
    }

    table.it--tab-fit > tbody > tr > td.cell-wide > .ant-select {
        contain: inline-size;
        width: 100%;
    }

    table.it--tab-fit > tbody > tr > td.cell-num > .input-unit {
        min-width: 132px;
    }
}

@media (max-width: 900px) {
    .cols-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .scards--tight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .fgrid > .span-2 {
        grid-column: auto;
    }

    .parties {
        grid-template-columns: minmax(0, 1fr);
    }

    .rcards--compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .actbar {
        gap: 8px;
        padding: 10px 12px;
    }

    .actbar > .sum {
        flex-basis: 100%;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
    }

    .actbar > .sum b {
        font-size: 16px;
    }
}

/* ── Document card content shared by the Support detail pages (I-038 TASK_15): the header card's title line, an
   attachment link and the small "add attachment" control of a reply / comment form. Scoped to .doc-card. ── */
.doc-card .subject-line {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.doc-card .attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background var(--transition-base) ease, color 0.2s ease;
}

.doc-card .attachment-link:hover {
    background: var(--glass-border);
    color: var(--color-primary);
}

.doc-card .attachment-size {
    color: var(--text-muted);
}

.doc-card .upload-area-small {
    position: relative;
    display: inline-block;
}

.doc-card .upload-label-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color var(--transition-base) ease, color 0.2s ease;
}

.doc-card .upload-label-small:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ── CF-099 F-b19-11: the support details' card contents (TicketDetail, FeatureRequestDetail), moved out of their
   scoped stylesheets (detail-page allows none). The thread (.thread) is one tile family for a ticket's conversation and
   a request's comments — o.html sefin's party boxes: the subtle fill, a hairline border, the author's stripe on the
   leading edge (support / admin: the secondary text colour). .doc-prose is a record's free text, .doc-files its
   attachment links, .doc-form-actions an inline editor's Otkaži / Sačuvaj row, .doc-ref-link a referenced record,
   .doc-notice a card's icon + text notice, .vote-tally the rail's vote button and count. ── */
.thread {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.thread__item {
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg-subtle);
}

.thread__item--staff {
    border-left-color: var(--text-secondary);
}

.thread__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 12px;
}

.thread__author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.thread__author-name {
    font-weight: 500;
    color: var(--text-primary);
}

.thread__edited {
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted);
}

.thread__time {
    font-size: 12px;
    color: var(--text-muted);
}

.thread__body,
.doc-prose {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.thread__files,
.doc-files {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.thread__actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: 12px;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-border);
}

.thread__editor {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.doc-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: var(--space-md);
}

.thread__editor > .doc-form-actions {
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

@media (max-width: 480px) {
    .thread__head {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

.doc-ref-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.doc-ref-link:hover {
    color: var(--color-primary);
}

.doc-ref-link__number {
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.doc-ref-link__subject {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.doc-notice {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.doc-notice > .anticon {
    font-size: 24px;
}

.doc-notice__text {
    flex: 1;
}

.doc-notice__text > strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.doc-notice__text > p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .doc-notice {
        flex-direction: column;
        text-align: center;
    }
}

.vote-tally {
    display: grid;
    gap: var(--space-sm);
}

.vote-tally__count {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}


/* ── CF-098 (PLAN AD-4): the F classes the Operans-only screens draw that the App lacked, under F's own names
   (f.src.html line numbers; first Operans user in brackets). Tokens as in the head of this block, plus F --primary-bg →
   --color-primary-bg, --accent-text → --color-link-text, --ok → --color-success (text, tint) / --color-status-operational
   (a mark), --warn → --color-warning-mark, --err (a mark) → --color-error-mark, color-mix(var(--text) n%) →
   --color-fg-NN. Showcase: /design-system#match-rows. ── */

/* F .match (f.src.html 1057, 1122): two lists side by side, one column below 1100px; F's 16px between them (CF-098
   TASK_06, O102) [OpenItemsWorkbench; PackagingReconciliationDetail] */
.match {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    align-items: start;
}

/* F .mono inside the lists (a row's number, a footer's sum): mono, .875em, tabular — :where keeps it at F's .mono weight,
   so .mrow-main > b keeps its 14px as in F (CF-098 TASK_06, O102) [OpenItemsWorkbench] */
:where(.match) .mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
    .match {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* F ul.qcard (251–252): a list card's rows, no list chrome, a hairline between rows [OpenItemsWorkbench] */
ul.qcard {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

ul.qcard > li + li {
    border-top: 1px solid var(--glass-border);
}

/* F .qnone (274): the empty face of a list side ("— nema uplate —") [OpenItemsWorkbench] */
.qnone {
    margin: 0;
    padding: 28px 16px;
    color: var(--text-muted);
}

/* F li.mrow (1058–1060): icon · main · amount, the status line under main and amount; the pick (.is-on, or a pressed
   .mrow-main) takes the primary tint and keeps it under the pointer [OpenItemsWorkbench] */
.mrow {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas: "ic main amt" ". st st";
    gap: 6px 12px;
    align-items: center;
    padding: 12px 16px;
    transition: background var(--transition-fast);
}

.mrow:hover {
    background: var(--glass-bg-subtle);
}

.mrow.is-on,
.mrow:has(> .mrow-main[aria-pressed="true"]),
.mrow.is-on:hover,
.mrow:has(> .mrow-main[aria-pressed="true"]):hover {
    background: var(--color-primary-bg);
}

/* F .mrow-ic (1061–1062): the 32px icon tile, neutral; .in (an inflow) in the success tint [OpenItemsWorkbench] */
.mrow-ic {
    grid-area: ic;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--color-fg-08);
    color: var(--text-secondary);
}

.mrow-ic.in {
    background: color-mix(in srgb, var(--color-success) 14%, transparent);
    color: var(--color-success);
}

/* F .mrow-main (1063–1066): the number over its date line; as a button (the row is the pick, aria-pressed) a reset whose
   hit area is the whole row and whose focus ring is the App's (--color-primary-glow, 4px off the text, F) [OpenItemsWorkbench] */
.mrow-main {
    grid-area: main;
    display: grid;
    gap: 1px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
}

button.mrow-main {
    cursor: pointer;
}

button.mrow-main::after {
    content: "";
    position: absolute;
    inset: 0;
}

button.mrow-main:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.mrow-main > b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.mrow-main > small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

/* A date past due in the date line (F .t-err) */
.mrow-main .t-err {
    color: var(--color-error-light);
}

/* F .mrow-amt (1067–1068): the open amount, mono, tabular, right; .in (an inflow) in the success colour [OpenItemsWorkbench] */
.mrow-amt {
    grid-area: amt;
    justify-self: end;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mrow-amt.in {
    color: var(--color-success);
}

/* F .mrow-st (1069–1070): the row's status line (a proposal chip, a tag); above the pick's hit area so its own
   controls stay reachable [OpenItemsWorkbench] */
.mrow-st {
    grid-area: st;
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
}

/* F .sugg (1072–1073): the dashed "FIFO predlog" chip with the proposed amount [OpenItemsWorkbench] */
.sugg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    height: 26px;
    padding: 0 9px;
    border: 1px dashed color-mix(in srgb, var(--color-primary) 55%, transparent);
    border-radius: 7px;
    background: var(--color-primary-bg);
    color: var(--color-link-text);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.sugg > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* F .sdot (775–776): a status line, the state told by the mark's shape as well as its colour — ok a circle, err a
   square, warn the 8px diamond the action bar's reasons already draw (.why__item::before); one geometry for all three
   [EfaktureReceiptHandoff; ReceiptFromEOtpremnicaModal; ShipmentList Redosled rute] */
.sdot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 0.84375rem;
}

.sdot > i {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.sdot--ok > i {
    background: var(--color-status-operational);
}

.sdot--err > i {
    border-radius: 2px;
    background: var(--color-error-mark);
}

.sdot--warn > i {
    border-radius: 1px;
    background: var(--color-warning-mark);
    transform: rotate(45deg);
}

/* F .prog / .prog-t / .prog-f (790–792): the "Prebrojano n od m" line — the track, its fill, the text after it
   [StockCountDetail] */
.prog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.prog-t {
    height: 8px;
    border-radius: 4px;
    background: var(--color-fg-10);
    overflow: hidden;
}

.prog-f {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--color-primary);
}

/* F .cbar-facts (481): the facts line of a document head (label + value pairs) [StockCountDetail; CashRegisterDetail] */
.cbar-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    min-width: 0;
}

/* F .lg-hint (599): the hint line under a table card's tools or a crew's head [EOtpremnicaInboundTab; ShipmentList Redosled rute] */
.lg-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 12.5px;
}

/* F .lg-tools (f.src.html 594–597): a line grid's tools row — the scan / search field in .inpwrap (at most 300px), the
   small buttons (F .btn--sm, 166: 28px, 10px sides, 13px, radius 6 — from 481px up, a phone keeps the 44px touch
   target), a push-right .doc-sp. In a padded card (a detail tab) it takes F's gaps, not F's card-edge padding; the field's
   AntDesign side is in overrides.css "Document pages (I-038)" (CF-098 TASK_08, O14) [StockCountDetail Popisna lista] */
.lg-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.lg-tools > .inpwrap {
    flex: 1 1 220px;
    max-width: 300px;
}

.detail-tab-section > .lg-tools {
    margin-bottom: var(--space-md);
}

/* The same F .btn--sm opts in by class on a single button outside a tools row: the retail form's "Popuni iz trenutnog
   stanja" in its header card's .card-ft (F retail #rt-pre; CF-098 TASK_10) */
@media (min-width: 481px) {
    .lg-tools > .ant-btn,
    .ant-btn.btn--sm {
        height: 28px;
        padding: 0 10px;
        border-radius: 6px !important;
        font-size: 0.8125rem;
    }
}

/* The sortable list's drop target (F .alist li.is-drop, 964) and the up / down move pair of a stop row (F roPage
   btn--icon pair; a keyboard reorder through the same call as a drop); 44px touch targets at <=480px, as every other
   control outside a table cell [ShipmentList Redosled rute] */
.sortable-list__item.is-drop {
    box-shadow: inset 0 2px 0 var(--color-primary);
}

.sortable-list__move {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 4px;
}

/* F .btn--sm.btn--icon (o.html 171): the move buttons are 28px squares from 481px up (CF-098 TASK_14) */
@media (min-width: 481px) {
    .sortable-list__move > .ant-btn.btn--sm {
        width: 28px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .sortable-list__move > .ant-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* A card head's leading icon (F secHead / roGroupHtml ic(…, 18)): only a direct child of the head — an icon inside the h2
   (TicketDetail's reference card) keeps the title's size [ShipmentList Redosled rute; EfaktureInboxDetail,
   EfaktureReceiptHandoff (CF-098 TASK_16)] */
.mx-hd > .anticon {
    font-size: 18px;
}


/* ========================================================================
   Form bottom (I-042)
   Prototype F's v15 form-page bottom (f.src.html "v15 form-page bottom", owner decision 19; README I-042 Decisions
   12–14): "Dodaj stavku" is the line grid's last row (tr.it__add — LineGridAddRow), the grid has no tfoot total, and ONE
   totals panel (dl.pd-rows — DocTotalsPanel) sits under the grid in .doc-layout's 320px column, the left column holding
   only the document's note (an aria-hidden empty .doc-main when it has none). Below 1280px the columns stack (.doc-layout
   as it is — reused, not forked). The sticky .actbar keeps "n stavki · Sveukupno" over the amount (DocActionBar +
   DocTotalsPanel.ItemsSummary). Showcase: /design-system#form-page-template, #line-grid; seed: the form playground.
   Tokens as in "Document pages (I-038)" above; every rule is scoped to these classes. The AntDesign side (the add-line
   button, the phone bar's buttons) is the block of the same title in overrides.css.
   ======================================================================== */

/* The card body under the grid is div.card-b.form-bottom > div.doc-layout > .doc-main + DocTotalsPanel (F fbBottom).
   .card-b pads it, .doc-layout gives the 320px column from 1280px and one column below. The panel is not a rail — it
   carries no .doc-rail, so it never takes the rail's sticky position — and design-lint's detail-grid-structure accepts
   a .doc-layout inside .form-bottom without one. A bottom whose left column is empty collapses with its empty panel
   (F fbShow) through .form-bottom--empty — no padding, no gap, so it takes no space — and never through `hidden` /
   display: none: the panel's aria-live region must stay in the accessibility tree from the first render, so the first
   total inserted into it is announced (README I-042 Decision 13). */
.form-bottom.form-bottom--empty {
    padding: 0;
}

.form-bottom.form-bottom--empty > .doc-layout {
    gap: 0;
}

/* The totals panel (F .pd-rows): label / value rows split by a rule, the grand total last on the subtle glass */
.pd-rows {
    margin: 0;
    min-width: 0;
    color: var(--text-primary);
}

.pd-rows > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--glass-border);
    font-size: 13.5px;
}

.pd-rows dt {
    min-width: 0;
    color: var(--text-secondary);
    font-weight: inherit;
}

.pd-rows dd {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A row's muted second line under its label (DocTotalsRow.SubLabel): the VAT base of a "PDV 20%" row, "osnovica
   37.500,00 RSD" (README I-042 Decision 12 — the per-rate base accountants check against PP PDV / POPDV; F's panel
   shows the VAT only). The value stays on the label's first line (the row aligns on the baseline). */
.pd-rows dt > .pd-sub {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 16px;
}

.pd-rows > .is-total {
    background: var(--glass-bg-subtle);
    font-weight: 700;
}

.pd-rows > .is-total dt {
    color: var(--text-primary);
}

/* The grand total in the display font (F .big-num inside the total row's dd); red while a balancing document is off
   balance (the Razlika total) — F's --err, a display figure (--color-error-mark: the light theme's text red is darker
   than F's, I-042 TASK_11) */
.pd-rows > .is-total .big-num.t-err {
    color: var(--color-error-mark);
}

/* The add-line row (F fbAddRow): the button in the second cell, left-aligned under the first content column */
table.it--form > tbody > tr.it__add > td {
    text-align: left;
}

/* The bar's amount while a balancing document is off balance (F .sum b.t-err; DocActionBar SummaryIsError) — the
   panel's red */
.actbar > .sum b.t-err {
    color: var(--color-error-mark);
}

/* No drawer-hosted bottom or bar: no Operans document lives in a drawer — prototype Decision 5 (I-053 AD-4) */


/* ========================================================================
   Detail tab (I-044)
   Sections inside a detail page's tab card (I-060, Evidens I-044 README Decision 13). A detail page whose tabs share
   ONE card (a section.glass-card holding <Tabs>) lays every pane out as .detail-tab > .detail-tab-section x N: titled
   sections with NO surface of their own (no background, card radius or shadow — a card never sits in a card, VR1 /
   design-lint nested-surface), the second and later ones under a hairline rule (--glass-border). A section's head is
   .tab-section-header.detail-tab-section__head (title left, actions right, stacked under 768px); its title is the
   Spoj card-title tier (.section-title-sm metrics) in the text colour — never AntD's default heading colour. Records are
   .record-rows > .record-row: leading tag(s), the primary text, the secondary meta (dates, amounts in the .numeric-cell
   figures), a trailing action; a row that opens a detail is role="button" (or a link), keyboard-reachable, with a hover
   and a focus ring; .record-row--selected marks the open one. The detail under a list (the selected record) is a
   nested .detail-tab-section — never a .glass-card. A .form-section inside a section is a ruled group, not the
   card-chrome .form-section. Showcase: /design-system#layout-utilities ("Detail tab", data-pattern="detail-tab").
   Tokens only; every rule is scoped to these classes. The AntDesign side (tag spacing in a row) is the block of the
   same title in overrides.css.
   ======================================================================== */

/* The tab pane body: the sections stack on the spacing scale (never 0 — VR4) */
.detail-tab {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
}

/* A titled section: no surface — it sits on the tab card's ground. Only the rule separates it from the one above. */
.detail-tab-section {
    min-width: 0;
}

.detail-tab-section + .detail-tab-section {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

/* A sub-section inside a section (the selected record's detail under the list) is ruled off what precedes it */
.detail-tab-section .detail-tab-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

/* Head = .tab-section-header.detail-tab-section__head: the title at the start, the actions at the end, a tighter bottom
   spacing than the pane's gap. This app.css has no base .tab-section-header rule, so the head lays itself out (I-060). */
.tab-section-header.detail-tab-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
}

/* Under 768px the head stacks (title, then the action full width) — the title stays flush left, never centred */
@media (max-width: 768px) {
    .tab-section-header.detail-tab-section__head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* The Spoj card-title tier (.section-title-sm: 1.125rem / 600; the display face from the type-scale heading rule at the
   top of this file) in the text colour. Set on the class, so an h3 / h4 inside AntD's Tabs never keeps the UA / AntD
   heading colour and margin. */
.detail-tab-section__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}

/* A sub-section's title is the sub-block tier (1rem / 600, as .form-section__title) */
.detail-tab-section .detail-tab-section .detail-tab-section__title {
    font-size: 1rem;
}

/* The record count after the title (as .page-title__count) */
.detail-tab-section__count {
    margin-left: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* What a real tab needs beyond the showcase (I-060, Evidens I-044 TASK_08): a section's tag / period line under its head
   (the selected record's type, status, period; a deadline), a group of several actions (in a head it sits right of the
   title, else it is its own row), a body that stacks its blocks (a value row, alerts, a table), and an event of an AntD
   Timeline inside a section. */
.detail-tab-section__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    min-width: 0;
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-tab-section__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.detail-tab-section > .detail-tab-section__actions {
    margin-bottom: var(--space-md);
}

.detail-tab-section__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.detail-tab-event {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

/* A deadline banner inside a pane: the pane's gap spaces it, as in a document rail */
.detail-tab > .deadline-banner {
    margin-bottom: 0;
}

/* CF-099 F-b12-02: an alert block straight in a section (a save's failure above the tools row, a warning above a table)
   keeps the section's rhythm — the --space-md its head, meta and action rows take — never 0px to the next block (VR4) */
.detail-tab-section > [role="alert"]:not(:last-child) {
    margin-bottom: var(--space-md);
}

/* CF-099 F-b12-07: a pane of key facts as F's definition grid (the O count Pregled — .cgrid > dl.desc: Osnovni podaci
   beside a column of Komisija · Odgovorna lica · Tok popisa). The bordered lists sit in the .cgrid (F's dl.desc look —
   never the legacy bordered table straight in a section); the second column stacks its sections as the pane does, and
   below 1200px (one column) it is ruled off the first like the pane's next section. */
.detail-tab > .cgrid.detail-tab-facts {
    row-gap: var(--space-lg);
}

.detail-tab-facts__column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .detail-tab-facts > .detail-tab-facts__column {
        padding-top: var(--space-lg);
        border-top: 1px solid var(--glass-border);
    }
}

/* A .form-section inside a section is a ruled group (as .wizard-step .form-section): this owns what the card-chrome
   .form-section block (background, blur, border, radius, entrance), ".form-section:first-child" and
   "* + .form-section" would otherwise set. */
.detail-tab-section .form-section {
    margin: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
    animation: none;
}

.detail-tab-section .form-section + .form-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

/* The record list: rows divided by a hairline, no list chrome */
.record-rows {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.record-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    min-width: 0;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.record-row + .record-row {
    border-top: 1px solid var(--glass-border);
}

/* A row that opens a detail: a button-role row or a link */
.record-row[role="button"],
a.record-row {
    cursor: pointer;
    text-decoration: none;
}

.record-row[role="button"]:hover,
a.record-row:hover {
    background: var(--glass-bg-light);
}

/* The app's focus ring (--color-primary-glow, as .stat-card and the choice cards), inset so the tab pane's overflow never
   clips it; the selected row's bar stays the solid primary, so focus and selection read apart */
.record-row:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: -2px;
}

/* I-060 (Evidens I-044 README Decision 26 (e)): the tint is half of --color-primary-bg, and it holds under the pointer —
   the clicked row stays hovered, and the hover's lighter ground (it outranked the selection) or the 14 % tint sat under
   the row's translucent tags: a purple and a magenta tag measured 4.18–4.49 : 1 (VR2). The inset bar marks the
   selection. */
.record-row.record-row--selected,
.record-row[role="button"].record-row--selected:hover {
    background: var(--color-primary-bg-subtle);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.record-row__tags {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.record-row__main {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-xs) var(--space-md);
    min-width: 0;
}

.record-row__primary {
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.record-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-xs) var(--space-md);
    min-width: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.record-row__meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Amounts and dates in the meta read as table figures (.numeric-cell's tabular numbers, the mono face) */
.record-row__meta .numeric-cell {
    font-family: var(--font-mono);
    text-align: left;
}

/* The trailing action: a Button, or the "Otvori" cue of a button-role row (the row itself is the control) */
.record-row__action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
    font-weight: 500;
    color: var(--color-primary-text);
}

/* Phone: the tags take their own line, the meta wraps under the primary text, the action stays on the row's end */
@media (max-width: 640px) {
    .record-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .record-row__tags {
        flex-basis: 100%;
    }

    .record-row__main {
        flex: 1 1 0;
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ========================================================================
   Entry and edge pages (I-039)
   Prototype F's entry and edge screens under F's own class names, mapped to the App's tokens (README I-039 Decision 4):
   the auth card (F "Prijava" / login: .auth column, .wz-brand, .auth-card, .auth-sub, .auth-id, .inp--otp, .auth-row,
   .auth-alt, .auth-foot), the notification feed (F "Obaveštenja" / notifications: .nbar, .nday + .band-h, the day list
   ul.qcard, rows .nrow with .dot / .q-ic / .nrow-main / .nrow-meta), the result / empty faces on the existing
   .status-result BEM (F .result / .result--sm / .ring-ok / .ring--err / .ring--mute, F emptyCta for the page face),
   the subscription page's F .plan tag and card grid, and the portal frame (header strip, F segmented nav).
   Showcase: /design-system#auth-page-template, #notification-feed-template, #portal-page-template,
   #status-result-template, #subscription-template; seeds: the notifications, portal, status-result and subscription
   playgrounds. The AntDesign side (the OTP input, the link buttons in .auth-row / .auth-id, the alert in the card, the
   row's icon button, the category select in .nbar) is the block of the same title in overrides.css.
   Every rule is scoped to these classes or the pattern's root — no bare .ant-* (I-039 Decision 14). F's tokens map to
   the App's as in "Document pages (I-038)", plus: --glass-2 → --control-bg, --bg-3 → --color-bg-dark-tertiary,
   --primary-bg → --color-primary-bg, --accent-text → --color-link-text on inline links (--color-primary-text
   elsewhere), --badge-bg (the unread dot) → --color-attention (Operans: cobalt, prototype Decision 1), --warn →
   --color-warning-mark on a mark (--color-warning-light as text), --ok → --color-success, --info → --color-info,
   --shadow → --glass-shadow. Its two tokens, --color-link-text and --color-warning-mark, sit in the token blocks at
   the top of this file (I-049 TASK_02).
   ======================================================================== */

@keyframes entryPageIn {
    from { opacity: 0.4; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* F pop: the result ring drops in */
@keyframes resultRingPop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

/* ── Auth card (F .auth): one 440px column under the bare layout — the brand mark, the card, the alternative link and
   the footer line, 18px apart; 3vh from the top, not vertically centred (F). ── */
.auth {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding-top: 3vh;
    animation: entryPageIn 0.25s ease-out;
}

/* The brand mark (F .wz-brand): the App's theme logo pair (I-039 Decision 5), not F's SVG */
.wz-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 4px;
    font: 700 22px/1 var(--font-display);
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.wz-brand img {
    height: 28px;
    width: auto;
}

/* The card (F .card.auth-card): F's card on the App's glass, 28 / 30 / 26 */
.auth-card {
    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-lg);
    box-shadow: 0 4px 24px var(--glass-shadow);
    color: var(--text-primary);
    padding: 28px 30px 26px;
}

/* Title and subtitle: left-aligned, 24 / 700 over the 15px secondary line (the pre-F centred .auth-form-header and
   30px .auth-title re-pointed inside the card) */
.auth-card .auth-form-header {
    text-align: left;
    margin-bottom: 0;
}

.auth-card .auth-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.5;
    margin: 0;
}

.auth-card .auth-title:focus {
    outline: none;
}

.auth-card :is(.auth-sub, .auth-subtitle) {
    margin: 4px 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* The identifier on the code step (F .auth-id): user icon, the address, "Nazad" */
.auth-id {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-primary);
}

.auth-id > .anticon {
    font-size: 16px;
    color: var(--text-secondary);
}

.auth-id b {
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Expiry text and Resend under the code (F .auth-row) */
.auth-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 12px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

/* The expiry text keeps its p.auth-code-expires hook (the pages' marker); inside F's row it is plain muted text, not the
   pre-F attention pill (I-039 TASK_05) */
.auth-row .auth-code-expires {
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* The alternative link sits in the card on the layout (the page is the card's body), under the form's block button;
   in F it is a paragraph under the card, the column's 18px below — the same 18px here */
.auth-card .auth-alt {
    margin-top: 18px;
}

/* "Nemate nalog?" under the card (F .auth-alt) and the copyright line (F .auth-foot); .auth-footer-links stays as the
   pages' hook — inside .auth-alt its pre-F margin and growing underline give way to F's link */
.auth-alt {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-foot {
    margin: 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

/* F .lnk inside the auth column: accent text (F --accent-text = --color-link-text), 500, an underline 3px below;
   13px, except in the 14px .auth-alt line (F .auth-alt .lnk) */
:is(.auth-alt, .auth-row, .auth-id) a,
.auth-alt.auth-footer-links a {
    margin-left: 0;
    color: var(--color-link-text);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-id a {
    font-size: 13px;
}

:is(.auth-alt, .auth-row, .auth-id) a::after {
    content: none;
}

:is(.auth-alt, .auth-row, .auth-id) a:hover {
    color: var(--color-link-text);
    text-decoration-thickness: 2px;
}

/* The back link of the confirm pages (LoginConfirm / RegisterConfirm), until the code step moves it into .auth-id:
   an inline icon + label link, centred */
.auth-footer-links--back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
}

/* Phone (F <= 640px): the card keeps the column's full width with F's tighter padding */
@media (max-width: 640px) {
    .auth-card {
        padding: 22px 18px 20px;
    }
}

/* ── Notification feed (F notifications): the filter bar, day sections, one list card per day ── */

/* Filter bar (F .nbar): the read-state Segmented (I-036 .seg look, overrides.css) and the category select */
.nbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 24px;
}

.nbar__field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nbar__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* A day (F section.nday): heading, then the day's list card, stacked; 22px between days. The stack is the section's own
   rule — every day, the first included (VR3 read the first day as an unstyled block — I-060, Evidens I-044 Decision
   34 (f)) */
.nday {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nday + .nday {
    margin-top: 22px;
}

/* The day heading (F h2.band-h): weekday + date in small caps, the relative label (span.n) muted. Body font on
   purpose: F sets .band-h in --font-body (600 12px/1), not the display face h2 gets */
.nday > .band-h {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 4px;
    font: 600 12px/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    scroll-margin-top: 16px;
}

.nday > .band-h .n {
    color: var(--text-muted);
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* The day's list card (F ul.card.qcard): no padding, rows separated by a hairline */
.glass-card.notification-feed.qcard {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.notification-feed.qcard > li + li {
    border-top: 1px solid var(--glass-border);
}

/* A row (F li.nrow): dot | 36px icon | title, text, meta | the mark-read button */
.notification-card.nrow {
    display: grid;
    grid-template-columns: 8px 36px minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: start;
    padding: 14px 16px;
    transition: background var(--transition-fast);
}

.notification-card.nrow:hover {
    background: var(--glass-bg-subtle);
}

/* The loading face's rows (F: skeleton rows in the day structure): the row's frame without .notification-card */
.nrow.nrow--loading {
    display: grid;
    grid-template-columns: 8px 36px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: start;
    padding: 14px 16px;
}

.nrow > .dot {
    width: 8px;
    height: 8px;
    margin-top: 14px;
    border-radius: 50%;
}

.nrow.is-unread > .dot {
    background: var(--color-attention);
}

/* The icon tile (F .q-ic): neutral by default, tinted per priority */
.nrow > .q-ic {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    background: var(--color-fg-08);
    color: var(--text-secondary);
}

.nrow:is(.nrow--urgent, .nrow--warning) > .q-ic {
    background: color-mix(in srgb, var(--color-warning-mark) 14%, transparent);
    color: var(--color-warning-mark);
}

.nrow--error > .q-ic {
    background: color-mix(in srgb, var(--color-error-light) 14%, transparent);
    color: var(--color-error-light);
}

.nrow--success > .q-ic {
    background: color-mix(in srgb, var(--color-success) 14%, transparent);
    color: var(--color-success);
}

/* Title, text (F .nrow-main b / span); a read row's title drops to 500 secondary (also the I-036 rule above) */
.nrow-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.nrow-main > b {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.nrow.is-read .nrow-main > b {
    font-weight: 500;
    color: var(--text-secondary);
}

.nrow-main > span {
    font-size: 13.5px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

/* Meta line (F .nrow-meta): the category / priority tag, the time, 12.5 muted tabular */
.nrow-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* The App's trailing action arrow (link = external target, right = in-app): the end of the meta line, nudged on hover.
   F has none — the row opens its target (the click is behaviour, README I-039 Decision 6). */
.nrow-meta > .notification-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 16px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.notification-card.nrow:hover .notification-arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}

/* The unread count on the "Nepročitano" segment (F .seg .cnt): the count pill; on the pressed segment, the accent tint */
.nbar .ant-segmented-item-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nbar .cnt {
    display: inline-block;
    flex: none;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--control-bg);
    color: var(--text-secondary);
    font: 600 12px/18px var(--font-body);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.nbar .ant-segmented-item-selected .cnt {
    background: var(--color-primary-bg);
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
    color: var(--color-primary-text);
}

/* Phone (F <= 640px): three columns, the button under the text */
@media (max-width: 640px) {
    .notification-card.nrow {
        grid-template-columns: 8px 36px minmax(0, 1fr);
    }

    .notification-card.nrow > .mark-read-btn {
        grid-column: 3;
        justify-self: start;
    }
}

/* ── Result faces on .status-result (F .result, .result--sm, emptyCta) ──
   Result: ring 72 (check 34) that drops in, 24 / 700 title, secondary text, 6px apart. Small (in a card, e.g. the
   invite in the auth card): ring 52, 17 / 600, 36ch. Page (NotFound, F emptyCta): ring 64, 20 / 700, 46ch, 56px of
   air — put it in a .glass-card. Ring tones: success = F ring-ok, error = F ring--err, warning = F --warn,
   neutral = F ring--mute; info = F's .ring (the accent tint, ink F --accent-text = --color-link-text) — the not-found
   face's F ring (I-039 TASK_08). */
.status-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0 2px;
    text-align: center;
}

.status-result__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
    background: var(--color-fg-08);
    color: var(--text-secondary);
    animation: resultRingPop 0.3s ease-out;
}

.status-result--success .status-result__icon {
    background: color-mix(in srgb, var(--color-success) 14%, transparent);
    color: var(--color-success);
}

.status-result--error .status-result__icon {
    background: color-mix(in srgb, var(--color-error-light) 14%, transparent);
    color: var(--color-error-light);
}

.status-result--warning .status-result__icon {
    background: color-mix(in srgb, var(--color-warning-light) 14%, transparent);
    color: var(--color-warning-light);
}

.status-result--info .status-result__icon {
    background: var(--color-primary-bg);
    color: var(--color-link-text);
}

.status-result__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.5;
    color: var(--text-primary);
}

.status-result__title:focus {
    outline: none;
}

.status-result__description {
    margin: 0;
    color: var(--text-secondary);
}

.status-result__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

/* Small, inside a card (F .result--sm + .ring-ok--sm) */
.status-result--sm {
    padding: 4px 0;
}

.status-result--sm .status-result__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    font-size: 26px;
    animation: none;
}

.status-result--sm .status-result__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
}

.status-result--sm .status-result__description {
    max-width: 36ch;
    font-size: 14px;
}

.status-result--sm .status-result__actions {
    margin-top: 8px;
}

/* Page face (F emptyCta: .empty + .ring) */
.status-result--page {
    gap: 8px;
    padding: 56px 24px;
}

.status-result--page .status-result__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    font-size: 28px;
    animation: none;
}

.status-result--page .status-result__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.status-result--page .status-result__description {
    max-width: 46ch;
}

/* ── Subscription page (F settings › Pretplata + F .plan): the plan and usage cards two across, then the tabs card ── */
.subscription-cards {
    margin-bottom: 24px;
}

.subscription-cards > .glass-card.settings-card {
    max-width: none;
}

/* A usage meter (the usage card): label and value on one row over the Progress bar. Evidens keeps this molecule as a
   global rule since package 4; Operans had only the retired scoped copy (I-049 TASK_07) */
.subscription-meter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscription-meter + .subscription-meter {
    margin-top: 12px;
}

.subscription-meter__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.subscription-meter__value {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* The suspended / expired / usage alerts above the cards (the page's inline margins, as a class) */
.subscription-alert {
    margin-bottom: 16px;
}

/* The plan name tag (F .plan): the neutral info hue whatever the tier, 12 / 600 (the header's plan tag, I-041) */
.plan {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid color-mix(in srgb, var(--color-info) 35%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--color-info) 14%, transparent);
    color: color-mix(in srgb, var(--color-info) 78%, var(--text-primary));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

/* A value with its copy button (account, reference): the button sits right after the value */
.settings-info-row__value {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ── Portal frame (PortalLayout, I-039 Decision 7): the header strip on the glass, the nav as F's segmented links
   (nav.portal-nav.seg) with the active link on --color-primary-bg. PortalLayout.razor.css keeps only what is the layout's
   own (the page background and orbs, the stacking, the logo / avatar states, the client picker's width). The pages'
   content is .page-wrapper[data-pattern=portal-page] > .page-container.page-container--portal (a detail adds --wide: F
   draws its detail model at 1360). ── */
.portal-layout {
    display: flex;
    flex-direction: column;
    position: relative;
}

.portal-layout > .portal-header-strip {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    height: 56px; /* F .hdr (I-039 TASK_10, P84 / P86 portalHeader) */
    flex-shrink: 0;
    padding: 0 var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.portal-header-strip .portal-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.portal-header-strip .portal-client-name {
    padding-left: var(--space-md);
    border-left: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-header-strip .portal-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
}

/* F .seg as a nav: 3px frame on the control fill, 28px links, the active one on the accent tint */
.portal-nav.seg {
    gap: 0;
    padding: 3px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--control-bg);
}

.portal-nav.seg a {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.portal-nav.seg a:hover {
    color: var(--text-primary);
}

.portal-nav.seg a.active {
    background: var(--color-primary-bg);
    color: var(--color-primary-text);
    font-weight: 600;
}

.portal-nav.seg a:focus-visible {
    outline: 2px solid var(--color-primary-glow);
    outline-offset: 1px;
}

.portal-header-strip .portal-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-on-primary);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.portal-layout > .portal-main {
    flex: 1;
    position: relative;
    padding: var(--space-xl) var(--space-lg);
}

/* The portal main already carries the gutters: the page wrapper inside it adds none and does not claim the viewport
   (as `.main-content .page-wrapper` above) */
.portal-layout > .portal-main > .page-wrapper {
    min-height: 0;
    padding: 0;
}

/* A portal detail draws F's detail model at the wide width (F .page--wide) */
.page-container--portal.page-container--wide {
    max-width: var(--page-width-wide);
}

/* A portal list's table (F `.ct`, the list-page rules above for the portal archetype): 12px cell sides, the first column
   16px from the card edge, F's 28px / 13px `.btn--sm` row action (the invoice PDF button). Scoped to the portal page's own
   table card, so no other archetype's cells change. */
[data-pattern="portal-page"] .table-card .ant-table-thead > tr > th.ant-table-cell,
[data-pattern="portal-page"] .table-card .ant-table-tbody > tr > td.ant-table-cell {
    padding-left: 12px;
    padding-right: 12px;
}

/* F's th: one line — a narrow column ellipsises its label instead of wrapping the head row (TASK_10, P86 at 834). The
   label clips, not the cell: an overflow: hidden th also clipped a pinned column's edge shadow (AntD's ::after past the
   cell) and read as a cut label (I-060, Evidens I-044 README Decision 35 (e)). */
[data-pattern="portal-page"] .table-card .ant-table-thead > tr > th.ant-table-cell {
    white-space: nowrap;
}

[data-pattern="portal-page"] .table-card .ant-table-thead > tr > th.ant-table-cell > .ant-table-column-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-pattern="portal-page"] .table-card .ant-table-thead > tr > th.ant-table-cell:first-child,
[data-pattern="portal-page"] .table-card .ant-table-tbody > tr > td.ant-table-cell:first-child {
    padding-left: 16px;
}

[data-pattern="portal-page"] .table-card .ant-table-cell .ant-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .portal-layout > .portal-header-strip {
        gap: var(--space-sm);
        padding: 0 var(--space-md);
    }

    .portal-header-strip .portal-client-name {
        max-width: 140px;
    }

    .portal-layout > .portal-main {
        padding: var(--space-lg) var(--space-md);
    }
}

@media (max-width: 480px) {
    /* The party's name hides, in either form (the page header names it): at 390 the logo, the picker, the nav and
       the avatar need ~460px (I-049 TASK_07) */
    .portal-header-strip .portal-client-name,
    .portal-header-strip .portal-client-picker {
        display: none;
    }

    .portal-layout > .portal-main {
        padding: var(--space-md);
    }
}

/* ========================================================================
   CF-099 batch b15 (TASK_41) — cash register day, goods to finance, fiscal years
   ======================================================================== */

/* An inline-create drawer (EntityFormDrawer Portal — the selectors' "Kreiraj novog …") opened from inside a modal: AntD moves
   the modal to <body> after #app, so at the shared z-index (1000) the modal painted over the drawer the user had just opened
   from it, its Sačuvaj and fields under the modal (CF-099 F-b15-03). The portal drawer (its mask with it) stacks one above an
   open modal, and the drawer's discard confirm one above the drawer. */
.entity-drawer-portal > .ant-drawer {
    z-index: 1001;
}

.ant-modal-root:has(> .ant-modal-wrap.entity-drawer-discard-modal) > .ant-modal-mask,
.ant-modal-wrap.entity-drawer-discard-modal {
    z-index: 1002;
}

/* A resolved row of a table (the transfer run's conflicts): its text muted, its status tag at full strength — an opacity over
   the whole row took the "Rešeno" success tag below AA (CF-099 F-b15-04; replaces TransferJobDetail.razor.css) */
.ant-table-tbody > tr.row-resolved > td {
    color: var(--text-secondary);
}

/* The year-close precheck's icons in their roles: the drawer's icon colour outranked the bare .text-success / .text-danger, so
   every ✓ / ✗ / ⓘ painted the text colour (CF-099 F-b15-11) */
.precheck-list .precheck-list__item > .anticon {
    color: var(--color-info);
}

.precheck-list .precheck-list__item > .anticon.text-success {
    color: var(--color-success);
}

.precheck-list .precheck-list__item > .anticon.text-danger {
    color: var(--color-error);
}

/* A review of figures (the year-close confirm step): each term and its figure on one row at every width, the figure
   right-aligned and whole; the confirm field keeps the step's field gap under it (CF-099 F-b15-12). Opt-in — the other
   reviews keep .wizard-step__review-row's three columns. */
.wizard-step__review--figures {
    margin-bottom: var(--space-lg);
}

.wizard-step__review--figures .wizard-step__review-row,
.wizard-step__review--figures .wizard-step__review-row dt {
    grid-column: auto;
}

.wizard-step__review--figures .wizard-step__review-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.wizard-step__review--figures .wizard-step__review-row dd {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* A drawer-hosted wizard's result exits at ≤ 480px stack full width inside the step (the 390 header actions' rule): their
   natural width ran past the drawer at 390 (CF-099 F-b15-13) */
@media (max-width: 480px) {
    .entity-drawer .wizard-result .ant-space {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
        width: 100%;
    }

    .entity-drawer .wizard-result .ant-space-item,
    .entity-drawer .wizard-result .ant-space-item > a {
        display: block;
        width: 100%;
    }

    .entity-drawer .wizard-result .ant-space .ant-btn {
        width: 100%;
        height: auto;
        min-height: 36px;
        white-space: normal;
    }
}

/* The fiscal-year audit drawer's summary (CF-099 F-b15-10): a definition list whose term takes the row and whose figure
   stays whole and right-aligned beside it — no colon, no figure split per digit at 390 */
.audit-summary {
    display: grid;
    gap: 2px var(--space-md);
    margin: var(--space-xs) 0 0;
    width: 100%;
}

.audit-summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: var(--space-md);
}

.audit-summary dt {
    color: var(--text-secondary);
    font-weight: inherit;
    font-size: 0.875rem;
}

.audit-summary dd {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A notice above a wizard step's body (the year close's "the preview was re-run" warning): the step's field gap under it —
   it touched the re-run preview's skeleton (CF-099 F-b15-20's view, VR4) */
.wizard-step__notice {
    margin-bottom: var(--space-md);
}
