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

/* ========================================
   Design tokens v2 (F-263) — three blocks, read them in this order.
   Resolution rule (PLAN D4): a custom property whose value contains var(…) is resolved on the element that
   declares it and inherited as the resolved value. So every derived token (aliases, --gradient-*,
   --shadow-*) is declared in the shared block below, whose selector list also names the always-dark islands
   (.theme-dark, .ant-layout-sider) — there they re-resolve against the dark base values. The light block
   redeclares base literals only; never put a var(…) token in it or in the unthemed :root.
   Every colour literal here is the prototype's (specs/F-263-DesignTokensTheming/reference/prototype.html :root and
   :root[data-theme="light"]): tests/scripts/redesign-coverage/token-parity.test.js fails on any drift, and an App-only
   colour token needs an allow-list entry with its reason there (F-266 TASK_08).
   ======================================== */

/* Shared themed block — dark base values (default theme) + every derived token.
   Applies to <html> and to every dark-island element (.theme-dark, the AntD Sider). */
:root, .theme-dark, .ant-layout-sider {
    color-scheme: dark;

    /* Surfaces */
    --bg: #0d0f14;
    --bg-2: #141821;
    --bg-3: #1a1f2e;
    --glow: rgba(230, 122, 46, .085);
    --panel: rgba(255, 255, 255, .035);
    --panel-2: rgba(255, 255, 255, .05);
    --panel-3: rgba(255, 255, 255, .08);
    --float: #181c26;
    --sticky: #14171d;
    --th: #171a21;
    --th-bg: rgba(255, 255, 255, .025);
    --hdr-bg: rgba(13, 15, 20, .74);
    --scrim: rgba(4, 5, 8, .62);
    --sheet: rgba(255, 255, 255, .07);

    /* Lines */
    --border: rgba(255, 255, 255, .11);
    --border-2: rgba(255, 255, 255, .17);
    --line: rgba(255, 255, 255, .07);

    /* Text */
    --text: #e8eaef;
    --text-2: #b6bcc8;
    --muted: #969dac; /* I-049 TASK_17: was #8e95a4 — 4.35–4.49:1 on raised dark panels (rgb 43–50); ≥ 4.5 now */
    --text-disabled: rgba(255, 255, 255, .32);

    /* Controls */
    --ctl-bg: rgba(255, 255, 255, .04);
    --ctl-bd: rgba(255, 255, 255, .15);
    --ctl-bd-h: rgba(255, 255, 255, .3);
    --seg-bg: rgba(255, 255, 255, .05);
    --seg-on: rgba(255, 255, 255, .13);
    --seg-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --row-h: rgba(255, 255, 255, .03);
    --row-sel: rgba(255, 255, 255, .06);

    /* Primary — act here only */
    --pri: #e67a2e;
    --pri-h: #f0944d;
    --pri-press: #c9631f;
    --on-pri: #1a0d03;
    --pri-ink: #f0944d;
    --pri-bg: rgba(230, 122, 46, .16);
    --pri-rgb: 230, 122, 46;
    --pri-glow: rgba(230, 122, 46, .4);
    --focus: #f0944d;

    /* Attention — new/unhandled only (teal); never on buttons */
    --attn: #2bb3c0;
    --attn-ink: #6fd3dc;
    --attn-bg: rgba(43, 179, 192, .15);
    --on-attn: #031a1d;

    /* Semantic — meaning only */
    --ok: #73d13d;
    --warn: #ffc53d;
    --err: #ff7875;
    --info: #69c0ff;
    --ok-ink: #73d13d;
    --warn-ink: #ffc53d;
    --err-ink: #ffa8a5; /* I-049 TASK_17: the fill colour as text was 4.08–4.18:1 on an --err-bg tag over a raised / teal-tinted row */
    --info-ink: #69c0ff;
    --ok-bg: rgba(115, 209, 61, .12);
    --warn-bg: rgba(255, 197, 61, .12);
    --err-bg: rgba(255, 120, 117, .13);
    --info-bg: rgba(105, 192, 255, .12);
    --ok-bd: rgba(115, 209, 61, .3);
    --warn-bd: rgba(255, 197, 61, .3);
    --err-bd: rgba(255, 120, 117, .34);
    --info-bd: rgba(105, 192, 255, .3);
    --on-ok: #0b1a04;
    --on-err: #2a0505;
    --info-rgb: 105, 192, 255;
    --neu-bg: rgba(255, 255, 255, .07);
    --neu-bd: rgba(255, 255, 255, .13);

    /* Misc */
    --skel: rgba(255, 255, 255, .055);
    --skel-hi: rgba(255, 255, 255, .11);
    --shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
    /* Neutral drop-shadow colour behind --glass-shadow and --shadow-sm…xl */
    --shadow-color: rgba(0, 0, 0, .25);
    /* Top inner highlight behind --shadow-inset-subtle */
    --inset-hi: rgba(255, 255, 255, .06);
    --lb-bg: rgba(255, 255, 255, .045);
    --lb-bd: rgba(255, 255, 255, .12);
    --lb-ink: #c9ced8;
    --toast-bg: #1c2130;
    --toast-fg: #e8eaef;
    --toast-bd: rgba(255, 255, 255, .15);

    /* Decorative accents (no v2 meaning; dark literal kept, light literal in the light block) */
    --color-accent-purple: #722ed1;
    --color-accent-purple-light: #b37feb;
    --color-accent-purple-hover: #9254de;
    /* Subscription Tier Colors */
    --color-tier-starter: #60a5fa;
    --color-tier-pro: #a78bfa;
    --color-tier-starter-bg: rgba(96, 165, 250, .15);
    --color-tier-pro-bg: rgba(167, 139, 250, .15);
    --color-amber: #f5a623;
    /* .stat-icon decorative variants — never attention (D6) */
    --color-accent-cyan: #22d3ee;
    --color-accent-cyan-bg: rgba(34, 211, 238, .12);
    --color-accent-purple-bg: rgba(114, 46, 209, .12);

    /* Derived — must stay in this block (D4) */
    --gradient-primary: linear-gradient(135deg, var(--pri) 0%, var(--pri-h) 100%);
    /* The prototype's shell backdrop (.app): one faint glow at the top right over the flat page ground. */
    --gradient-bg: radial-gradient(900px 520px at 82% -14%, var(--glow), transparent 70%), var(--bg);

    /* Aliases — every pre-v2 name stays valid (PLAN D3, § Alias map). New code uses the v2 names. */
    /* Brand Colors */
    --color-primary: var(--pri);
    --color-primary-light: var(--pri-ink);
    --color-primary-dark: var(--pri-press);
    --color-primary-glow: var(--pri-glow);
    --color-primary-rgb: var(--pri-rgb);
    --color-primary-bg: var(--pri-bg);

    /* Backgrounds */
    --color-bg-dark: var(--bg);
    --color-bg-dark-secondary: var(--bg-2);
    --color-bg-dark-tertiary: var(--bg-3);
    /* Elevated surface for floating menus / dropdown panels (Select, Dropdown menu, etc.) */
    --color-bg-elevated: var(--float);
    /* Pinned (Fixed) table cells: opaque, or the columns that scroll under them show through (B-054). */
    --table-pinned-bg: var(--sticky);

    /* Glass Effects */
    --glass-bg-subtle: var(--panel);
    --glass-bg: var(--panel-2);
    --glass-bg-light: var(--panel-3);
    --glass-border: var(--border);
    --glass-border-light: var(--border-2);
    --glass-shadow: var(--shadow-color);

    /* Text Colors */
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --text-muted: var(--muted);

    /* Semantic Status Colors */
    --color-success: var(--ok);
    --color-success-light: var(--ok-ink);
    --color-success-hover: var(--ok-ink);
    --color-warning: var(--warn);
    --color-warning-light: var(--warn-ink);
    --color-error: var(--err);
    --color-error-light: var(--err-ink);
    --color-info: var(--info);
    --color-info-light: var(--info-ink);
    --color-info-hover: var(--info-ink);
    --color-info-rgb: var(--info-rgb);
    --color-info-bg: var(--info-bg);
    --color-info-bg-strong: var(--info-bd);
    /* Semantic background tints (fill / border-strong / subtle) — mirror --color-info-bg */
    --color-success-bg: var(--ok-bg);
    --color-success-bg-strong: var(--ok-bd);
    --color-success-subtle: var(--ok-bg);
    --color-warning-bg: var(--warn-bg);
    --color-warning-bg-strong: var(--warn-bd);
    --color-warning-subtle: var(--warn-bg);
    --color-error-bg: var(--err-bg);
    --color-error-bg-strong: var(--err-bd);
    --color-error-subtle: var(--err-bg);

    /* 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(--inset-hi);

    /* Font family aliases (F-264 D2) — the prototype's short names, so its CSS ports verbatim.
       var()-valued, so they live here, not in the unthemed :root. */
    --head: var(--font-display);
    --font: var(--font-body);
    --mono: var(--font-mono);
}

/* Unthemed tokens — literals only (PLAN D4). Everything here is identical in both themes except --sd-bg / --sd-bd,
   which the light block overrides (D5). Fonts and the type scale: F-264. */
:root {
    /* Social Brand Colors (third-party brand colours — never themed) */
    --color-social-twitter: #1da1f2;
    --color-social-linkedin: #0a66c2;
    --color-social-facebook: #4267b2;
    --color-social-whatsapp: #25d366;

    /* Sider tokens — dark in both themes (PLAN D5). Kept out of the island list so the light block's
       --sd-bg / --sd-bd are not undone inside the sider. */
    --sd-bg: #10131a;
    --sd-bd: rgba(255, 255, 255, .07);
    --sd-text: #c4c9d3;
    --sd-strong: #eef0f4;
    --sd-muted: #8b92a1;
    --sd-hover: rgba(255, 255, 255, .05);
    --sd-act-bg: rgba(230, 122, 46, .15);
    --sd-act-ink: #f5a465;
    --sd-n-bg: rgba(255, 255, 255, .09);
    --sd-err-bg: rgba(255, 120, 117, .17);
    --sd-err-ink: #ff9b98;

    /* Toast shadow — the prototype's .pz-toast literal (prototype.html 2968), one value in both themes (I-062 TASK_13) */
    --toast-shadow: 0 8px 28px rgba(0, 0, 0, .25);

    /* Typography */
    --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

    /* Type scale (F-264) — see the token table under the heading rule */
    --font-size-page-title: 1.75rem;
    --font-size-page-title-phone: 1.5rem;
    --font-weight-page-title: 700;
    --font-size-step-title: 1.25rem;
    --font-weight-step-title: 600;
    --font-size-section-title: 1.125rem;
    --font-weight-section-title: 650;
    --font-size-subblock-title: 1rem;
    --font-weight-subblock-title: 600;
    --font-size-eyebrow: 0.875rem;
    --font-weight-eyebrow: 600;
    --font-size-body: 0.9375rem;
    --font-line-body: 1.5;
    --font-size-th: 0.78125rem;
    --font-weight-th: 600;
    --font-size-label: 0.6875rem;
    --font-weight-label: 600;
    --font-tracking-label: 0.08em;

    /* App shell (I-039 D8) — header height. The header is sticky at the top of the scrolling content column
       (.content-layout, the prototype's .main; I-056 TASK_02), so a top-sticky page element clears it: its offset is
       the prototype's literal (56 = this height) or this height plus its own gap. */
    --shell-header-h: 56px;

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

    /* Borders */
    --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;
}

/* Light theme — base literals only (PLAN D4: no var(…) here; the shared block's aliases re-resolve against
   these on <html>, while dark-island elements keep the dark values). Set by data-theme on <html>. */
:root[data-theme="light"] {
    color-scheme: light;

    /* Surfaces */
    --bg: #f3f4f7;
    --bg-2: #eceef2;
    --bg-3: #e4e7ec;
    --glow: rgba(181, 84, 15, .05);
    --panel: #ffffff;
    --panel-2: #f7f8fa;
    --panel-3: #eef0f4;
    --float: #ffffff;
    --sticky: #ffffff;
    --th: #f8f9fb;
    --th-bg: #f8f9fb;
    --hdr-bg: rgba(243, 244, 247, .82);
    --scrim: rgba(16, 19, 26, .4);
    --sheet: #ffffff;

    /* Lines */
    --border: rgba(16, 19, 26, .10);
    --border-2: rgba(16, 19, 26, .17);
    --line: rgba(16, 19, 26, .075);

    /* Text */
    --text: #141821;
    --text-2: #3f4757;
    --muted: #586072;
    --text-disabled: rgba(16, 19, 26, .38);

    /* Controls */
    --ctl-bg: #ffffff;
    --ctl-bd: rgba(16, 19, 26, .18);
    --ctl-bd-h: rgba(16, 19, 26, .36);
    --seg-bg: rgba(16, 19, 26, .055);
    --seg-on: #ffffff;
    --seg-shadow: 0 1px 2px rgba(16, 19, 26, .16);
    --row-h: rgba(16, 19, 26, .025);
    --row-sel: rgba(16, 19, 26, .05);

    /* Primary */
    --pri: #b5540f;
    /* I-049 TASK_17 (X2): hover darkens in light — white on the old #c9631f was 3.97:1; #a34b0d is 5.88:1. */
    --pri-h: #a34b0d;
    --pri-press: #9a460c;
    --on-pri: #ffffff;
    --pri-ink: #a94e0d;
    --pri-bg: rgba(181, 84, 15, .12);
    --pri-rgb: 181, 84, 15;
    --pri-glow: rgba(181, 84, 15, .35);
    --focus: #b5540f;

    /* Attention (teal) */
    --attn: #0b7480;
    --attn-ink: #09636d;
    --attn-bg: rgba(11, 116, 128, .10);
    --on-attn: #ffffff;

    /* Semantic */
    --ok: #2b8a1c;
    --warn: #a66a00;
    --err: #cf222e;
    --info: #0b69c7;
    --ok-ink: #22721a;
    --warn-ink: #855500;
    --err-ink: #b81d28;
    --info-ink: #0a5fb4;
    --ok-bg: rgba(43, 138, 28, .09);
    --warn-bg: rgba(166, 106, 0, .09);
    --err-bg: rgba(207, 34, 46, .08);
    --info-bg: rgba(11, 105, 199, .08);
    --ok-bd: rgba(43, 138, 28, .28);
    --warn-bd: rgba(166, 106, 0, .3);
    --err-bd: rgba(207, 34, 46, .3);
    --info-bd: rgba(11, 105, 199, .28);
    --on-ok: #ffffff;
    --on-err: #ffffff;
    --info-rgb: 11, 105, 199;
    --neu-bg: rgba(16, 19, 26, .055);
    --neu-bd: rgba(16, 19, 26, .12);

    /* Misc */
    --skel: rgba(16, 19, 26, .055);
    --skel-hi: rgba(16, 19, 26, .1);
    --shadow: 0 18px 46px rgba(16, 19, 26, .17), 0 2px 6px rgba(16, 19, 26, .08);
    --shadow-color: rgba(16, 19, 26, .08);
    --inset-hi: rgba(255, 255, 255, .7);
    --lb-bg: #ffffff;
    --lb-bd: rgba(16, 19, 26, .12);
    --lb-ink: #3f4757;
    --toast-bg: #ffffff;
    --toast-fg: #141821;
    --toast-bd: rgba(16, 19, 26, .12);

    /* Decorative accents */
    --color-accent-purple: #6a46d6;
    --color-accent-purple-light: #5b3bbd;
    --color-accent-purple-hover: #5b3bbd;
    --color-tier-starter: #0b69c7;
    --color-tier-pro: #6a46d6;
    --color-tier-starter-bg: rgba(11, 105, 199, .08);
    --color-tier-pro-bg: rgba(106, 70, 214, .08);
    --color-amber: #a66a00;
    --color-accent-cyan: #0e7490;
    --color-accent-cyan-bg: rgba(14, 116, 144, .08);
    --color-accent-purple-bg: rgba(106, 70, 214, .08);

    /* Page glow — light recipe as literals */
    --gradient-bg: radial-gradient(900px 520px at 82% -14%, rgba(181, 84, 15, .05), transparent 70%), #f3f4f7;

    /* Sider (D5): flat dark panel in light, no border */
    --sd-bg: #141821;
    --sd-bd: transparent;
}

/* 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, .section-title-xs {
    font-family: var(--font-display);
}

/* Type scale — B-051 AD3, tokens F-264 D3 (unthemed :root). One scale for every title class; pick the tier, never a new size.
   Tier             Tokens (size / weight)                                       Value              Classes
   page title       --font-size-page-title / --font-weight-page-title            1.75rem / 700      .page-title (--font-size-page-title-phone 1.5rem at <=640px); count: .page-title__count
   step title       --font-size-step-title / --font-weight-step-title            1.25rem / 600      .wizard-step__title
   section title    --font-size-section-title / --font-weight-section-title      1.125rem / 650     .section-title-sm, .dashboard-card-title
   sub-block title  --font-size-subblock-title / --font-weight-subblock-title    1rem / 600         .form-section__title, .detail-page-grid__side-title
   eyebrow          --font-size-eyebrow / --font-weight-eyebrow                  0.875rem / 600     .section-title-xs
   body             --font-size-body / --font-line-body                          0.9375rem / 1.5    body (overrides.css — AntD's body rule loads after app.css)
   table header     --font-size-th / --font-weight-th                            0.78125rem / 600   the th rules, sentence case (text-transform: none)
   group label      --font-size-label / --font-weight-label / --font-tracking-label  0.6875rem / 600 / .08em  .group-label (uppercase)
   Numbers that must align: .tabular-nums (table cells, statistics, badges and pager items get it globally in overrides.css). */

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Group label (F-264 D5) — small uppercase heading over a group of items (sider groups, card sections). */
.group-label {
    font-family: var(--font-display);
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-label);
    letter-spacing: var(--font-tracking-label);
    text-transform: uppercase;
    line-height: 1;
    color: var(--text-2);
}

/* Case identifier (I-041 D9) — <CaseIdentifier>: the 30-digit number in full; serial, year and classification
   mark at full ink (__k), the fixed parts dimmed (__f). --wrap lets it break at the group spaces only. */
.case-id {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -.01em;
}

.case-id__k {
    color: var(--text);
}

.case-id__f {
    color: var(--muted);
}

/* Inside a link the groups take the link's colour instead of their own ink, and the hover underlines — the
   identifier is then the link's only text (Veze tab), so it must read as one. */
a .case-id :is(.case-id__k, .case-id__f) {
    color: inherit;
}

a:hover .case-id {
    text-decoration: underline;
}

/* The movements book's identifier is a row's keyboard link, not running text: it keeps the identifier's own ink, as
   every other case list and the prototype draw it (the hover underline still marks it). */
.movements-table a .case-id .case-id__k {
    color: var(--text);
}

.movements-table a .case-id .case-id__f {
    color: var(--muted);
}

.case-id--lg {
    font-size: 1.0625rem;
    font-weight: 500;
}

.case-id--wrap {
    white-space: normal;
}

.case-id--wrap :is(.case-id__k, .case-id__f) {
    white-space: nowrap;
}

/* In a table cell the identifier is the prototype's 12px (.c-id .cid) — the size the 290px identifier column is
   budgeted for (I-041 D11): 30 digits and six spaces are ≈ 256px, inside the cell's 2 × 16px padding. */
.ant-table-cell .case-id:not(.case-id--lg) {
    font-size: 0.75rem;
}

/* Two-line case number (CF-114, prototype .dvn) — the delovodni broj leads (__n: mono, tabular, 600, --text, one line),
   an optional series tag „улазни“ / „излазни“ follows on its line (sans 11.5px --text-2 text — a fact, not a status),
   and the 30-digit identifier is the secondary line (.case-id--sub: 0.8em, key digits --text-2). --lg is the case
   header (21/700 over 12.5/400); --wrap lets the number break anywhere (the palette's narrow rows). */
.case-id-dual {
    display: inline-block;
    max-width: 100%;
    min-width: 0;
    vertical-align: top;
}

.case-id-dual__n {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    letter-spacing: -.01em;
}

.case-id-dual__series {
    margin-left: 6px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-2);
    white-space: nowrap;
}

.case-id--sub {
    font-size: .8em;
}

.case-id--sub .case-id__k {
    color: var(--text-2);
}

.case-id-dual > .case-id--sub {
    display: block;
    margin-top: 1px;
}

/* CF-114 TASK_17: inside a link (Veze tab, movements book, record header) the secondary line keeps its own inks —
   the link rules above recolour a lone identifier, never the dual's second line (Спој .dvn .cid--sub .cid__k). */
.case-id-dual > .case-id.case-id--sub .case-id__k {
    color: var(--text-2);
}

.case-id-dual > .case-id.case-id--sub .case-id__f {
    color: var(--muted);
}

.case-id-dual--lg .case-id-dual__n {
    font-size: 21px;
    font-weight: 700;
}

.case-id-dual--lg > .case-id--sub {
    font-size: 12.5px;
    font-weight: 400;
}

.case-id-dual--wrap .case-id-dual__n {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Deadline bands (I-042, PROGRAM D10) — <DeadlineIndicator>: a deadline as dot + text in tables, a chip (icon, mono
   date, „·“, text) in the case header. Tone per band (DeadlineBands.ToneFor): err only for overdue, warn up to 7 days
   (До 7 дана in the body ink), neutral later, muted paused / none — never the primary or attention colour. The dot is
   ::before in currentColor unless a band names its own; paused and empty have none. */
.deadline-indicator {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13.5px;
    line-height: 1.3;
    white-space: nowrap;
}

.deadline-indicator::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(-1px);
}

.deadline-indicator--overdue {
    color: var(--err-ink);
    font-weight: 600;
}

.deadline-indicator--due3 {
    color: var(--warn-ink);
    font-weight: 600;
}

.deadline-indicator--due3::before,
.deadline-indicator--due7::before {
    background: var(--warn);
}

.deadline-indicator--due7,
.deadline-indicator--later {
    color: var(--text);
    font-weight: 500;
}

.deadline-indicator--later::before {
    background: var(--border-2);
}

/* Paused: „Заустављен · остало N дана“ may wrap to two lines inside its cell (PLAN D12). */
.deadline-indicator--paused {
    color: var(--muted);
    white-space: normal;
}

.deadline-indicator--empty {
    color: var(--muted);
}

.deadline-indicator--paused::before,
.deadline-indicator--empty::before,
.deadline-indicator--chip::before {
    display: none;
}

/* Chip (case header): text + icon, no border or background (prototype .chip). */
.deadline-indicator--chip {
    align-items: center;
    height: 24px;
    font-weight: 600;
    line-height: 1;
}

.deadline-indicator--chip .deadline-indicator__date {
    font-family: var(--mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

html {
    height: 100%;
    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;
}

/* 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 {
    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 {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    background: var(--color-primary);
    color: var(--on-pri);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    z-index: 9999;
    outline: 2px solid var(--text-primary);
}

.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;
}

/* I-049 AD7 — one focus contract (prototype line 105): keyboard focus draws a 2px --focus outline, offset 2px, on
   anything focusable; :focus-visible only, so a mouse click draws nothing (B-008). Where AntD resets the outline on a
   heavier selector loading after this file (`.ant-btn:focus`, `a:focus`, `.ant-tabs-tab-btn`, `.ant-switch:focus`, the
   pager items) a rule of that control repeats it: the button rules below, the AntD atoms in overrides.css. Text controls
   show focus on their border instead (border --focus + 0 0 0 3px --pri-bg, prototype .ctl:focus); rows, tab buttons
   and menu items inside a clipping container use the inset variant (outline-offset: -2px). Tokens only. */
:focus-visible {
    outline: 2px solid var(--focus);
    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: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px var(--shadow-color);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#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(--err);
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--on-err);
}

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

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

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* F-263: the page glow token, so the pre-Blazor screen follows data-theme (set by js/theme.js before paint) */
    background: var(--gradient-bg);
    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(--pri-rgb), .5));
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(var(--pri-rgb), .5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(var(--pri-rgb), .7));
    }
}

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

.loading-ring-track {
    fill: none;
    stroke: var(--line);
    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(--pri-rgb), .6));
    animation: ringGlow 2s ease-in-out infinite;
}

@keyframes ringGlow {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(var(--pri-rgb), .6));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(var(--pri-rgb), .8));
    }
}

.loading-text {
    margin-top: 24px;
    color: var(--text-2);
    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-light);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

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

/* Auth page specific - Language Picker Select */
.auth-page .ant-select {
    min-width: 130px;
}

.auth-page .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 .ant-select-arrow {
    color: var(--text-muted) !important;
}

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

.auth-page .ant-select-focused .ant-select-selector {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

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

/* ========================================
   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(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

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

/* Select clear button - remove white background, show only X */
.ant-select-clear {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text-muted) !important;
}

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

/* Hide clear icon when no value is selected */
.ant-select:not(:has(.ant-select-selection-item)) .ant-select-clear {
    display: none !important;
}

/* Search input group - seamless connection between input and 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-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !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-input-group-addon .ant-btn.ant-btn-icon-only.ant-input-search-button {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    border-left: none !important;
    color: var(--text-secondary) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    margin-left: 0 !important;
    height: 32px !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 {
    background: var(--neu-bg) !important;
    border-color: var(--color-primary) !important;
    border-left: none !important;
    color: var(--color-primary) !important;
}

/* Spin/Loading in dark theme */
.main-layout .ant-spin-dot-item {
    background-color: var(--color-primary) !important;
}

/* ========================================
   Sidebar Navigation - Override AntDesign Blue
   ======================================== */

/* Menu selected state - force orange instead of blue */
.main-sider .ant-menu-dark .ant-menu-item-selected,
.main-sider .ant-menu.ant-menu-dark .ant-menu-item-selected,
.main-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected,
.ant-menu-dark .ant-menu-item-selected,
.ant-menu.ant-menu-dark .ant-menu-item-selected {
    background-color: var(--sd-act-bg) !important;
    color: var(--color-primary) !important;
}

/* Selected item - text and links */
.main-sider .ant-menu-dark .ant-menu-item-selected .ant-menu-title-content,
.main-sider .ant-menu-dark .ant-menu-item-selected .ant-menu-title-content a,
.main-sider .ant-menu-dark .ant-menu-item-selected a,
.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content,
.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content a,
.ant-menu-dark .ant-menu-item-selected a,
.ant-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content,
.ant-menu.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content a,
.ant-menu.ant-menu-dark .ant-menu-item-selected a {
    color: var(--color-primary) !important;
}

/* Selected icon color */
.main-sider .ant-menu-dark .ant-menu-item-selected .anticon,
.main-sider .ant-menu.ant-menu-dark .ant-menu-item-selected .anticon,
.ant-menu-dark .ant-menu-item-selected .anticon,
.ant-menu.ant-menu-dark .ant-menu-item-selected .anticon,
.ant-menu-dark .ant-menu-item-selected .anticon svg,
.ant-menu.ant-menu-dark .ant-menu-item-selected .anticon svg {
    color: var(--color-primary) !important;
    fill: var(--color-primary) !important;
}

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

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

.main-sider .ant-menu-dark .ant-menu-item:hover .anticon {
    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;
}

/* ========================================
   Global Button Styles - Rounded Action Buttons
   ======================================== */

/* Base button - rounded corners for all buttons */
.ant-btn {
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
    transition: all var(--transition-fast) !important;
}

/* Primary button - solid --pri fill with glow (F-263 D12; overrides.css .ant-btn.ant-btn-primary is the source of truth) */
.ant-btn-primary {
    background: var(--pri) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--pri-rgb), .35) !important;
    color: var(--on-pri) !important;
}

/* B-028 (1330, 1349): the hover/focus/active guard excludes :disabled, [disabled] and .ant-btn-disabled inside
   :where() (zero specificity), so a class- or attribute-disabled primary (an <a>, a button in a disabled
   fieldset) never glows or lifts and the disabled rule below owns its look. */
.ant-btn-primary:is(:hover, .ds-force-hover):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn-primary:is(:focus-visible, .ds-force-focus):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: var(--pri-h) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--pri-rgb), .45) !important;
}

.ant-btn-primary:active:where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--pri-rgb), .35) !important;
}

/* B-051 AD4 (b), I-049 AD7: keyboard focus draws the focus outline (2px --focus, offset 2px) around the hover glow
   above — the ring is the outline now, no box-shadow. Same (0,2,0) as the hover/active rules, placed after both;
   !important because AntD's `.ant-btn:focus { outline: 0 }` is (0,2,0) too and loads later. overrides.css's (0,3,0)
   primary copies set only the glow, so this rule decides the outline of every primary (danger included). */
.ant-btn-primary:is(:focus-visible, .ds-force-focus):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    outline: 2px solid var(--focus) !important;
    outline-offset: 2px;
}

/* B-028 (1330): lists :disabled too and resets the lift */
.ant-btn-primary[disabled],
.ant-btn-primary:disabled,
.ant-btn-primary.ant-btn-disabled {
    background: var(--neu-bg) !important;
    box-shadow: none !important;
    color: var(--text-disabled) !important;
    cursor: not-allowed;
    transform: none !important;
}

/* Default button - glass morphism style */
/* B-047 (fork B-001): a static-SSR page hand-writes <a class="ant-btn"> (no circuit, so no <Button> to emit
   ant-btn-default); a variant-less anchor gets the same glass recipe. Anchors carrying a variant class keep their
   own blocks (ant-btn-dashed stays excluded: it has its own look). The anchor test sits inside :where() so the
   BASE rule weigh exactly what .ant-btn-default weighs (0,1,0), so it wins or loses against other rules
   (overrides.css, contextual .x .ant-btn) the way the <button> does. The hover/focus-visible rules do NOT match:
   the anchor form is (0,2,0) (.ant-btn + pseudo-class; both :where() add nothing) against (0,3,0) for
   .ant-btn-default:hover:not(:disabled) - an anchor loses a tie-break that the <button> would win. */
.ant-btn-default,
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)) {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border-light) !important;
    color: var(--text-secondary) !important;
}

/* B-008 (2608): :focus-visible, not :focus - a mouse click leaves no stuck highlight */
.ant-btn-default:is(:hover, .ds-force-hover):not(:disabled),
.ant-btn-default:is(:focus-visible, .ds-force-focus):not(:disabled),
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)):is(:hover, .ds-force-hover):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)):is(:focus-visible, .ds-force-focus):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)) {
    background: var(--neu-bg) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.ant-btn-default[disabled],
.ant-btn-default.ant-btn-disabled,
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed))[disabled],
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)).ant-btn-disabled {
    background: var(--panel) !important;
    border-color: var(--line) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

/* Danger button - red styling */
.ant-btn-dangerous:not(.ant-btn-primary) {
    background: var(--err-bg) !important;
    border: 1px solid var(--err-bd) !important;
    color: var(--color-error-light) !important;
}

/* The prototype's .btn--danger:hover — the --err-bg tint and an --err border. A deeper --err-bd fill read 3.73:1 for the
   --err-ink label in light (F-266 TASK_03). */
.ant-btn-dangerous:not(.ant-btn-primary):is(:hover, .ds-force-hover):not(:disabled),
.ant-btn-dangerous:not(.ant-btn-primary):is(:focus-visible, .ds-force-focus):not(:disabled) {
    background: var(--err-bg) !important;
    border-color: var(--err) !important;
    color: var(--color-error-light) !important;
}

/* Primary danger button */
.ant-btn-primary.ant-btn-dangerous {
    background: var(--err) !important;
    border: none !important;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--err) 35%, transparent) !important;
    color: var(--on-err) !important;
}

.ant-btn-primary.ant-btn-dangerous:is(:hover, .ds-force-hover):not(:disabled) {
    box-shadow: 0 6px 20px color-mix(in srgb, var(--err) 45%, transparent) !important;
    transform: translateY(-1px);
}

/* Text button */
.ant-btn-text {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
}

.ant-btn-text:is(:hover, .ds-force-hover):not(:disabled),
.ant-btn-text:is(:focus-visible, .ds-force-focus):not(:disabled) {
    background: var(--panel-3) !important;
    color: var(--text-primary) !important;
}

/* Link button */
.ant-btn-link {
    background: transparent !important;
    border: none !important;
    color: var(--pri-ink) !important;
    box-shadow: none !important;
}

.ant-btn-link:hover:not(:disabled),
.ant-btn-link:focus-visible:not(:disabled) {
    color: var(--color-primary-light) !important;
}

/* I-041: --color-primary-light is --pri-ink, the rest colour, so the hover above changes nothing — the label
   underlines instead (the link rule in overrides.css). On the label span: AntD's `.ant-btn > span` is an inline-block,
   which a text-decoration on the button does not reach. */
.ant-btn-link:hover:not(:disabled) > span:not(.anticon) {
    text-decoration: underline;
}

.ant-btn-link.ant-btn-dangerous {
    color: var(--color-error-light) !important;
}

.ant-btn-link.ant-btn-dangerous:is(:hover, .ds-force-hover):not(:disabled) {
    color: var(--color-error) !important;
}

/* B-051 AD4 (b), I-049 AD7: keyboard focus draws the focus outline (2px --focus, offset 2px — the ring is the outline
   now, no box-shadow) on every non-primary type, on top of the border/text highlight above. One rule decides the
   outline; each selector repeats its type's :focus-visible weight - Default (0,3,0), anchor form (0,2,0), Danger
   (0,4,0), Text and Link (0,3,0), Dashed (0,3,0, its highlight lives in overrides.css) - and the outline is !important
   against AntD's later `.ant-btn:focus { outline: 0 }` (0,2,0). Hover alone draws no outline. */
.ant-btn-default:is(:focus-visible, .ds-force-focus):not(:disabled),
.ant-btn:where(a:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-text):not(.ant-btn-link):not(.ant-btn-dashed)):is(:focus-visible, .ds-force-focus):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn.ant-btn-dashed:is(:focus-visible, .ds-force-focus):where(:not(:disabled):not([disabled]):not(.ant-btn-disabled)),
.ant-btn-dangerous:not(.ant-btn-primary):is(:focus-visible, .ds-force-focus):not(:disabled),
.ant-btn-text:is(:focus-visible, .ds-force-focus):not(:disabled),
.ant-btn-link:focus-visible:not(:disabled) {
    outline: 2px solid var(--focus) !important;
    outline-offset: 2px;
}

/* Small button size */
.ant-btn-sm {
    border-radius: 6px !important;
}

/* Large button size */
.ant-btn-lg {
    border-radius: var(--radius-md) !important;
}

/* Block button */
.ant-btn-block {
    border-radius: var(--radius-sm) !important;
}

/* Button with icon spacing */
.ant-btn > .anticon + span,
.ant-btn > span + .anticon {
    margin-left: 6px;
}

/* Icon-only button */
.ant-btn-icon-only {
    border-radius: var(--radius-sm) !important;
}

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

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

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

/* ========================================
   Modal Button Overrides
   ======================================== */

.ant-modal-footer .ant-btn {
    border-radius: var(--radius-sm) !important;
}

.ant-modal-confirm-btns .ant-btn {
    border-radius: var(--radius-sm) !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. I-039: not the nav badge (.nb) — collapsed it is the 8px dot,
   and the shell block at the end of this file hides the neutral one. */
.ant-menu-inline-collapsed .ant-menu-item .ant-menu-title-content a span:not(.anticon):not(.nb) {
    display: none !important;
}

/* ========================================
   Search Input Button Override
   Override primary button styles for search inputs
   Make it a standalone rounded button like Create Ticket
   ======================================== */

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

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

.ant-input-search .ant-input-group-addon {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Make the search input have rounded corners on all sides */
.ant-input-search .ant-input {
    border-radius: var(--radius-sm) !important;
}

/* ========================================
   TextArea Global Styling
   ======================================== */

.ant-input-textarea textarea,
textarea.ant-input {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
}

.ant-input-textarea textarea:where(:not(:disabled)):is(:hover, .ds-force-hover),
textarea.ant-input:where(:not(:disabled)):is(:hover, .ds-force-hover) {
    border-color: var(--ctl-bd-h) !important;
}

/* I-049 AD7: a text control's focus is its border (prototype .ctl:focus) — :focus, not :focus-visible (the caret). */
.ant-input-textarea textarea:is(:focus, .ds-force-focus),
textarea.ant-input:is(:focus, .ds-force-focus) {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

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

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

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

/* Force all textareas to dark theme - specific AntDesign selector */
.ant-input-textarea .ant-input-affix-wrapper textarea.ant-input,
.ant-input-textarea textarea.ant-input,
.ant-input-textarea-show-count .ant-input-affix-wrapper textarea.ant-input,
.ant-input-textarea-in-form-item textarea.ant-input,
textarea.ant-input {
    background: var(--ctl-bg) !important;
    background-color: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: 12px !important;
    color: var(--text) !important;
    color-scheme: inherit !important;
}

.ant-input-textarea .ant-input-affix-wrapper,
.ant-input-textarea-show-count .ant-input-affix-wrapper {
    background: transparent !important;
    border: none !important;
}

/* Remove border from textarea wrapper when show-count is enabled */
.ant-input-textarea.ant-input-textarea-show-count,
.ant-input-textarea.ant-input-textarea-in-form-item,
div.ant-input-textarea.ant-input-textarea-show-count.ant-input-textarea-in-form-item {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
}

.ant-input-textarea .ant-input-affix-wrapper textarea.ant-input:is(:focus, .ds-force-focus),
.ant-input-textarea textarea.ant-input:is(:focus, .ds-force-focus),
textarea.ant-input:is(:focus, .ds-force-focus) {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
    outline: none !important;
    background: var(--ctl-bg) !important;
}

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

/* ========================================
   Global Form Input Styling
   Glass-morphism for all AntDesign inputs
   ======================================== */

/* Standard inputs */
.ant-input {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-base) !important;
}

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

.ant-input:is(:hover, .ds-force-hover) {
    border-color: var(--ctl-bd-h) !important;
}

.ant-input:is(:focus, .ds-force-focus),
.ant-input-focused {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

/* Input sizes — respect AntDesign defaults, no forced heights */

/* Input number */
.ant-input-number-lg {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
}

.ant-input-number-lg:is(:hover, .ds-force-hover) {
    border-color: var(--ctl-bd-h) !important;
}

.ant-input-number-lg:is(:focus, .ds-force-focus),
.ant-input-number-lg-focused {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

/* Password input — wrapper (.ant-input-affix-wrapper) */
.ant-input-affix-wrapper.ant-input-password {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
}

.ant-input-affix-wrapper.ant-input-password:where(:not(.ant-input-affix-wrapper-disabled)):is(:hover, .ds-force-hover) {
    border-color: var(--ctl-bd-h) !important;
}

.ant-input-affix-wrapper.ant-input-password:is(:focus-within, .ds-force-focus) {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

.ant-input-affix-wrapper.ant-input-password .ant-input {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
}

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

.ant-input-affix-wrapper.ant-input-password .ant-input-suffix .anticon {
    color: var(--text-muted) !important;
}

/* Password large size — respect AntDesign defaults */

/* Select */
.ant-select-selector {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
}

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

.ant-select:where(:not(.ant-select-disabled)):is(:hover, .ds-force-hover) .ant-select-selector {
    border-color: var(--ctl-bd-h) !important;
}

.ant-select-focused .ant-select-selector,
.ant-select.ds-force-focus .ant-select-selector {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

.ant-select-selection-item {
    color: var(--text-primary) !important;
}

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

.ant-select-selection-search-input {
    color: var(--text-primary) !important;
}

/* Select large size — respect AntDesign defaults */

/* Date picker */
.ant-picker {
    background: var(--ctl-bg) !important;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-base) !important;
}

.ant-picker:where(:not(.ant-picker-disabled)):is(:hover, .ds-force-hover) {
    border-color: var(--ctl-bd-h) !important;
}

.ant-picker-focused,
.ant-picker.ds-force-focus {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

/* DatePicker large size — respect AntDesign defaults */

.ant-picker-input > input {
    color: var(--text-primary) !important;
}

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

.ant-picker-suffix {
    color: var(--text-muted) !important;
}

/* ========================================
   Native File Input Override — .upload-dropzone and .file-input only (B-009)
   The invisible full-size overlay is the click target of a positioned upload
   wrapper: .upload-dropzone, or the Support pages' .upload-area(-small). Their
   <InputFile class="file-input"> is a child component, so a page's scoped
   .file-input rule never reaches it — this global rule is the only one (the
   scoped copies in the Support pages were removed).
   ======================================== */

.upload-dropzone input[type="file"],
input[type="file"].file-input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 100 !important;
    font-size: 0 !important;
}

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

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

/* Fork (pisarcheon): B-009 port compatibility. These Core upload zones style their <InputFile>
   from scoped CSS without ::deep, so the rule never matches and they relied on the old global
   input[type="file"] overlay. Their wrappers are positioned, so the overlay stays inside them.
   Remove a selector once its Core component moves the rule under ::deep. */
input[type="file"].procedure-import-modal__file-input,
input[type="file"].adresar-import-modal__file-input,
input[type="file"].branding-upload__input,
input[type="file"].upload-zone__input {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 100 !important;
}

/* ApprovalDocumentUpload's scoped rule intends display:none (the wrapping <label> opens the
   picker); its dropzone is not positioned, so the old overlay escaped it. */
input[type="file"].approval-upload__input {
    display: none;
}

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

/* Page widths (I-049 TASK_22, PLAN LP7): narrow = the pane-less forms' left-aligned column and portal = the template
   billing pages (not routable) — used by their .page-container modifiers; default = the content box cap (.content) and
   wide = the bare layout's column (.ob-wrap), whose rules carry the prototype's literal values (LP13) — keep them equal. */
:root {
    --page-width-narrow: 720px;
    --page-width-default: 1520px;
    --page-width-wide: 1200px;
    --page-width-portal: 960px;

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

/* ── Page layout (I-049 TASK_22, PLAN § Addendum LP7): the prototype's .content / .page-hd / .page-title / .page-sub ──
   The class vocabulary stays (catalog required_classes, design-lint rule 4, bUnit / E2E selectors); what the classes
   mean is the prototype's. .page-wrapper = .content: left-aligned, capped at 1520px, its padding the prototype's at
   1440 / <= 999.98 / <= 640 (the responsive copies are next to the rule, there are no others). */
.page-wrapper {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1520px;
    min-height: calc(100vh - var(--shell-header-h)); /* viewport - header (no footer bar since TASK_22) */
    margin: 0;
    padding: 28px 24px 56px 28px;
    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;
}

@media (max-width: 999.98px) {
    .page-wrapper {
        padding: 24px 24px 48px;
    }
}

@media (max-width: 640px) {
    .page-wrapper {
        padding: 20px 16px 40px;
    }
}

/* .page-container = an unconstrained column inside the content box (the prototype has none; the content's inner box is
   the column), still the DevPathBadge's positioning parent. */
.page-container {
    position: relative; /* For DevPathBadge positioning */
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Modifiers the prototype has no counterpart for are left-aligned columns (LP7). --wide / --full: no cap. */
.page-container--narrow {
    max-width: var(--page-width-narrow); /* 720px */
}

.page-container--wide,
.page-container--full {
    max-width: none;
}

.page-container--portal {
    max-width: var(--page-width-portal); /* 960px */
}

/* Vertical rhythm (TASK_22, PLAN LP7 / requirement 4). The prototype's measured gaps live on their blocks — the toolbar
   (margin 22px 0 14px), the chips (-4px 0 14px), the bulk bar (margin-bottom 10px), the count below the table panel
   (.tbl-foot, padding 12px 4px 0) and the archetype grids' top offsets (detail 24, split form 22, settings 24, desk
   26 after the 14px summary, wizard 28) — so this token gap leaves those blocks out and keeps var(--space-lg) between
   every other pair of blocks (nothing becomes zero by accident). The `:not(style, .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 chain. (0,3,0) — over AntD's component resets (margin: 0). */
.page-container > :not(style, .dev-path-badge) + :not(style, .dev-path-badge, .data-table-toolbar, .filter-chips, .bulk-bar, .data-table__count, .detail-page-grid, .split-form, .settings-layout, .home-summary, .home-grid, .wizard-shell__grid, .figures-tabs--top, .page-tab-body),
.page-container > :where(.page-tab-body) > :not(style, .dev-path-badge) + :not(style, .dev-path-badge, .data-table-toolbar, .filter-chips, .bulk-bar, .data-table__count, .detail-page-grid, .split-form, .settings-layout, .home-summary, .home-grid, .wizard-shell__grid, .figures-tabs--top),
.page-container > :where(.page-tab-body) > :not(style, .dev-path-badge, .data-table-toolbar, .filter-chips, .bulk-bar, .data-table__count, .detail-page-grid, .split-form, .settings-layout, .home-summary, .home-grid, .wizard-shell__grid, .figures-tabs--top):first-child {
    margin-top: var(--space-lg);
}

/* I-049 TASK_32 (thread 11317): .page-tab-body is a tab section kept mounted (hidden while another section is open) —
   /archival's hub. It is no block of its own: its children take the rhythm they would take as direct .page-container
   children (a hidden section before it always precedes them, so its first child counts as preceded). The :where()
   keeps every rule's specificity as it was. */

/* The table under the toolbar, the chips or the bulk bar takes no gap of its own: the prototype's 14 / 14 / 10 below
   them decide (.panel.tbl-wrap has no top margin). Only the table frame, the ledger and a tab panel wrapping them —
   other blocks there (a figures row, a page's own panel) keep the token gap; their prototype offsets are the page
   tasks' (TASK_23–28; .figs--top brings its own 22px). A visually hidden live region (BulkBar's) may sit in between.
   (0,3,0) after the token gap, (0,4,0). */
.page-container > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]),
.page-container > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]),
.page-container > :where(.page-tab-body) > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]),
.page-container > :where(.page-tab-body) > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]) {
    margin-top: 0;
}

/* I-049 TASK_23: a state host (aria-busy / data-testid div) whose own child is the frame or the ledger is no block of its
   own — the gap under the toolbar is the prototype's 14px, not the token gap. The direct-child selector is (0,3,0) like the
   token gap and wins by coming AFTER it — keep this block below the owl; the .visually-hidden variant is (0,4,0). */
.page-container > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])),
.page-container > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])),
.page-container > :where(.page-tab-body) > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])),
.page-container > :where(.page-tab-body) > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])) {
    margin-top: 0;
}

/* Same rhythm inside AntDesign tab panes. Pages that put their sections inside
   <Tabs> (e.g. Reports) lose the owl above — pane children are no longer direct
   page-container children — so glass cards and grids collapse flush against each
   other. Scoped to .page-container so dev/playground tab usages stay untouched.
   margin-top (not gap) keeps it non-additive with sections that carry their own
   top margin. */
.page-container .ant-tabs-tabpane > :not(style, .dev-path-badge) + :not(style, .dev-path-badge, .data-table-toolbar, .filter-chips, .bulk-bar, .data-table__count, .detail-page-grid, .split-form, .settings-layout, .home-summary, .home-grid, .wizard-shell__grid, .figures-tabs--top) {
    margin-top: var(--space-lg);
}

.page-container .ant-tabs-tabpane > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]),
.page-container .ant-tabs-tabpane > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :is([data-pattern="data-table"], [data-pattern="ledger"], [role="tabpanel"], [role="region"]) {
    margin-top: 0;
}

.page-container .ant-tabs-tabpane > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])),
.page-container .ant-tabs-tabpane > :is(.data-table-toolbar, .filter-chips, .bulk-bar) + .visually-hidden + :where(div):has(> :is([data-pattern="data-table"], [data-pattern="ledger"])) {
    margin-top: 0;
}

/* The toolbar 22px below whatever precedes it — the header, or a header block without a breadcrumb (prototype .toolbar
   margin: 22px 0 14px; the 14px is on .data-table-toolbar itself). A first-child toolbar takes no top margin. */
.page-container > :not(style, .dev-path-badge) + .data-table-toolbar,
.page-container .ant-tabs-tabpane > :not(style, .dev-path-badge) + .data-table-toolbar,
.page-container > :where(.page-tab-body) > :not(style, .dev-path-badge) + .data-table-toolbar,
.page-container > :where(.page-tab-body) > .data-table-toolbar:first-child {
    margin-top: 22px;
}

/* I-049 TASK_28 (PLAN LP13): the block right under a toolbar takes no top margin of its own — the toolbar's 14px
   (.toolbar { margin: 22px 0 14px }) decides, as in every prototype screen (the feed panel of #notifications, the alert
   over the month calendar of #holidays, the home grid of #search). The figures row keeps its 22px (.figs--top), the
   ledger bar its own rule below. The chips row keeps its own -4px (prototype .chips margin: -4px 0 14px → 10px under the
   toolbar; I-049 TASK_32). (0,3,0) / (0,4,0) after the owls. */
.page-container > .data-table-toolbar + :not(style, .dev-path-badge, .figures-tabs--top, .filter-chips),
.page-container .ant-tabs-tabpane > .data-table-toolbar + :not(style, .dev-path-badge, .figures-tabs--top, .filter-chips),
.page-container > :where(.page-tab-body) > .data-table-toolbar + :not(style, .dev-path-badge, .figures-tabs--top, .filter-chips) {
    margin-top: 0;
}

/* I-049 TASK_24: the register's toolbar (prototype .toolbar.ak-tools, margin: 22px 0 12px) above the ledger bar
   (.ak-bar, margin-bottom 10px) above the ledger panel — the bar and the panel take no token gap of their own. A
   visually hidden live region or the chips row may sit in between. */
:is(.page-container, .page-container .ant-tabs-tabpane, .page-container > :where(.page-tab-body)) > .data-table-toolbar:has(+ .ledger-bar, + .filter-chips + .ledger-bar) {
    margin-bottom: 12px;
}

:is(.page-container, .page-container .ant-tabs-tabpane, .page-container > :where(.page-tab-body)) > :is(.data-table-toolbar, .filter-chips) + .ledger-bar,
:is(.page-container, .page-container .ant-tabs-tabpane, .page-container > :where(.page-tab-body)) > .ledger-bar + :is([data-pattern="ledger"], .visually-hidden, div:has(> [data-pattern="ledger"])) {
    margin-top: 0;
}

/* I-049 TASK_24: a tab body whose first child is the toolbar (/dispatch — each tab renders its own toolbar, the view
   switch first in it) is no block of its own: the toolbar's 22px decides, not the token gap. (0,4,0) over the owl.
   TASK_32: /dispatch keeps each opened tab mounted in a .page-tab-body of its own inside the panel. */
.page-container > :not(style, .dev-path-badge) + :where(div:not(.page-tab-body)):has(> .data-table-toolbar:first-child, > :where(.page-tab-body) > .data-table-toolbar:first-child) {
    margin-top: 22px;
}

/* The archetype grids' top offsets (prototype .case-grid 24, .ikf 22, .st 24, .ob-grid 28; .home-summary 14 and
   .home-grid 26 are on their own rules) — below whatever precedes them, never on a first child. */
.page-container > :not(style, .dev-path-badge) + .detail-page-grid,
.page-container > div[aria-live] > :not(style, .dev-path-badge) + .detail-page-grid, /* I-049 TASK_25: /support/{Id}'s live-region wrapper */
.page-container > :not(style, .dev-path-badge) + .settings-layout {
    margin-top: 24px;
}

.page-container > :not(style, .dev-path-badge) + .split-form {
    margin-top: 22px;
}

/* I-049 TASK_26 (PLAN LP13): the header block below the breadcrumb row — the case page's .case-hd { margin-top: 14px },
   the intake page's .page-hd 12px below its .crumbs (not the generic 24px rhythm). */
[data-pattern="detail-page"] > .page-container > .ant-breadcrumb + .page-header,
[data-pattern="detail-page"] > .page-container > div[aria-live] > .ant-breadcrumb + .page-header { /* I-049 TASK_33: /support/{Id} */
    margin-top: 14px;
}

/* I-049 TASK_33: the settings pages (#settings) and the ledgers (#register) carry the prototype's .crumbs too, the
   header 12px below them (pageHead's margin-top: 12px). */
[data-pattern="settings-layout-page"] > .page-container > .ant-breadcrumb + .page-header,
[data-pattern="data-table-page"] > .page-container > .ant-breadcrumb + .page-header {
    margin-top: 12px;
}

[data-pattern="split-form-page"] > .page-container > .ant-breadcrumb + .page-header {
    margin-top: 12px;
}

/* I-049 TASK_26: a split form inside a page tab set (/submissions/new's Појединачни / Пакетни) keeps the .ikf 22 below
   the block above it — the tab bar (AntD's .ant-tabs-nav margin-bottom is 16). */
.page-container > .ant-tabs:has(> .ant-tabs-content-holder .split-form) > .ant-tabs-nav {
    margin-bottom: 22px;
}

/* Prototype @media (max-width: 700px) { .st { gap: 16px; margin-top: 18px } } */
@media (max-width: 700px) {
    .page-container > :not(style, .dev-path-badge) + .settings-layout {
        margin-top: 18px;
    }
}

/* Page header = the prototype's plain .page-hd: no background, border, radius, padding, shadow, backdrop or card
   animation. --simple (the old "no card" opt-out) is an alias of the base. */
.page-header,
.page-header--simple {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* A header whose title is its own child (no .page-header__content column — /search, the template billing pages)
   stacks title and subtitle as block flow; the prototype always wraps them in one column, which the page tasks port. */
.page-header:has(> .page-title) {
    display: block;
}

/* Page Title (prototype .page-title: 700 28px/1.2 var(--head), letter-spacing -.012em; 24px at <= 640px below) */
.page-title {
    font-size: var(--font-size-page-title);
    font-weight: var(--font-weight-page-title);
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.012em;
    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 (prototype .page-sub: margin-top 4px, --text-2, 14.5px) */
.page-subtitle {
    margin: 4px 0 0;
    color: var(--text-2);
    font-size: 14.5px;
}

/* 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: var(--font-size-section-title);
    font-weight: var(--font-weight-section-title);
    color: var(--text-primary);
    margin: 0 0 var(--space-xs);
}

.section-title-xs {
    font-size: var(--font-size-eyebrow);
    font-weight: var(--font-weight-eyebrow);
    color: var(--text-secondary);
    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: the base .page-hd row (align-items: flex-end, 16px gap — TASK_22), the title column and
   the actions pushed right (prototype pageHead: the column flex 1, the actions after it). */
.page-header--with-actions {
    display: flex;
    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;
}

/* I-049 TASK_33 (LP13): a page head keeps its actions on the title's row like the prototype's .page-hd, whose title
   column is flex: 1 (basis 0): the title wraps beside the actions instead of the actions dropping below it — down to a
   12rem title column, below which the actions take their own line. The record header follows .case-hd (its own rules). */
.page-header--with-actions:not(.record-header, .predmet-header) > .page-header__content {
    flex: 1 1 0;
    min-width: min(100%, 12rem);
}

/* I-049 TASK_34 (owner 8A): at <= 640px a page head's actions always sit under the title and the lede, left-aligned, at
   their own width (the prototype's .page-hd at that width) — the title column takes the whole line. */
@media (max-width: 640px) {
    .page-header--with-actions:not(.record-header, .predmet-header) > .page-header__content {
        flex-basis: 100%;
    }

    .page-header--with-actions:not(.record-header, .predmet-header) > .page-header__actions {
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* 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;
}

/* I-049 TASK_24: a page-level alert of a list (/security/breaches) is the header's last row, full width, so the toolbar
   keeps the prototype's 22px under the header block (prototype .page-hd is flex-wrap, gap 16px). */
.page-header__alert {
    flex: 1 1 100%;
    min-width: 0;
}

/* I-049 TASK_34 (owner 2B): a short status note in the page head's actions, immediately left of the button it belongs to
   (/overdue's „Последња провера: …“ beside „Освежи“) — small muted text, centred with the button by the actions row. */
.page-header__note {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

/* 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 (for inline help icon) */
.page-header__title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap; /* B-009: title + help icon wraps 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`. */
.form-row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

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

/* --- 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;
    }
}

/* 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;
}

/* 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 !important;
}

/* A field grid inside a stack (the prototype's .fgrid in .fstack): its gaps space the fields, so its items drop
   AntD's bottom margin and offset the same way — the first item of a row no longer makes it 20px taller. */
.form-stack > .form-grid > .ant-form-item.ant-form-item,
.form-stack > .form-grid > .form-grid__full > .ant-form-item.ant-form-item {
    margin-bottom: 0;
}

.form-stack > .form-grid > .ant-form-item .ant-form-item-margin-offset.ant-form-item-margin-offset,
.form-stack > .form-grid > .form-grid__full > .ant-form-item .ant-form-item-margin-offset.ant-form-item-margin-offset {
    margin-bottom: 0 !important;
}

/* 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: var(--font-size-subblock-title);
    font-weight: var(--font-weight-subblock-title);
    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.
   ======================================== */

/* I-049 TASK_22 (PLAN LP7): the prototype's .panel — background var(--panel), 1px var(--border), radius 12px, no
   backdrop. The padding stays the token gap here; per-anatomy paddings are the page tasks' (TASK_23–28). */
.glass-card {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    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 var(--shadow-color);
}

/* ========================================
   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) */
.detail-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--space-lg);
    align-items: start;
}

/* Single-column variant — for detail pages without a side panel (e.g. tabbed bodies). */
.detail-page-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

/* 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);
}

.detail-page-grid__side {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    /* Sticks 24px under the sticky shell header (no prototype counterpart; I-056 TASK_02) */
    position: sticky;
    top: calc(var(--shell-header-h) + var(--space-lg));
    align-self: 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: var(--font-size-subblock-title);
    font-weight: var(--font-weight-subblock-title);
    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;
    }
}

/* 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);
}

/* Custom modal footer (Footer="null" + button row inside .ant-modal-body).
   Extends to modal-body edges, matching the native .ant-modal-footer chrome — I-062 TASK_12: the prototype's .dlg__ft,
   14px 20px 18px with no rule, out to the body's 10px 20px 6px edges (overrides.css "Modal/Drawer Overrides"). */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin: 6px -20px -6px;
    padding: 14px 20px 18px;
}

/* Drawer-form scrollable body — used by VersionHistoryDrawer, AdresarDrawer, etc. */
.drawer-form__body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1 1 auto;
}

/* Drawer-form sticky footer — stays pinned to the bottom of long forms in a Drawer.
   Used by AdresarDrawer, UserDrawer, ClassifyDrawer, etc. */
.drawer-form__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* form-modal pattern — used by Predmeti action modals (Approve/Reject/Assign/etc.)
   Wraps modal-body content with a vertical flex stack + standard label/hint helpers.
   .form-modal__actions matches .modal-actions footer chrome (edge-to-edge, no rule). */
.form-modal {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

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

/* Intrinsic-width controls (Switch, RadioGroup, Checkbox, Segmented, Rate) must not
   stretch to the full field width under the column flex's default align-items: stretch.
   Input / Select / DatePicker still fill via their own width: 100%. Mirrors .pg-field. */
.form-modal__field > .ant-switch,
.form-modal__field > .ant-radio-group,
.form-modal__field > .ant-checkbox-wrapper,
.form-modal__field > .ant-rate,
.form-modal__field > .ant-segmented {
    align-self: flex-start;
}

.form-modal__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-modal__hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Inline hint following a label on the same line — e.g. the email beside a user's name in a
   Select ItemTemplate. Promoted to a global utility (CF-101) alongside .form-error so components
   composing from globals only (no scoped CSS, F-176) can use it. */
.form-modal__hint--spaced {
    margin-left: var(--space-sm);
}

.form-modal__actions,
.form-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin: 0 -20px -6px;
    padding: 14px 20px 18px;
}

/* Inline validation error text — used inside .form-modal and other form contexts. Promoted to a
   global utility (CF-049) so components composing from globals (no scoped CSS, F-176) can use it.
   I-062 TASK_13: the prototype's .fi__err — 13px / 1.4 in --err-ink (the fill colour --err was the token port of AntD's
   #ff4d4f); a .form-field's 6px gap puts it 6px under its control, as .fi__row. */
.form-error {
    color: var(--err-ink);
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* Inline error under a filter control (e.g. report period) — keep it off the input's edge. */
.filter-item .form-error {
    margin-top: var(--space-xs);
}

/* overrides.css styles `.ant-modal-body p` (specificity 0,1,1), which outranks the bare
   `.form-error` above (0,1,0) — so inside a Modal the error text rendered in ordinary body colour.
   Modals that ship scoped CSS never noticed (Blazor's `[b-*]` attribute lifts their private copy to
   0,2,0), but the globals-only modals F-176 requires had no such escape. This restores the error
   colour for them without touching the overrides rule every modal body depends on. */
.ant-modal-body p.form-error {
    color: var(--err-ink);
    line-height: 1.4;
}

/* Secondary hint text inside a form/modal body. Same promotion rationale as .form-error above
   (CF-093): it previously existed only inside SplitModal.razor.css, so a modal that ships without
   scoped CSS could not use it. */
.form-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Warning-tinted variant of .form-hint — inline, non-blocking feedback inside a modal body
   (e.g. "this OJ is already selected"). Same promotion rationale as .form-hint: `modal-page` is
   `scoped_css_allowed: "none"`, so a modal shipping without scoped CSS needs this globally.
   Uses --color-warning (not brand orange) — this is contextual status, not brand. CF-099. */
.form-hint--warning {
    color: var(--color-warning);
}

/* Wrapping row of tags — removable selection chips in a modal or filter body (CF-099's
   multi-successor picker). Promoted to globals for the same `modal-page` reason as .form-hint. */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

/* doc-list — the scrollable checkbox selection list used in modal bodies to pick documents or
   comment threads. Promoted to globals in CF-093: the catalog declares `modal-page` as
   `scoped_css_allowed: "none — compose from globals only"`, and these primitives were previously
   reachable only from SplitModal.razor.css (scoped CSS is per-component, so a second modal could
   not reuse them). SplitModal keeps its own scoped copies for now — Blazor's `[b-*]` attribute
   gives those higher specificity, so its rendering is unchanged; de-duplicating it onto these
   globals is a follow-up. */
.doc-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg-light);
    padding: var(--space-xs);
}

.doc-list__row {
    display: flex;
    align-items: flex-start;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.doc-list__row:hover {
    background: var(--glass-bg);
}

.doc-list-spinner {
    display: flex;
    justify-content: center;
    padding: var(--space-lg);
}

.doc-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Monospace run for case / document identifiers — App/docs/ui/design.md requires identifiers to
   render monospace. The class was referenced by SplitModal but defined nowhere, so those
   identifiers rendered in the body font; defining it globally fixes that everywhere at once. */
.mono {
    font-family: var(--font-mono);
}

/* predmet-result* / predmet-selected — the manual case-picker idiom used in modal bodies: a
   debounced search input, a result list, and a chip for the chosen case. Promoted to globals in
   CF-092 for the same reason CF-093 promoted .doc-list above: the catalog declares `modal-page` as
   `scoped_css_allowed: "none — compose from globals only"`, and these primitives were previously
   reachable only from MergeModal.razor.css (scoped CSS is per-component, so AddCaseLinkModal could
   not reuse them). MergeModal keeps its own scoped copies for now — Blazor's `[b-*]` attribute
   gives those higher specificity, so its rendering is unchanged; de-duplicating is a follow-up.
   The picker stays manual and user-driven by design: automatic relation suggestion would convert
   case linking into profiling under ZZPL čl. 4 st. 1 t. 5 (investigations/cf-092 §3, Rec. 5). */
.predmet-results {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
}

.predmet-result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.predmet-result:hover {
    background: var(--glass-bg);
}

.predmet-result__id {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 600;
}

.predmet-result__party {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* The chip carries an ACTIVE-SELECTION treatment, not a status one. MergeModal's scoped original
   used --color-success-subtle, but green is a status token everywhere else in the codebase (import
   row succeeded, classification matched); "you have picked this case" is not a result. .impeccable.md
   assigns active states to --color-primary. Corrected here rather than carried forward, because
   promotion makes this the idiom every future globals-only picker inherits. MergeModal still renders
   its scoped green copy — folding it onto this global is part of the de-duplication noted above. */
.predmet-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-primary-bg);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* panel-* — composable header / field / action idioms for forms and content laid out directly
   inside a .glass-card section panel (not a Modal). Mirrors the .form-modal__* visual contract
   but lives in panel context: no edge-to-edge negative margins, no modal footer chrome. Used by
   ActDispatchesPanel, LegalPhasePanel, UpravniSporSection (CF-041/CF-042). */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.panel-header__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

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

.panel-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* confirmation-modal pattern — used by Dismiss/Resume/Stop modals (destructive variant).
   Centered icon + message stack with edge-to-edge footer. */
.confirmation-modal {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.confirmation-modal__icon {
    font-size: 2rem;
    color: var(--color-error);
    text-align: center;
}

.confirmation-modal__message {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.confirmation-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin: var(--space-md) calc(var(--space-lg) * -1) calc(var(--space-lg) * -1);
    padding: var(--space-md) var(--space-lg);
    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;
    }

    .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%;
    }
}

/* I-019: 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);
}

/* Fork (pisarcheon): I-006 — intro row of a list rendered as a page tab (the 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-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);
}

/* Profile card — settings-section inside a tab of the settings-tabs-layout card (/profile, I-028). CF-104: promoted from
   Profile.razor.css — a plain selector there could not reach
   NotificationPreferencesCard's own markup (CSS isolation scopes a page's
   .razor.css to its own rendered elements, not a mounted child component's),
   so the child silently fell back to unstyled defaults. Global so every
   .profile-card, whether rendered by the page or a child component, matches. */
.profile-card {
    padding: 0;
}

.profile-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--glass-border);
}

/* ========================================
   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). */
.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-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
}

/* 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(--focus);
    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. */
button.stat-card--clickable {
    font: inherit;
    color: inherit;
    width: 100%;
    display: block;
    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 {
    text-align: left;
}

.stat-card--compact .stat-value {
    font-size: 1.5rem;
    /* 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 evidens): 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;
}

.stat-card--disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-size: 20px;
}

.stat-icon--blue {
    background: var(--color-tier-starter-bg);
    color: var(--color-tier-starter);
}

.stat-icon--cyan {
    background: var(--color-accent-cyan-bg);
    color: var(--color-accent-cyan);
}

.stat-icon--green {
    background: var(--ok-bg);
    color: var(--color-success);
}

.stat-icon--warning {
    background: var(--warn-bg);
    color: var(--color-warning);
}

.stat-icon--purple {
    background: var(--color-accent-purple-bg);
    color: var(--color-accent-purple-light);
}

.stat-icon--danger {
    background: var(--err-bg);
    color: var(--color-error);
}

.stat-icon--primary,
.stat-icon--orange {
    background: var(--pri-bg);
    color: var(--color-primary-light);
}

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

.stat-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

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

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

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
}

/* Underfilled grids (1-3 cards): cap card width so they don't stretch across the whole row,
   keeping them at a comfortable size with intentional whitespace on the right.
   Desktop only — the :has() selector outranks the responsive rules below (media queries add no
   specificity), so without this min-width guard the 280px cap leaks into tablet/mobile and the
   cards stop filling the available width. */
@media (min-width: 993px) {
    .dashboard-stat-grid:has(> .stat-card:only-child),
    .dashboard-stat-grid:has(> .stat-card:nth-child(2):nth-last-child(1)),
    .dashboard-stat-grid:has(> .stat-card:nth-child(3):nth-last-child(1)) {
        grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
        justify-content: start;
    }
}

/* 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) {
    .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 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@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-size: var(--font-size-section-title);
    font-weight: var(--font-weight-section-title);
    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);
}

/* I-034: long shortcut labels wrap inside their cell instead of running past the card padding */
.quick-actions--wrap > .ant-btn {
    min-width: 0;
    height: auto;
    min-height: 32px;
    white-space: normal;
    text-align: start;
}

/* --- 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(--pri);
    color: var(--on-pri);
    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(--pri-rgb), .15);
}

.pricing-tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--on-pri);
    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;
}

/* --- Subscription "current plan" card ---
   F-176: promoted from SubscriptionPlayground.razor.css. Pairs with the
   already-global .subscription-tag family in overrides.css:1015. */
.subscription-current-plan {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.subscription-current-plan__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.subscription-current-plan__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.subscription-current-plan__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin: var(--space-xs) 0 0 0;
}

.subscription-current-plan__renewal {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.subscription-current-plan__actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.subscription-current-plan__hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: var(--space-sm) 0 0 0;
}

@media (max-width: 768px) {
    .subscription-current-plan__actions {
        width: 100%;
    }
}

/* --- Status Result (v2 status face — I-049 TASK_03, prototype .state; TASK_28 verbatim, Part 60 statusFace) --- */
/* One face for /404, /403, /access-notice/{Reason}, the error boundary (ErrorPage) and the checkout results: the
   result is the panel (the prototype's .panel > .state in one element — same boxes, the 1px border then the padding);
   a 52px round icon tile toned by meaning — neutral (--panel-3, the default), warning, error, success, info; title
   .state__t 700 17px/1.3 display; description --text-2 at most 52ch, 14.5px; the actions (.state__act) 10px below.
   .status-result--page is the page face (.state--page: padding 72px 24px 68px, <= 640px 48px 18px 44px) on the content
   box's full width. */
.status-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 24px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
}

.status-result__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--panel-3);
    color: var(--text-2);
    font-size: 24px;
    line-height: 1;
}

.status-result--warning .status-result__icon {
    background: var(--warn-bg);
    color: var(--warn-ink);
}

.status-result--error .status-result__icon {
    background: var(--err-bg);
    color: var(--err-ink);
}

.status-result--success .status-result__icon {
    background: var(--ok-bg);
    color: var(--ok-ink);
}

.status-result--info .status-result__icon {
    background: var(--info-bg);
    color: var(--info-ink);
}

.status-result__title {
    margin: 0;
    font-family: var(--head);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.status-result__description {
    max-width: 52ch;
    margin: 0;
    font-size: 14.5px;
    color: var(--text-2);
}

.status-result__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

/* The error boundary replaces the whole router (no shell): the face centres in the viewport. */
.status-result-page--boundary {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.status-result-page--boundary > .page-container {
    width: 100%;
}

.status-result--page {
    padding: 72px 24px 68px;
}

@media (max-width: 640px) {
    .status-result--page {
        padding: 48px 18px 44px;
    }
}

/* --- Onboarding banner (CF-073 nudge + I-004 pending banner) ---
   Shared by OnboardingBanner and OnboardingPendingBanner, rendered above @Body in MainLayout.
   Glassmorphism + brand accent. */
.onboarding-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    animation: bannerSlideDown 0.3s ease-out;
    animation-fill-mode: both;
}

.onboarding-banner__icon {
    color: var(--color-primary);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.onboarding-banner__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-xs);
    min-width: 0;
}

.onboarding-banner__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.onboarding-banner__subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.onboarding-banner__progress {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.onboarding-banner__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

@keyframes bannerSlideDown {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Audit-log primitives — referenced by `audit-log-playground` catalog pattern --- */
.audit-log-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.audit-log-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}

.audit-log-row:hover {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-light);
}

.audit-log-row[data-selected="true"] {
    border-color: var(--color-primary);
    background: var(--glass-bg-light);
}

.audit-log-row[data-fresh="true"] {
    border-left: 3px solid var(--color-primary);
}

.audit-log-row__action {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: capitalize;
}

.audit-log-row__target {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-log-row__actor {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.audit-log-row__time {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    flex-shrink: 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 --- */
.upload-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    border: 1px dashed var(--glass-border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    transition: border-color 150ms ease, background 150ms ease;
    gap: var(--space-sm);
}

.upload-dropzone:hover,
.upload-dropzone:focus {
    border-color: var(--color-primary);
    background: var(--glass-bg-light);
    outline: none;
}

/* Drag-active state — apply via .upload-dropzone--dragging when @ondragenter fires.
   F-176: promoted from FileUploadPlayground.razor.css. */
.upload-dropzone--dragging {
    border-color: var(--color-primary);
    background: var(--glass-bg-light);
}

/* Tall column-oriented dropzone (multi-file / clipboard-paste variants). */
.upload-dropzone--column {
    min-height: 140px;
    flex-direction: column;
}

/* "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: var(--space-xs);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

.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;
}

.upload-file-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-top: var(--space-sm);
}

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

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

.upload-file-row__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    flex-shrink: 0;
}

.upload-file-row__body {
    flex: 1 1 auto;
    min-width: 0;
}

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

.upload-file-row__meta {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: var(--space-xs);
}

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

/* --- 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 --- */
/* The prototype's .state, verbatim: column, centred, gap 8px, padding 56px 24px; .state__ic a 52px --panel-3 round tile in
   --text-2 (6px under it); .state__t 700 17px/1.3 --head; .state__d --text-2 at most 52ch, 14.5px; the button 10px below.
   Before, the page variant drew a 96px icon and a 24px title — twice the prototype's face on every list's first use. */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    gap: 8px;
}

.empty-state__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-3);
    border-radius: 50%;
    margin-bottom: 6px;
    font-size: 24px;
    line-height: 1;
    color: var(--text-2);
}

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

/* Prototype .state__ic.tx-err */
.empty-state__icon--error {
    background: var(--err-bg);
    color: var(--err-ink);
}

.empty-state__title {
    font: 700 17px/1.3 var(--head);
    color: var(--text);
    margin: 0;
}

.empty-state__description {
    color: var(--text-2);
    max-width: 52ch;
    font-size: 14.5px;
    margin: 0;
}

.empty-state__cta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

/* Section variant — the same face inside a card or panel on a page that already has its heading, less air around it */
.empty-state--section {
    padding: 32px 16px;
}

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

/* The in-page not-found / forbidden faces (NotFoundState, ForbiddenState — I-049 TASK_03) wear the status face of
   .status-result inside their card: a 52px neutral tile, title 17/700 (the prototype's .state__t — I-056 TASK_07), description --text-2 at most 52ch. */
.empty-state.empty-state--status {
    gap: 8px;
    padding: 32px 8px;
}

.empty-state--status .empty-state__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    background: var(--panel-3);
    color: var(--text-2);
    font-size: 24px;
}

.empty-state--status .empty-state__title {
    font: 700 17px/1.3 var(--head);
    color: var(--text);
}

.empty-state--status .empty-state__description {
    max-width: 52ch;
    font-size: 14.5px;
    color: var(--text-2);
}

.empty-state--status .empty-state__cta {
    gap: 8px;
    margin-top: 10px;
}

/* --- Notification Feed --- */
.notification-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.notification-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-left: 3px solid transparent;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-fast);
}

.notification-card:hover {
    border-color: var(--glass-border-light);
}

.notification-card--unread {
    background: var(--glass-bg-light);
    border-left-color: var(--color-primary);
}

.notification-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notification-card__icon--info {
    background: var(--pri-bg);
    color: var(--color-primary);
}

.notification-card__icon--success {
    background: var(--ok-bg);
    color: var(--color-success);
}

.notification-card__icon--warning {
    background: var(--warn-bg);
    color: var(--color-warning);
}

.notification-card__icon--error {
    background: var(--err-bg);
    color: var(--color-error);
}

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

.notification-card__title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.notification-card__text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 4px 0;
}

.notification-card__time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .notification-card {
        padding: var(--space-md);
    }
}

/* --- Wizard Progress Rail --- */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-md);
}

.wizard-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.wizard-progress__bullet {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
}

/* I-049 TASK_02 (triage G2): the current bullet is a solid --pri fill with --on-pri ink — brand orange as text on its
   own tint measured 3.66:1 in light (--pri-ink on the tint is still only 4.11:1). */
.wizard-progress__step--current .wizard-progress__bullet {
    border-color: var(--pri);
    color: var(--on-pri);
    background: var(--pri);
    box-shadow: 0 0 0 4px var(--pri-bg);
}

.wizard-progress__step--complete .wizard-progress__bullet {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--on-pri);
}

.wizard-progress__label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* I-049 TASK_02 (triage G3): label text is --pri-ink (4.78:1 in light), never the fill token. */
.wizard-progress__step--current .wizard-progress__label {
    color: var(--pri-ink);
    font-weight: 600;
}

.wizard-progress__rail {
    flex: 1;
    height: 2px;
    background: var(--glass-border);
    margin: 0 var(--space-sm);
    margin-bottom: 1.5rem; /* align with bullet center */
}

.wizard-progress__rail--complete {
    background: var(--color-primary);
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: var(--space-md) 0;
    }

    .wizard-progress__label {
        display: none;
    }

    .wizard-actions .ant-btn {
        flex: 1;
    }
}

/* --- 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: var(--font-size-step-title);
    font-weight: var(--font-weight-step-title);
    color: var(--text-primary);
    margin: 0 0 var(--space-xs);
}

.wizard-step__hint {
    color: var(--text-muted);
    margin: 0 0 var(--space-lg);
}

/* Neutral spacing utility: a block that only needs the standard gap below it (no wrapper div). */
.mb-md {
    margin-bottom: var(--space-md);
}

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

.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;
}

.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;
}

/* --- Wizard multi-item step helpers (CF-057 batch-archival wizard).
   F-176: page-scoped CSS is disallowed for the archival pages, so the small
   layout primitives the batch wizard needs (a select-all toolbar and per-group
   blocks) are promoted here alongside the rest of the .wizard-* family. */
.wizard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.wizard-toolbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.wizard-toolbar__hint,
.wizard-row__reason {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.wizard-row__reason {
    margin-left: var(--space-xs);
}

.wizard-toolbar__count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.wizard-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.wizard-group__title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.wizard-group__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.wizard-group__quantity {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Per-group block inside a wizard step. A plain bordered container — NOT
   .filter-card, which carries its own glass blur + pageSlideUp and would
   double-blur inside the already-glassmorphic .glass-card wizard step. */
.wizard-step__group {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

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

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

/* --- AK entry detail helpers (CF-057 — ArhivskaKnjigaEntryDetailPage).
   F-176: no scoped CSS for these pages; page-scoped idioms promoted here
   next to the detail-page-grid family they compose with. */

/* Monospace display for AK entry numbers (R.br.). */
.ak-entry-number {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 600;
}

/* Monospace for classification codes and case identifiers inside detail rows. */
.ak-field-mono {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Horizontal button row below an inline-edit field (e.g. Save + Cancel). */
.field-actions-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* Read-mode value paired with an edit action link alongside it. */
.field-value-with-action {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

/* Stacks glass-cards vertically inside .detail-page-grid__main. */
.detail-page-grid__main-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* --- 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);
}

@media (max-width: 768px) {
    .client-header-bar {
        flex-wrap: wrap;
        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;
}

/* Muted one-line note directly under a .report-section-title — pulls up toward the title and keeps
   the section's content below it off the text (F-108: „личне податке нису приказане" hint). */
.heavy-data-section__hint {
    margin: calc(var(--space-sm) * -1) 0 var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.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);
}

.heavy-data-density--compact .ant-table-cell {
    padding: 4px 8px !important;
    font-size: 0.8125rem;
}

.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;
}

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

.calendar-cell--substitute {
    background: color-mix(in srgb, var(--color-tier-starter) 8%, transparent);
}

.calendar-cell--override {
    background: color-mix(in srgb, var(--color-accent-purple) 8%, transparent);
}

.calendar-cell--today {
    outline: 2px solid var(--color-primary);
}

.calendar-cell--past {
    opacity: 0.5;
}

/* ========================================
   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;
}

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

.deadline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.deadline-dot--low {
    background: var(--color-success);
}

.deadline-dot--med {
    background: var(--color-warning);
}

.deadline-dot--high {
    background: var(--color-primary);
}

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

.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-light);
    white-space: nowrap;
}

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

/* ========================================
   Report type selector (CF-053) — I-049 TASK_16: a labelled Select, the first control of the Извештаји toolbar
   (ReportTypeSelector); the v1 card grid (.report-type-grid / .report-type-card*) and the context bar are gone.
   ======================================== */

/* Report preview — period/overview totals row above a preview table. */
.report-preview-totals {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Background generation section — heading + download actions row. */
.report-section-title {
    margin: 0 0 var(--space-md) 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.report-generation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Saved configurations panel — header row (the panel heading + save action). I-049 TASK_16: the heading is
   .aside-panel__hd (its own gutter), the action sits on the panel's right gutter. */
.saved-config-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-right: 16px;
}

/* Saved configurations list — on the panel's body gutter. */
.saved-config-list {
    list-style: none;
    margin: 0;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.saved-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.saved-config-item:hover {
    border-color: var(--glass-border-light);
}

.saved-config-item__main {
    display: flex;
    flex-wrap: wrap; /* I-049 TASK_16: in the 320px aside the type tag drops under the name instead of squeezing it to nothing */
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--text-primary);
}

.saved-config-item__pin {
    color: var(--pri-ink);
}

.saved-config-item__name {
    flex: 1 1 8ch;
    min-width: 8ch;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-config-item__actions {
    display: flex;
    gap: var(--space-xs);
    flex: 0 0 auto;
}

/* ========================================
   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 badge | right record.
   Composition:
     .reconciliation-grid > .reconciliation-pair x N
       > .reconciliation-pair__side.reconciliation-pair__side--left
       + .reconciliation-match-badge[.reconciliation-match-badge--matched|--unmatched|--drop-target]
       + .reconciliation-pair__side.reconciliation-pair__side--right
   See `/design-system#reconciliation-playground-template`.
   ======================================== */

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

.reconciliation-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--space-md);
    align-items: stretch;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: border-color var(--transition-base);
}

.reconciliation-pair--matched {
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
    background: var(--ok-bg);
}

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

.reconciliation-pair__side {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--glass-bg-light);
    min-height: 56px;
}

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

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

.reconciliation-pair__side--empty {
    background: transparent;
    border: 1px dashed var(--glass-border);
    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.8125rem;
    color: var(--text-secondary);
}

.reconciliation-pair__amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.reconciliation-match-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    align-self: center;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg-light);
    color: var(--text-muted);
    font-size: 1rem;
    border: 1px solid var(--glass-border);
}

.reconciliation-match-badge--matched {
    background: var(--ok-bg);
    color: var(--color-success);
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

.reconciliation-match-badge--unmatched {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .reconciliation-pair {
        grid-template-columns: 1fr;
    }
    .reconciliation-match-badge {
        justify-self: center;
    }
}

/* ========================================
   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: 600;
    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. v2 entry card (I-049 TASK_04):
   left-aligned header, title 24/700 head font, lede --text-2,
   labelled 36px controls (global), 44px block primary,
   links on --pri-ink, server error Alert at the top of the form.
   ======================================== */

/* The entry card = the prototype's .panel.g-entry (#g-entry): --panel, 1px --border, radius 12, padding 26px 22px 24px
   (22px 16px 20px at <= 640px). */
.auth-form {
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px 22px 24px;
}

/* The prototype's .g-title / .g-lede (I-049 TASK_27, LP13): the title has no margin, the lede 8 above / 18 below and a
   60ch measure; the form follows the lede directly. */
.auth-form-header {
    text-align: start;
    margin-bottom: 0;
}

.auth-title {
    font: 700 26px/1.2 var(--head);
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-2);
    margin: 8px 0 18px;
    max-width: 60ch;
    font-weight: 400;
    line-height: 1.5;
}

/* OTP expiry line: plain muted text, not a brand-tinted chip (I-049 A1) */
.auth-code-expires {
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0.75rem 0 0 0;
    font-weight: 500;
}

/* Labels: 13.5/600 on --text-2 (the form-wide label rule is 14/500 on --text-secondary) */
.auth-form .ant-form-item-label > label {
    color: var(--text-2) !important;
    font-size: 13.5px;
    font-weight: 600;
}

/* Entry-card controls are 36px (prototype .ctl); AntD's default is 32px. Above 480 only: at <= 480 the global
   44px touch-target rule owns the height. */
@media (min-width: 481px) {
    .auth-form .ant-input,
    .auth-form .ant-input-affix-wrapper {
        min-height: 36px;
    }
}

/* Alerts (server error, dev code) sit above the fields */
.auth-form .ant-alert {
    margin-bottom: var(--space-md);
}

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

.auth-footer-links a {
    color: var(--pri-ink);
    text-decoration: none;
    margin-inline-start: 0.375rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-fast);
    position: relative;
}

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

.auth-footer-links a:hover {
    color: var(--pri-h);
}

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

/* The primary is the 44px block button of the entry card; the hover colour change is the single global rule
   (the decorative hover shine was motion that is not a state change and is gone). */
.auth-form .ant-btn-primary {
    height: 44px;
    font-size: 15.5px;
    border-radius: 10px;
}

/* OTP confirm pages: the resend action is a link button on --pri-ink (global .ant-btn-link), centred under the primary */
.auth-form .auth-resend {
    text-align: center;
}

@media (max-width: 640px) {
    .auth-form {
        padding: 22px 16px 20px;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* ========================================
   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;
}

.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;
}

/* --- 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;
}

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

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

/* B-061: a field error rendered under a filter control (e.g. the reports period picker). */
.filter-item > .form-error {
    margin-top: var(--space-xs);
}

/* B-061: the base flex-end would drop every sibling control to the error line's baseline; top-align
   the row while a field shows its error (desktop only — the 768px stack already stretches). */
@media (min-width: 769px) {
    .filter-row:has(> .filter-item > .form-error) {
        align-items: flex-start;
    }
}

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

/* I-035: wide enough for a RangePicker's two date inputs (and their «Од»/«До» placeholders) without ellipsis. */
.filter-item--date {
    flex: 1.5 1 240px;
    min-width: 240px;
}

/* I-035: a switch + label sized to its content, so it sits in one line with the filter actions. */
.filter-item--toggle {
    flex: 0 0 auto;
    min-width: 0;
}

/* I-035: pushes the Apply/Reset pair to the end of a row it shares with other items. */
.filter-actions--end {
    margin-left: auto;
}

.filter-row--toggles {
    margin-top: var(--space-md);
}

.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 — the prototype's .req, I-062 TASK_13)
   and the disabled-run hint beside the Run button. */
.filter-label--required::after {
    content: "*";
    margin-left: 2px;
    color: var(--err-ink);
}

.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;
}

/* I-049 TASK_14 (P1): an inactive node is --muted text (6.0:1 on the light surface), never opacity (2.5:1); the page
   adds an inactive tag, so the state is not carried by colour alone. */
.tree-node-title--dimmed {
    color: var(--muted);
}

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

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

/* --- Tree-diff annotation family — referenced by the `tree-diff` catalog pattern ---
   CF-099: renders a point-in-time structural comparison as ONE merged annotated tree.
   Each node title composes `.tree-diff-node` plus at most one status modifier; an
   unmodified node reads as unchanged. Status colour is contextual, never brand:
   added=success, removed=error, moved=warning, renamed=info. Both the node and the
   legend swatch read the same `--tree-diff-accent`, so legend and badges can never
   drift apart. */
.tree-diff-node {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.tree-diff-node--added,
.tree-diff-node--removed,
.tree-diff-node--moved,
.tree-diff-node--renamed {
    padding: 1px var(--space-sm);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--tree-diff-accent);
    background: var(--tree-diff-fill);
}

.tree-diff-node--added {
    --tree-diff-accent: var(--color-success-light);
    --tree-diff-fill: var(--color-success-bg);
}

.tree-diff-node--removed {
    --tree-diff-accent: var(--color-error-light);
    --tree-diff-fill: var(--color-error-bg);
    text-decoration: line-through;
    text-decoration-color: var(--color-error);
}

.tree-diff-node--moved {
    --tree-diff-accent: var(--color-warning-light);
    --tree-diff-fill: var(--color-warning-bg);
}

.tree-diff-node--renamed {
    --tree-diff-accent: var(--color-info-light);
    --tree-diff-fill: var(--color-info-bg);
}

/* Inline "where it came from" / "what it was called" detail. Never struck through,
   even inside a removed node — it carries the fact, not the removal. */
.tree-diff-node__detail {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
}

.tree-diff-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.tree-diff-legend-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Swatch colour comes from the same modifier vocabulary the nodes use. */
.tree-diff-legend-item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
    background: var(--tree-diff-accent, var(--text-muted));
}

.tree-diff-legend-item--added {
    --tree-diff-accent: var(--color-success-light);
}

.tree-diff-legend-item--removed {
    --tree-diff-accent: var(--color-error-light);
}

.tree-diff-legend-item--moved {
    --tree-diff-accent: var(--color-warning-light);
}

.tree-diff-legend-item--renamed {
    --tree-diff-accent: var(--color-info-light);
}

/* Epoch notice — "history only reaches back to X". Informational, NOT an error:
   muted glass strip, no semantic red/amber wash. */
.tree-diff-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tree-diff-note__icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .tree-diff-legend {
        gap: var(--space-sm);
    }
}

/* --- Form Field utility (non-submit reactive inputs) --- */
/* I-062 TASK_13: the prototype's .fi — the label 6px over its control (.fi__l margin-bottom) and the hint or error 6px
   under it (.fi__row margin-top), hence the 6px gap. */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--space-md);
}

/* 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 {
    margin-bottom: 0;
}

/* A field's label = the prototype's .fi__l: 500 13.5px / 1.3 in --text-2, sentence case. .form-label is the same label
   on the intake's fields (I-062 TASK_13: they were 12px uppercase copies in five scoped files). */
.form-field__label,
.form-label {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-2);
}

/* I-019: required-field marker for a .form-field label (the AntD FormItem draws its own). I-062 TASK_13: the prototype's
   .req — the „*“ 2px after the label in --err-ink. */
.form-field__label--required::after {
    content: "*";
    margin-left: 2px;
    color: var(--err-ink);
}

/* Inline hint text beneath a .form-field (validation/help messaging).
   F-176: promoted from InputsPlayground.razor.css. I-062 TASK_13: the prototype's .fi__hint, 12.5px / 1.4 --muted. */
.form-field__hint {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted);
}

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

.form-field__hint--error {
    color: var(--err-ink);
}

/* 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 */
.filter-card .ant-input-affix-wrapper {
    background: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
}

.filter-card .ant-input-affix-wrapper:hover {
    border-color: var(--glass-border-light) !important;
}

.filter-card .ant-input-affix-wrapper:focus-within {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

.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 {
    border-radius: var(--radius-md) !important;
    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 tag styling inside filter cards */
.filter-card .ant-select-selection-overflow-item .ant-select-selection-item {
    background: var(--pri-bg) !important;
    border-color: rgba(var(--pri-rgb), .3) !important;
    color: var(--color-primary) !important;
    border-radius: var(--radius-sm);
}

.filter-card .ant-select-selection-item-remove {
    color: var(--color-primary) !important;
}

/* --- Page Header Actions --- */
/* The prototype's .case-hd__act: one row of buttons that wraps inside itself (I-049 TASK_33: never wider than the header). */
.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    max-width: 100%;
}

/* --- Table Container --- */
/* I-049 TASK_22: a standalone table host is the prototype's .panel.tbl-wrap — var(--panel), 1px var(--border), radius
   12px, no backdrop, overflow hidden. */
.table-container {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: pageSlideUp 0.5s ease-out;
}

/* 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. */
.table-card--scroll-x {
    overflow-x: auto;
}

/* I-049 TASK_22 (PLAN LP7): a panel whose only content is a plain AntD table (detail / settings panels) is the flush
   .panel.tbl-wrap too — no inner padding, the table against the panel's inner box. DataTableFrame's own rule is in the
   data-table block. A scroll-x host keeps its horizontal scroll; the others clip to the radius (AntD's .ant-table-content
   scrolls inside, overrides.css). */
.glass-card:has(> .ant-table-wrapper:only-child),
.glass-card:has(> .table-container:only-child) {
    padding: 0;
}

.glass-card:not(.table-card--scroll-x):has(> .ant-table-wrapper:only-child),
.glass-card:not(.table-card--scroll-x):has(> .table-container:only-child) {
    overflow: hidden;
}

/* I-041 (D11): the five case-identifier tables pin a 290px identifier left beside a pinned actions column — up to
   530px, more than a phone-wide card holds, so the columns between them could never be scrolled into view. Their
   hosts opt in with .table-card--unpin-id-phone: below 768px the identifier column scrolls with the table and the
   actions column stays pinned. No other table carries the modifier, so no other table changes (PR !646 thread 9966).
   AntD pins with `position: sticky !important` (0,1,0) and an inline `left`; the modifier makes this (0,2,0).
   `relative`, never `static`: the cell keeps the positioning context a th/td has (thread 9965), and the 30px
   edge-shadow box of the pin goes with it instead of staying behind without its shadow. */
@media (max-width: 767.98px) {
    .table-card--unpin-id-phone .ant-table-cell-fix-left {
        position: relative !important;
        left: auto !important;
        z-index: auto;
    }

    .table-card--unpin-id-phone .ant-table-cell-fix-left-last::after {
        display: none;
    }
}

/* 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.
   Owner browser pass 2026-10-24: a heading breaks between words only (the prototype's .tbl th never splits one) —
   `break-word` cut a word a few pixels wider than its column („Годин / а“, „Озбиљнос / т“). `normal` lets such a word
   run into the cell's padding; a column too narrow for its longest heading word is a column-width bug. */
.table-card--scroll-x .ant-table-thead > tr > th {
    white-space: normal;
    overflow-wrap: normal;
}

/* 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;
}

/* ========================================
   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);
}

.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,
.glass-card > .ant-table-wrapper .ant-table {
    background: transparent !important;
}

.table-container .ant-table-thead > tr > th,
.glass-card > .ant-table-wrapper .ant-table-thead > tr > th {
    background: var(--th-bg) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border) !important;
    /* header type (F-264 D3) comes from the single .ant-table-thead > tr > th rule in overrides.css */
}

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

.table-container .ant-table-tbody > tr:hover > td,
.glass-card > .ant-table-wrapper .ant-table-tbody > tr:hover > td {
    background: var(--row-h) !important;
}

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

/* --- Pinned (Fixed) table cells: opaque in every host (I-029, B-054 run 8) ---
   Placed after the transparent `.glass-card > .ant-table-wrapper` / `.table-container` cell rules above so that
   it also wins ties on source order (the (0,3,2) rest and (0,4,2) hover forms of those rules).
   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-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 {
    background-color: var(--table-pinned-bg) !important;
    /* The prototype's .tbl .c-act: the opaque --sticky alone — it already is the panel over the page ground, so a
       --panel layer on top painted the frozen columns lighter than their row (dark rgb(28,31,37) against 21,23,28). */
    background-image: none !important;
}

/* F-263 (PR !625): a hovered or selected row lays its row colour over the pinned cell's --sticky base, so the band runs
   through the frozen columns and they stay opaque. Body cells only — the header keeps --th-bg.
   One class more than overrides.css's bare-table twins ((0,4,2) for tr.ant-table-row:hover, loaded later): (0,5,2) on
   hover; selected is (0,4,2) at rest and (0,5,2) hovered, placed after hover so a hovered selected row keeps --row-sel. */
.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,
.glass-card .ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-fix-left,
.glass-card .ant-table-tbody > tr.ant-table-row: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,
.table-container .ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-fix-left,
.table-container .ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-fix-right {
    background-color: var(--table-pinned-bg) !important;
    background-image: linear-gradient(var(--row-h), var(--row-h)) !important;
}

.glass-card .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-left,
.glass-card .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-right,
.glass-card .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-left,
.glass-card .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-right,
.table-container .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-left,
.table-container .ant-table-tbody > tr.ant-table-row-selected > td.ant-table-cell-fix-right,
.table-container .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-left,
.table-container .ant-table-tbody > tr.ant-table-row-selected:hover > td.ant-table-cell-fix-right {
    background-color: var(--table-pinned-bg) !important;
    background-image: linear-gradient(var(--row-sel), var(--row-sel)) !important;
}

.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-container .ant-table-thead > tr > th.ant-table-cell-fix-left,
.table-container .ant-table-thead > tr > th.ant-table-cell-fix-right {
    background-color: var(--table-pinned-bg) !important;
    background-image: linear-gradient(var(--th-bg), var(--th-bg)) !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(--skel) 25%, var(--skel-hi) 50%, var(--skel) 75%) !important;
    background-size: 400% 100% !important;
}

.skeleton-row .ant-skeleton-content .ant-skeleton-paragraph > li {
    background: linear-gradient(90deg, var(--skel) 25%, var(--skel-hi) 50%, var(--skel) 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);
}

.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 {
    background: var(--pri) !important;
    border-color: var(--pri) !important;
}

/* I-049 TASK_02 (triage G1): the active page is the table pager's solid fill (overrides.css .ant-pagination-item-active)
   — --pri behind --on-pri ink; the fill token as text on the glass item measured 4.34:1 in light. */
.pagination-container .ant-pagination-item-active a {
    color: var(--on-pri) !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;
}

/* I-049 TASK_24 (PLAN LP13): the retention note under a register is plain foot text, as the prototype's .tbl-foot
   (padding 12px 4px 0, --muted, 13px) — not a glass card of its own (it read as a second panel under the table). */
.retention-footer {
    padding: 12px 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.details-json {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin: 0;
    color: var(--text-primary);
}

/* --- 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);
}

/* Right-aligned tabular-numeric cell — money/quantity/% columns in tables.
   F-176: promoted from TablesPlayground.razor.css. */
.numeric-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.code-badge {
    background: var(--neu-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);
}

/* 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;
}

/* ========================================================================
   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;
    justify-content: center;
    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);
}

/* 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-light);
    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;
}

/* Same intrinsic-width mitigation for the app's other column-flex field wrappers that
   host a bare Switch/RadioGroup/etc. as a direct child (otherwise align-items: stretch
   blows them up to full field width). panel-field: legal-phase panels (UpravniSporSection);
   form-field: act-editor sections (ActAppealSection); wizard-step__field: security wizards
   (breach / DPIA). Mirrors .pg-field and .form-modal__field. */
.panel-field > .ant-switch,
.panel-field > .ant-radio-group,
.panel-field > .ant-checkbox-wrapper,
.panel-field > .ant-rate,
.panel-field > .ant-segmented,
.form-field > .ant-switch,
.form-field > .ant-radio-group,
.form-field > .ant-checkbox-wrapper,
.form-field > .ant-rate,
.form-field > .ant-segmented,
.wizard-step__field > .ant-switch,
.wizard-step__field > .ant-radio-group,
.wizard-step__field > .ant-checkbox-wrapper,
.wizard-step__field > .ant-rate,
.wizard-step__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);
}

/* 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-light);
}

/* 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;
}

/* --- 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;
    }

    /* The pre-I-008 unconditional rule, kept for a .filter-item outside a .filter-row (the Reports dashboard's
       .dashboard-filters): the reset below only reaches direct children of .filter-row */
    .filter-item {
        min-width: 100%;
    }

    /* 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 on /predmeti).
       The doubled class gains that specificity without requiring a .filter-card ancestor, so rows in a
       glass-card (SearchAnalytics, BatchArchivalWizard) 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 saved-search row or a button pair never pushes past the card's left edge */
    .filter-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    /* I-049 TASK_33 (LP13): the shared mobile stack of full-width header buttons (B-009 / B-028) is gone — the
       prototype's .page-hd keeps its actions on the title's row at every width (the header wraps them onto their own
       line only when they do not fit); the record header keeps .case-hd__act's own narrow rules. */

    /* 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;
    }

    /* `!important` is unavoidable: AntD writes the translate as an inline style, which only an important rule beats.
       Trade-off (B-055 #3534): AntD can no longer auto-scroll an off-screen ACTIVE tab into view (e.g. a deep link
       to the third tab) — the user scrolls the strip natively; the E2E AssertLastSettingsTabReachableAsync covers it. */
    .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;
    }

    /* B-028: one column on a phone, start-aligned (the desktop row is the base .page-hd's flex-end) — the record header
       only (the prototype's .case-hd column); a page head keeps its actions on the title's row (I-049 TASK_33, LP13). */
    .page-header--with-actions:is(.record-header, .predmet-header) {
        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 a button with its own scoped flex layout
   keeps it and only grows 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;
    }

    .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;
    }

    /* The simple pager (GlobalSearch, F-263 TASK_04 L2) pins prev/next and their links at 24px — one class deeper */
    .ant-pagination-simple .ant-pagination-prev.ant-pagination-prev,
    .ant-pagination-simple .ant-pagination-next.ant-pagination-next,
    .ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-simple .ant-pagination-next .ant-pagination-item-link {
        min-width: 44px;
        height: 44px;
        line-height: 42px;
    }

    .ant-table-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item,
    .ant-table-pagination.ant-pagination-mini .ant-pagination-prev.ant-pagination-prev,
    .ant-table-pagination.ant-pagination-mini .ant-pagination-next.ant-pagination-next,
    .ant-table-pagination.ant-pagination-mini .ant-pagination-jump-prev.ant-pagination-jump-prev,
    .ant-table-pagination.ant-pagination-mini .ant-pagination-jump-next.ant-pagination-jump-next,
    .ant-table-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link.ant-pagination-item-link,
    .ant-table-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 22px (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 (11px default, 14px small) takes back its own */
    .ant-switch.ant-switch {
        --touch-switch-border: 11px;
        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: 22px;
        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);
    }
}

/* Phone page title (F-264 D3; I-049 TASK_22: the prototype's <= 640px .page-title 24px) */
@media (max-width: 640px) {
    .page-title {
        font-size: var(--font-size-page-title-phone);
    }
}

/* === Global search (CF-047) — result rows, <mark> highlights, search bar ===
   Authoritative visual contract for the /search page (search-page archetype,
   TASK_08), its in-page search bar (the header entry is the command palette
   since I-040), and the ranked result rows. Showcased at /design-system#search-result-item-template,
   #global-search-bar-template, and #search-page-template. Compose from these
   global utilities — no per-page/per-component .razor.css (F-176). All colours
   come from brand tokens; the <mark> highlight is brand-coloured, never the
   browser default yellow. */

/* --- Search result row --- */
/* = the prototype's search hits (Part 60 .hits / .hit, I-049 TASK_28, LP13 verbatim): a ruled list flush in its panel
   (.search-results-panel: the panel without padding), each hit 14px 18px 15px (12px 14px 13px <= 640px), title
   600 15.5px/1.35 display, the meta line 13px --muted with a middle dot between plain items, the snippet 14px/1.5
   --text-2 clamped to two lines. */
.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.glass-card.search-results-panel {
    padding: 0;
}

.search-result {
    display: grid;
    gap: 5px;
    padding: 14px 18px 15px;
    border-top: 1px solid var(--line);
}

.search-results > .search-result:first-child,
.search-results-panel > .search-result:first-child {
    border-top: 0;
}

.search-result__title {
    justify-self: start;
    max-width: 100%;
    color: var(--text);
    font: 600 15.5px/1.35 var(--head);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.search-result__title:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* I-062 TASK_11: a case hit's title is its identifier — prototype .hit__t .cid { 14px; 500; white-space: normal }, the key
   parts at full ink and the fixed parts dimmed (the link does not recolour them, unlike `a .case-id`). */
.search-result__title .case-id {
    font-size: 14px;
    font-weight: 500;
    white-space: normal;
}

.search-result__title .case-id .case-id__k {
    color: var(--text);
}

/* CF-114 TASK_16: when the hit leads with its delovodni broj (case-number-dual), the 30-digit line is the secondary
   one — its key parts stay --text-2 (Спој .dvn .cid--sub .cid__k), not the full ink of a lone identifier title. */
.search-result__title .case-id--sub .case-id__k {
    color: var(--text-2);
}

.search-result__title .case-id .case-id__f {
    color: var(--muted);
}

/* Identifiers and dates in the meta line are the prototype's .mono (.92em, -.01em). */
.search-result__meta-item.mono {
    font-size: .92em;
    letter-spacing: -.01em;
}

.search-result__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 13px;
    color: var(--muted);
}

.search-result__meta-item + .search-result__meta-item::before {
    content: "\00b7";
    margin-right: 10px;
    color: var(--border-2);
}

.search-result__snippet {
    margin: 0;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Highlighted query terms (ts_headline <mark> output) — on the brand tint.
   Scoped under .search-result (global search page) AND .search-result__snippet
   (CF-048 list-page enrichment rows, which have no .search-result ancestor) to
   out-specify AntDesign's bare `mark` reset (ant-design-blazor.css loads after
   app.css; equal specificity would lose). */
.search-result mark,
.search-result__snippet mark {
    background: var(--color-primary-bg);
    /* I-049 TASK_03b: the hit is marked by the tint; its text is body text — --pri-ink on its own tint over a light
       card is 4.46:1 (contrast probe), and brand orange is never text on a panel (PLAN AD5). */
    color: var(--text);
    padding: 0 2px;
    border-radius: 3px;
}

/* Per-tab result count badge on the search-page tab strip. */
.search-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    margin-left: var(--space-xs);
    border-radius: var(--radius-xl);
    background: var(--glass-bg-light);
    color: var(--text-secondary);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}

/* --- CF-049 saved searches: the sidebar (F-176: globals only; /search lays it out in .home-grid since I-049 TASK_28) --- */

.saved-search-sidebar__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-right: 16px; /* I-049 TASK_16: the heading (.aside-panel__hd) carries the left gutter */
}

/* I-062 TASK_11: the prototype's .ap__hd--row a type — 600 12.5px/1. The prototype also underlines it at rest (with no hover
   change); the I-041 contract (rest != hover, app-css-link-scoping.test.js) keeps the underline for hover — owner question
   visual-17. */
.saved-search-sidebar__manage {
    font: 600 12.5px/1 var(--font);
    color: var(--pri-ink); /* I-049 TASK_16 (V3): brand orange is never link text on a panel */
}

/* I-041: a classed text link — the `a:hover` underline in overrides.css skips anchors that carry a class. */
.saved-search-sidebar__manage:hover {
    text-decoration: underline;
}

.saved-search-sidebar__title {
    flex: 1 1 auto; /* I-049 TASK_16: the type scale is .aside-panel__hd's */
}

.saved-search-group {
    margin-bottom: var(--space-lg);
}

.saved-search-group:last-child {
    margin-bottom: 0;
}

.saved-search-group__title {
    margin: 0 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--glass-border-light);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.saved-search-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
}

.saved-search-row:hover {
    background: var(--glass-bg-light);
}

.saved-search-row__name {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-search-row__actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex: 0 0 auto;
}

/* F-107: expiry countdown under a saved-search row — a .form-hint aligned with the row's padding. */
.saved-search-row__hint {
    padding: 0 var(--space-sm) var(--space-xs);
    font-size: 0.75rem;
}

.saved-search-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap; /* I-008 (D6): the button drops below the Select instead of overflowing the card */
    --saved-search-select-basis: 220px; /* one value for the flex-basis and the min-width floor below */
}

/* I-008 (D6): moved from the Select's inline style so the ≤768px rule can lift it. The 220px basis also
   beats AntD's inline `width: 100%` (a definite flex-basis wins over width), which would otherwise claim
   the whole line and wrap the button under the Select on desktop */
.saved-search-dropdown > .ant-select {
    flex: 1 1 var(--saved-search-select-basis);
    min-width: var(--saved-search-select-basis);
}

/* I-008 (D6): the saved-search Select takes its own line and the button sits below it, both inside the
   card. Declared after the base rules above (same specificity) — the main ≤768px block comes earlier in
   this file, so the desktop 220px floor would win there */
@media (max-width: 768px) {
    .saved-search-dropdown {
        width: 100%;
    }

    .saved-search-dropdown > .ant-select {
        flex: 1 1 100%;
        min-width: 0;
    }

    .saved-search-dropdown > .ant-btn {
        flex: 1 1 auto;
    }
}

/* --- Global search bar (header) --- */
.global-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 200px;
    max-width: 100%;
    padding: 0 var(--space-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: width var(--transition-base), border-color var(--transition-fast);
}

.global-search-bar:focus-within,
.global-search-bar--expanded {
    width: 400px;
    border-color: var(--color-primary);
}

.global-search-bar__icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.global-search-bar__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.25rem;
    padding: 0 var(--space-sm);
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.global-search-bar__input::placeholder {
    color: var(--text-muted);
}

/* Recent-searches dropdown — hidden until the bar is focused/expanded. */
.global-search-bar__dropdown {
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    padding: var(--space-xs);
    background: var(--color-bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.global-search-bar:focus-within .global-search-bar__dropdown,
.global-search-bar--expanded .global-search-bar__dropdown {
    display: flex;
}

.global-search-bar__dropdown-header {
    padding: var(--space-xs) var(--space-sm);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.global-search-bar__recent {
    margin: 0;
    padding: 0;
    list-style: none;
}

.global-search-bar__recent-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.global-search-bar__recent-item:hover {
    background: var(--glass-bg-light);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .global-search-bar,
    .global-search-bar:focus-within,
    .global-search-bar--expanded {
        width: 100%;
    }

}

@media (max-width: 640px) {
    .search-result {
        padding: 12px 14px 13px;
    }
}

/* ========================================
   CF-069 — Integration status cards grid
   Used inside .settings-section on /podesavanja/integracije.
   No scoped CSS; all selectors are feature-namespaced.
   ======================================== */
.integration-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

/* Tile inside the settings card: flat, separated by a hairline divider like .form-section — no box, no
   nested surface (design.md § Nested Surfaces). */
.integration-card {
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-border);
}

.integration-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.integration-card__name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.integration-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-xs);
}

.integration-card__timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.integration-card__unavailable-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: var(--space-xs) 0 0;
}

.integration-card--unavailable {
    opacity: 0.6;
}

.integration-cta {
    margin-top: var(--space-lg);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.integration-cta__contact {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .integration-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

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

/* ===== detail-drawer (F-108) ===== */
/* Read-only detail drawer — referenced by the `detail-drawer` catalog pattern.
   Statistics and context for one selected row: no form, no dirty-state guard, one close action.
   Composition: <Drawer Class="detail-drawer" Width="640"> with
   Title = .detail-drawer__header > .detail-drawer__title + .detail-drawer__subtitle,
   body  = .detail-drawer__body > .detail-drawer__stats (.detail-drawer__stat > __stat-value + __stat-label × N) + .detail-drawer__section × N
           (.detail-drawer__section-title + chart | .detail-drawer__kv) + .detail-drawer__note,
           or the standard .empty-state when there is no data,
           + .detail-drawer__footer > one default Button (always last). */
.detail-drawer__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

/* The type is the global drawer title's (overrides.css, I-062 TASK_12: the dialog's 700 18px/1.35) */
.detail-drawer__title {
    overflow-wrap: anywhere;
}

/* Body type under the title: the drawer title's Manrope is the title's alone */
.detail-drawer__subtitle {
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-muted);
}

.detail-drawer__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.detail-drawer__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-sm);
}

/* I-049 TASK_17: the figures are the drawer's own (the legacy .stat-card is retired) — a figure over its
   label on a --panel-2 tile; the grid gap owns spacing. */
.detail-drawer__stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    padding: var(--space-md);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.detail-drawer__stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    overflow-wrap: anywhere;
}

.detail-drawer__stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-2);
}

/* Suppressed value (e.g. „мање од 3") — reads as a qualifier, not a number. */
.detail-drawer__stat-value.detail-drawer__stat-value--muted {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5rem;
    color: var(--text-muted);
}

.detail-drawer__section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.detail-drawer__section-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.detail-drawer__kv {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.detail-drawer__kv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--glass-border);
}

.detail-drawer__kv-row:last-child {
    border-bottom: none;
}

.detail-drawer__kv-label {
    color: var(--text-secondary);
}

.detail-drawer__kv-value {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Muted informational line — not an Alert, never an error/brand colour. The compound
   selector outranks overrides.css `.ant-drawer-body p` (loaded later, also !important). */
.detail-drawer__note,
.ant-drawer-body .detail-drawer__note {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted) !important;
}

/* Last block of .detail-drawer__body (AntDesign 1.6 Drawer has no Footer slot). */
.detail-drawer__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .detail-drawer__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ≤480px: full viewport width — same rule shape as the EntityFormDrawer (overrides.css). */
@media (max-width: 480px) {
    .detail-drawer.ant-drawer-right .ant-drawer-content-wrapper,
    .detail-drawer .ant-drawer-content-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .detail-drawer__stats {
        grid-template-columns: 1fr;
    }
}

/* ── App shell v2 (I-039) ──────────────────────────────────────────────────────────────────────────────────────
   The signed-in chrome: dark sider (organ context, groups, badges, PisArcheon mark) and the 56px header.
   Showcased at /design-system#app-shell-template (catalog pattern `app-shell`). Class names are the prototype's
   (specs/F-263-DesignTokensTheming/reference/prototype.html), so its CSS ports 1:1. Tokens only — no literal
   colour, no [data-theme] selector, no italic.
   Split with overrides.css (PLAN D5/D15): a rule whose SUBJECT is a shell class lives here, also under an AntD state
   class (`.ant-layout-sider-collapsed .sd-org`); a rule whose subject is an AntD element (`.ant-menu-item`,
   `.ant-menu-item-group-title`, `.ant-segmented-item`, `.ant-dropdown-menu`, `.anticon`) lives in overrides.css,
   which loads after AntD's stylesheet. Where the element is also an AntD one (`.hdr` on <Header>), the doubled class
   outranks AntD's single-class rule — the `.ant-btn.ant-btn` idiom of the I-012 block above, no `!important`.
   The layout has no scoped CSS: its frame rules are below, the sider box, the content margins (256 / 68 / 0) and
   the scroll container in overrides.css. */

/* --- Frame --- */
.main-layout {
    height: 100vh;
    overflow: hidden;
    background: var(--gradient-bg);
}

/* The root takes focus only as the fallback while the overlay sider is open (tabindex=-1, never a Tab stop) */
.main-layout:focus {
    outline: none;
}

.content-wrapper {
    position: relative; /* For DevPathBadge positioning */
    flex: 1;
    display: flex;
    flex-direction: column;
    /* The skip link focuses it inside the scrolling .content-layout: the focus scroll stops below the sticky header
       instead of behind it (I-056 TASK_02) */
    scroll-margin-top: var(--shell-header-h);
}

/* Skip-link target only (tabindex=-1, never a Tab stop): no focus box around the whole content area (3565);
   real controls keep their :focus-visible rings */
.content-wrapper:focus {
    outline: none;
}

/* --- Sider: organ context --- */
.sd-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    min-height: 82px;
    padding: 16px 14px 14px 16px;
    border-bottom: 1px solid var(--sd-bd);
}

/* The logo is shown whole and padded: `contain`, never `cover`, never filtered (PLAN D3). --lb is the box size. */
.logo-box {
    --lb: 48px;
    display: grid;
    place-items: center;
    flex: none;
    width: var(--lb);
    height: var(--lb);
    border: 1px solid var(--lb-bd);
    border-radius: 10px;
    background: var(--lb-bg);
    color: var(--lb-ink);
    overflow: hidden;
}

.logo-box svg {
    display: block;
}

.logo-box__img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
}

.logo-box__mono {
    font-family: var(--head);
    font-size: calc(var(--lb) * .34);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--lb-ink);
}

/* The row is the home link: the logo box and the organ's name */
.sd-org-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    border-radius: 10px;
    text-decoration: none;
}

.sd-org-link:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* Neither a logo nor a monogram: a neutral glyph, never a placeholder letter */
.logo-box__glyph {
    display: grid;
    place-items: center;
    font-size: calc(var(--lb) * .42);
    line-height: 1;
    color: var(--lb-ink);
}

.sd-org {
    flex: 1;
    min-width: 0;
}

/* Loading: the box and two bars */
.logo-box--skel {
    border-color: transparent;
    background: var(--skel);
}

.sd-org--skel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sd-skel {
    width: 80%;
    height: 12px;
    border-radius: 4px;
    background: var(--skel);
}

.sd-skel--short {
    width: 52%;
    height: 10px;
}

.sd-org__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-family: var(--head);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--sd-strong);
}

.sd-org__sub {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--sd-muted);
}

/* Overlay close button: only below 1000px, where the sider is an overlay */
.sd-close {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sd-text);
    cursor: pointer;
}

.sd-close:hover {
    background: var(--sd-hover);
    color: var(--sd-strong);
}

.sd-close:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

/* --- Sider: group labels and badges --- */

/* F-264's .group-label, sider colour (the label sits in MenuItemGroup's title; its box is in overrides.css) */
.main-sider .group-label {
    color: var(--sd-muted);
}

/* The shell's own count badge (NavBadge). Neutral by default; --attn = new / unhandled, --err = overdue. */
.nb {
    display: inline-grid;
    place-items: center;
    flex: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--sd-n-bg);
    color: var(--sd-text);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* In an item's link the badge follows the label (the link is a flex row — overrides.css) */
.pisarcheon-menu .nb {
    margin-left: 8px;
}

.nb--attn {
    background: var(--attn);
    color: var(--on-attn);
}

.nb--err {
    background: var(--sd-err-bg);
    color: var(--sd-err-ink);
}

/* --- Sider: foot and the PisArcheon mark --- */
.sd-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 12px 20px 14px;
    border-top: 1px solid var(--sd-bd);
    color: var(--sd-muted);
    font-family: var(--head);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .01em;
}

.sd-foot svg {
    flex: none;
    opacity: .8;
}

.pmark {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--head);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
}

.pmark svg {
    flex: none;
}

.sd-foot .pmark {
    color: inherit;
}

/* --- PisArcheon wordmark (PisArcheonLogo, F-263 L1): the letters follow the theme, the glyph the brand colour.
   Its size belongs to the consumer (AuthLayout's .auth-logo-img) --- */
.pa-logo {
    display: block;
    flex: none;
    color: var(--text);
}

.pa-logo__accent {
    color: var(--pri);
}

/* --- Sider: collapsed (68px — the width itself is the Sider's CollapsedWidth) --- */
.ant-layout-sider-collapsed .sd-top {
    justify-content: center;
    padding: 16px 0 14px;
}

.ant-layout-sider-collapsed .sd-org-link {
    flex: none;
}

.ant-layout-sider-collapsed .logo-box {
    --lb: 40px;
}

.ant-layout-sider-collapsed .sd-org,
.ant-layout-sider-collapsed .pmark > span {
    display: none;
}

.ant-layout-sider-collapsed .sd-foot {
    justify-content: center;
    padding: 12px 0 14px;
}

/* Badges become 8px dots on the item's corner: attention and error only, a neutral count says nothing as a dot */
.ant-layout-sider-collapsed .nb {
    position: absolute;
    top: 6px;
    right: 9px;
    width: 8px;
    min-width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
}

.ant-layout-sider-collapsed .nb:not(.nb--attn):not(.nb--err) {
    display: none;
}

.ant-layout-sider-collapsed .nb--err {
    background: var(--sd-err-ink);
}

/* --- Overlay (below 1000px; the off-canvas rule is in the breakpoints below) --- */
.shell-scrim {
    position: absolute;
    inset: 0;
    background: var(--scrim);
    animation: fadeIn .18s ease-out;
}

/* In the layout the scrim covers the viewport: over the header, under the sider (z-index 200, overrides.css).
   A click on it closes the overlay (MainLayout) — whatever the sider's width below is. */
.main-layout > .shell-scrim {
    position: fixed;
    z-index: 150;
}

/* The Sider's width is an inline style, so !important is required (as the sider rules in overrides.css) */
.main-sider.is-open {
    flex: 0 0 284px !important;
    width: 284px !important;
    min-width: 284px !important;
    max-width: 284px !important;
    box-shadow: var(--shadow);
}

/* --- Header --- */

/* Sticky at the top of the scrolling content column (.content-layout = the prototype's .main, which holds the header
   and the content box), so the page scrolls under the header's blur (I-056 TASK_02, the prototype's .hdr { position:
   sticky; top: 0 }). Doubled class: <Header> is also .ant-layout-header (64px height and line-height, 0 50px
   padding, its own background), loaded after this file. */
.hdr.hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    height: var(--shell-header-h);
    padding: 0 20px 0 12px;
    line-height: var(--font-line-body);
    background: var(--hdr-bg);
    border-bottom: 1px solid var(--line);
    color: var(--text);
    /* Above the page that scrolls under it, so neither the page nor the bell's dropdown is painted over it. B-009:
       99, not the prototype's 20 — the bell panel must paint above the page's own layers (sticky parts 1–7) */
    position: sticky;
    top: 0;
    z-index: 99;
}

/* The prototype's header blur (.hdr: saturate(1.3) blur(14px)) — the page scrolls under it — on a layer of its own (F-266 TASK_03 F3, restored by
   TASK_07 — PR !735 thread 11683): a backdrop-filter on the header itself makes it the containing block of every
   position: fixed descendant, so the bell's full-viewport click-away backdrop shrank to the 56px header strip. */
.hdr.hdr::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
}

.hdr__r {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    margin-left: auto;
}

/* CF-111 — the „Нови поднесак“ split button (prototype .tc-split): the primary and its joined chevron, no gap, the inner
   corners square, the chevron set off by an inset divider in the primary-hover tone. AntD's Dropdown wraps the chevron
   in its trigger wrapper, which stretches with the pair. The joined halves do not lift on hover (the primary's
   translateY would split them); !important answers the global .ant-btn radius and overrides.css's primary recipe. */
.hdr__split {
    display: inline-flex;
    align-items: stretch;
    flex: none;
    margin-right: 6px;
}

/* AntD 1.6.0 writes `display: inline-block` inline on the trigger wrapper (its InlineFlexMode is not honoured by
   Dropdown): only !important makes it the flex box that stretches the chevron to the primary's height */
.hdr__split > .antblazor-overlay-trigger-wrapper {
    display: flex !important;
}

.hdr__split .ant-btn.hdr__new {
    margin-right: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.hdr__split .ant-btn.hdr__new-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 0;
    height: auto;
    padding: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.hdr__split .ant-btn.hdr__new-more,
.hdr__split .ant-btn.hdr__new-more:is(:hover, :focus-visible, :active) {
    box-shadow: inset 1px 0 0 var(--pri-h), 0 4px 14px rgba(var(--pri-rgb), .35) !important;
}

.hdr__split .ant-btn:is(.hdr__new, .hdr__new-more):is(:hover, :focus-visible, :active) {
    transform: none;
}

/* The split menu's panel (the global dropdown-menu recipe, 300px wide — prototype .tc-newmenu) */
.hdr-new-menu .ant-dropdown-menu {
    width: 300px;
    max-width: calc(100vw - 32px);
}

/* F-266: ThemeToggleButton holds the prototype's inline <svg class="ic"> moon / sun, not an AntD icon — centre it
   as the prototype's .btn--icon does. AntD wraps the children in a <span>, where an inline svg would sit on the text
   baseline. Two classes: AntD's stylesheet loads after app.css and its .ant-btn sets display: inline-block. The case
   header's icon-only „⋯“ (CaseActionButtons, F-266 TASK_07) is the same kind of button. */
.ant-btn.theme-toggle-btn,
.ant-btn.case-action-buttons__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn .ic,
.case-action-buttons__more .ic {
    display: block;
}

/* Bell: the unread dot sits on the icon's top-right corner. Placed from the centre, so it stays on the icon
   whatever the button's size (6px / 7px from the corner of a 34px button, the prototype's values). */
.bell {
    position: relative;
}

.bell__dot {
    position: absolute;
    top: calc(50% - 11px);
    left: calc(50% + 2px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--attn);
    box-shadow: 0 0 0 2px var(--bg);
    pointer-events: none;
}

/* User chip — the trigger of the user menu */
.uchip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    height: 40px;
    margin-left: 4px;
    padding: 0 8px 0 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
}

.uchip:hover {
    background: var(--panel-3);
}

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

.uchip__av {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel-3);
    color: var(--text);
    font-family: var(--head);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.uchip__t {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.uchip__t b {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.uchip__t small {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

/* User menu — the dropdown's overlay class. It is the panel (it also holds the name/role header), so the AntD
   menu inside it is flattened in overrides.css; the item colours are the global dropdown-menu recipe. */
.user-menu {
    width: 248px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--float);
    box-shadow: var(--shadow);
}

/* .menu__hd: the name and role at the page's 15px/1.5 (the prototype's head sets no size of its own) */
.user-menu__hd {
    margin-bottom: 6px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.user-menu__hd b {
    display: block;
    font-weight: 600;
}

.user-menu__hd span {
    color: var(--muted);
    font-size: 13px;
}

/* Menu rows — a link, or the Одјава button (a real button, so it is a Tab stop): icon and label on one line, in
   the row's colour rather than the link colour. ::after makes the whole row the click target, as AntD does for a
   row's own link. */
.user-menu a,
.user-menu__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
}

.user-menu a:hover,
.user-menu a:active {
    color: inherit;
}

.user-menu__btn {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.user-menu__btn::after,
.user-menu a.status-indicator::after {
    position: absolute;
    inset: 0;
    content: "";
}

.user-menu a:focus-visible,
.user-menu__btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Статус (StatusIndicator) as a menu row: the row gives the padding and the hover, the dot sits in the icon column
   and the label always shows (its own scoped CSS hides it at <=768px for the old header slot). `a.` outweighs the
   scoped rules, which load later. */
.user-menu a.status-indicator {
    gap: 10px;
    padding: 0;
    background: transparent;
}

.user-menu a.status-indicator .status-dot {
    margin: 0 3px;
}

.user-menu a.status-indicator .status-text {
    display: inline;
    color: inherit;
    font-size: inherit;
}

/* --- Breakpoints --- */
@media (max-width: 1240px) {
    .uchip__t {
        display: none;
    }
}

@media (max-width: 999.98px) {
    .sd-close {
        display: inline-flex;
    }

    /* The layout's sider (its direct child — not a /design-system demo) is off-canvas until opened, and hidden,
       so its links leave the tab order and the accessibility tree. What moves, and when it turns hidden, is the
       sider's transition in overrides.css. MainLayout.IsOverlay mirrors this breakpoint. */
    .layout-container > .main-sider:not(.is-open) {
        transform: translateX(-102%);
        visibility: hidden;
    }
}

@media (max-width: 640px) {
    .hdr.hdr {
        gap: 4px;
        padding: 0 12px 0 8px;
    }

    .hdr__r {
        gap: 2px;
    }

    /* „Нови поднесак“ is icon-only (its aria-label carries the name); the split pair keeps a narrower chevron */
    .hdr .hdr__split {
        margin-right: 2px;
    }

    .hdr .hdr__new {
        padding: 0;
    }

    .hdr .hdr__split .ant-btn.hdr__new-more {
        width: 26px;
    }

    .hdr .hdr__new > span:not(.anticon) {
        display: none;
    }
}

/* The 34px icon button is a size for widths above 480px only: at <=480px the I-012 touch-target block lifts every
   AntD button to 44px, and the L2 probe measures the header on every App page — never set a height under 44px on
   an AntD control there. */
@media (min-width: 480.02px) and (max-width: 640px) {
    .hdr .hdr__new {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .hdr .hdr__new {
        width: 44px;
    }

    /* CF-111: the split chevron is a standalone control too — square 44px, not the 26px of 481–640px */
    .hdr .hdr__split .ant-btn.hdr__new-more {
        width: 44px;
    }

    /* The shell's own buttons follow the same 44px rule (56px header) */
    .uchip {
        height: 44px;
    }

    .bell {
        min-height: 44px;
    }

    .sd-close {
        width: 44px;
        height: 44px;
    }
}

/* Motion is for state changes only (the scrim's fade-in here; the sider's width and slide in overrides.css) */
@media (prefers-reduced-motion: reduce) {
    .shell-scrim {
        animation: none;
    }
}

/* ===== Composite patterns v2 (I-043) — tokens only, no scoped CSS (PLAN AD1–AD3) ===== */
/* The ten composite patterns of App/Components/Patterns/. Every top-sticky part clears the sticky shell header at the
   top of the scroll container (.content-layout; I-056 TASK_02): the prototype's literal offset (.qgh / .ik-anchor 56,
   .ik-docs 72, .st-tabs 76) or --shell-header-h plus its gap; inside a showcase demo frame (a scroll box of its own, no
   header) the frame rule at the end of this block puts them back at the frame's top; local z-index stays 1–5; a hover / focus rule sits
   under the pattern's root class. Already global and not declared again: the AntD table, Segmented, modal panel,
   skeleton shimmer (skeletonShimmer, overrides.css), .attn-dot / .attn-badge, .tone-tag--*, .tabular-nums. */

/* --- pattern-state --- */
/* The wrapper of a pattern's error face (PatternErrorState); the face itself is EmptyState's. */
.pattern-state {
    display: block;
    width: 100%;
}

/* The one skeleton bar every pattern's loading face reuses — the global shimmer, still under reduced motion. */
.pattern-skel {
    display: block;
    height: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--skel) 25%, var(--skel-hi) 50%, var(--skel) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .pattern-skel {
        animation: none;
        background: var(--skel);
    }
}

/* --- page skeletons (I-049 TASK_03, PLAN AD3) --- */
/* The first-load faces of a list, a detail and a form page (ListPageSkeleton, DetailPageSkeleton,
   FormPageSkeleton): shaped like the v2 layouts (cases-loading / case-loading / intake-loading). Every bar is the
   shared .pattern-skel (shimmer on --skel / --skel-hi, still under reduced motion); the rules below size it and lay
   the molecules out. The roots announce themselves (role="group" + aria-busy + aria-label). */
/* Shape sizes shared by the three molecules */
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-full { width: 100%; }
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-3-4 { width: 75%; }
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-2-3 { width: 66%; }
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-1-2 { width: 50%; }
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-1-3 { width: 33%; }
:is(.list-page-skeleton, .detail-page-skeleton, .form-page-skeleton) .page-skeleton__w-1-4 { width: 25%; }

.list-page-skeleton__shape--sub,
.detail-page-skeleton__shape--sub,
.form-page-skeleton__shape--sub {
    height: 9px;
}

.list-page-skeleton__shape--control,
.form-page-skeleton__shape--control {
    height: 34px;
    border-radius: var(--radius-sm);
}

.list-page-skeleton__shape--tag,
.detail-page-skeleton__shape--tag {
    width: 72px;
    height: 22px;
    border-radius: 11px;
}

.list-page-skeleton__shape--button,
.detail-page-skeleton__shape--button,
.form-page-skeleton__shape--button {
    width: 96px;
    height: 34px;
    border-radius: var(--radius-sm);
}

.detail-page-skeleton__shape--dot,
.form-page-skeleton__shape--dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.list-page-skeleton__spacer,
.form-page-skeleton__spacer {
    flex: 1;
}

/* list: the table's toolbar strip, the column header, RowCount ruled rows, the footer (rows fill the panel) */
.list-page-skeleton {
    width: 100%;
}

.list-page-skeleton__toolbar,
.list-page-skeleton__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
}

.list-page-skeleton__toolbar {
    border-bottom: 1px solid var(--line);
}

.list-page-skeleton__toolbar .list-page-skeleton__shape--control {
    width: 160px;
}

.list-page-skeleton__toolbar .list-page-skeleton__shape--control:first-child {
    width: 240px;
}

.list-page-skeleton__head,
.list-page-skeleton__row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 96px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 24px;
    padding: 0 16px;
}

.list-page-skeleton__head {
    height: 42px;
    background: var(--th-bg);
    border-bottom: 1px solid var(--border);
}

.list-page-skeleton__head .pattern-skel {
    width: 56%;
    height: 10px;
}

.list-page-skeleton__row {
    min-height: 54px;
    border-bottom: 1px solid var(--line);
}

.list-page-skeleton__lines {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.list-page-skeleton__footer .pattern-skel {
    width: 120px;
}

.list-page-skeleton__footer .list-page-skeleton__shape--button {
    width: 180px;
    height: 28px;
}

/* Phone (the data table's card breakpoint): each row a card of two text lines and a tag */
@media (max-width: 640px) {
    .list-page-skeleton__head,
    .list-page-skeleton__cell--wide {
        display: none;
    }

    .list-page-skeleton__row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px 16px;
    }

    .list-page-skeleton__toolbar .list-page-skeleton__shape--control,
    .list-page-skeleton__toolbar .list-page-skeleton__shape--control:first-child {
        width: 100%;
    }
}

/* detail: crumb, identifier, title + actions, tag row, lifecycle strip, main (tabs + Descriptions) and aside cards */
.detail-page-skeleton {
    display: grid;
    gap: 14px;
    width: 100%;
}

.detail-page-skeleton__crumb {
    width: 140px;
    height: 10px;
}

.detail-page-skeleton__identifier {
    width: 260px;
    max-width: 60%;
}

.detail-page-skeleton__titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-page-skeleton__titlebar > .pattern-skel:first-child {
    width: 46%;
    height: 28px;
    margin-right: auto;
}

.detail-page-skeleton__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-page-skeleton__tags .detail-page-skeleton__shape--tag:nth-child(2) {
    width: 120px;
}

.detail-page-skeleton__tags .detail-page-skeleton__shape--tag:nth-child(3) {
    width: 140px;
}

.detail-page-skeleton__panel,
.form-page-skeleton__panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.detail-page-skeleton__lifecycle {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    padding: 18px 20px;
    margin-top: 6px;
}

.detail-page-skeleton__step {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.detail-page-skeleton__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 24px;
    margin-top: 10px;
}

.detail-page-skeleton__main,
.detail-page-skeleton__aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.detail-page-skeleton__tabs {
    display: flex;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-page-skeleton__tabs .pattern-skel {
    width: 64px;
}

.detail-page-skeleton__section-label {
    width: 120px;
    height: 10px;
}

.detail-page-skeleton__descriptions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    padding: 18px 16px;
}

.detail-page-skeleton__pair,
.detail-page-skeleton__card {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.detail-page-skeleton__card {
    gap: 12px;
    padding: 16px;
}

.detail-page-skeleton__shape--figure {
    width: 55%;
    height: 18px;
}

.detail-page-skeleton__shape--rule {
    height: 4px;
}

@media (max-width: 999.98px) {
    .detail-page-skeleton__body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .detail-page-skeleton__lifecycle {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-page-skeleton__descriptions {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* form: section strip, sections of label / control pairs in a panel, the sticky action bar */
.form-page-skeleton {
    display: grid;
    gap: 16px;
    width: 100%;
}

.form-page-skeleton__strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
}

.form-page-skeleton__step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-page-skeleton__step .pattern-skel:last-child {
    width: 80px;
}

.form-page-skeleton__section {
    display: grid;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.form-page-skeleton__section:last-child {
    border-bottom: 0;
}

.form-page-skeleton__section-title {
    width: 22%;
    height: 14px;
}

.form-page-skeleton__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.form-page-skeleton__field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.form-page-skeleton__shape--label {
    width: 42%;
    height: 10px;
}

.form-page-skeleton__bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.form-page-skeleton__bar > .pattern-skel:first-child {
    width: 26%;
}

.form-page-skeleton__bar > .form-page-skeleton__shape--button:last-child {
    width: 140px;
}

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

    .form-page-skeleton__section {
        padding: 18px 16px;
    }
}

/* --- figures-tabs --- */
/* The tab bar of a list page: a label over a 26px figure per tab (prototype .figs / .fig). */
.figures-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 14px;
}

.figures-tabs::-webkit-scrollbar {
    display: none;
}

.figures-tabs__tab {
    position: relative;
    flex: 0 0 auto;
    min-width: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px 18px 12px 14px;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: none;
    color: var(--text-2);
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.figures-tabs__tab:first-child {
    padding-left: 4px;
}

/* Hairline separator between tabs */
.figures-tabs__tab + .figures-tabs__tab::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: var(--line);
}

.figures-tabs .figures-tabs__tab:hover {
    background: var(--row-h);
}

.figures-tabs .figures-tabs__tab:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.figures-tabs__label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font);
    font-size: 0.78125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.figures-tabs__count {
    font-family: var(--head);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--text);
}

/* Teal only for a count that waits for the user */
.figures-tabs__tab--attn .figures-tabs__count {
    color: var(--attn-ink);
}

.figures-tabs__tab[aria-selected="true"] {
    color: var(--text);
}

/* The selected tab: 2px --pri underline over the row's bottom border */
.figures-tabs__tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 18px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--pri);
}

.figures-tabs__tab:first-child[aria-selected="true"]::after {
    left: 4px;
}

/* Loading: skeleton tabs of the same size */
.figures-tabs__tab--skeleton {
    cursor: default;
    gap: 9px;
}

.figures-tabs__skel-label {
    width: 72px;
    height: 12px;
}

.figures-tabs__skel-count {
    width: 34px;
    height: 24px;
}

@media (max-width: 640px) {
    .figures-tabs__tab {
        min-width: 72px;
        padding: 8px 14px 10px 10px;
    }

    .figures-tabs__count {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .figures-tabs__tab {
        min-height: 44px;
    }
}

/* --- saved-views --- */
/* Saved views with counts (prototype .seg / .seg__n). AntD 1.6.0's Segmented does not move its selection with the
   arrow keys (R1, TASK_02), so SavedViewSwitch is a native role="radiogroup" of role="radio" buttons drawn with the
   global Segmented's tokens: track --seg-bg, selected item --seg-on + --seg-shadow. */
.saved-views {
    display: inline-flex;
    flex: none;
    max-width: 100%;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--seg-bg);
}

.saved-views__item {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    font: 500 13px/1 var(--font);
    white-space: nowrap;
    cursor: pointer;
}

.saved-views--sm .saved-views__item {
    height: 26px;
    padding: 0 9px;
    font-size: 12.5px;
}

/* A form's segmented choice (prototype .segr, I-062 TASK_07 — /submissions/new's channel, party and classification):
   30px items of 13.5px text; a long choice wraps inside its container instead of running past it. */
.saved-views--lg {
    flex-wrap: wrap;
}

.saved-views--lg .saved-views__item {
    height: 30px;
    padding: 0 14px;
    font-size: 13.5px;
}

/* A view's icon (prototype .segr span .ic): 15px, 7px before the label, muted — the selected view's in --text. */
.saved-views__icon {
    display: inline-flex;
    margin-right: 7px;
    font-size: 15px;
    color: var(--muted);
}

.saved-views__item[aria-checked="true"] .saved-views__icon {
    color: var(--text);
}

.saved-views .saved-views__item:hover {
    color: var(--text);
}

.saved-views .saved-views__item:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.saved-views__item[aria-checked="true"] {
    background: var(--seg-on);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--seg-shadow);
}

.saved-views__count {
    margin-left: 7px;
    font-weight: 600;
    color: var(--muted);
}

.saved-views__item[aria-checked="true"] .saved-views__count {
    color: var(--text-2);
}

/* A view switch whose list is still loading (prototype .seg > button:disabled — I-056 TASK_07: the counted read views);
   aria-disabled, so the focused view keeps the focus (TASK_13, review L6). */
.saved-views .saved-views__item[aria-disabled="true"] {
    cursor: default;
    opacity: .6;
}

@media (max-width: 480px) {
    .saved-views__item {
        min-height: 44px;
    }
}

/* --- filter-chips --- */
/* The active filters as removable chips (prototype .chips / .fchip / .fchip__k), then a text button. */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: -4px 0 14px;
}

.filter-chips__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px 0 11px;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: var(--panel-2);
    color: var(--text);
    font: 500 13px/1 var(--font);
    cursor: pointer;
}

.filter-chips .filter-chips__chip:hover {
    border-color: var(--ctl-bd-h);
}

.filter-chips .filter-chips__chip:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.filter-chips__key,
.filter-chips__icon {
    color: var(--muted);
}

.filter-chips__icon {
    display: inline-flex;
    font-size: 12px;
}

@media (max-width: 480px) {
    .filter-chips__chip {
        height: auto;
        min-height: 44px;
    }
}

/* --- bulk-bar --- */
/* The selection bar above a list (prototype .bulk / .bulk__n); slides in once when it appears. */
@keyframes bulkBarIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 10px 8px 16px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--panel-3);
    color: var(--text);
    animation: bulkBarIn 0.16s ease-out;
}

.bulk-bar__count {
    margin-right: 6px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bulk-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bulk-bar__spacer {
    flex: 1 1 auto;
}

/* I-049 TASK_24 (PLAN LP13 c): the bar's buttons are the prototype's .btn--sm — height 28px, padding 0 11px, 13px,
   radius 7px, gap 6px (AntD's default 32px button made the bar 50px instead of 46). */
.bulk-bar .ant-btn {
    height: 28px;
    padding: 0 11px;
    border-radius: 7px;
    font-size: 13px;
    gap: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .bulk-bar {
        animation: none;
    }
}

/* --- data-table-toolbar --- */
/* The row above a list (prototype .toolbar / .search / .sel): views, search 220–300px, filters 128–158px each (the
   filters fragment's controls are the flex items, its labels are not), extra actions pushed right. The page owns the labels. */
.data-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.data-table-toolbar__views {
    display: flex;
    flex: none;
    flex-wrap: wrap; /* I-056 TASK_09: the section's own views drop under the hub's switch when the row is too narrow (1000) */
    gap: 8px; /* TASK_24: a hub's section switch before a section's own views (/archival Рокови чувања) */
    max-width: 100%;
    min-width: 0;
}

.data-table-toolbar__search {
    flex: 1 1 220px;
    max-width: 300px;
    min-width: 0;
}

.data-table-toolbar__filters {
    display: contents;
}

.data-table-toolbar__filters > :not(label) {
    flex: 0 1 158px;
    min-width: 128px;
}

/* I-045: a date range holds two dates — 158px cuts them off. The item is the picker or the group wrapping it. 300px fits
   both Cyrillic placeholders („Почетни датум“ / „Крајњи датум“), which 240px cut to „Почетни …“. */
.data-table-toolbar__filters > .ant-picker-range,
.data-table-toolbar__filters > :has(> .ant-picker-range) {
    flex-basis: 300px;
}

/* A single date picker fits its placeholder („Изаберите датум“, cut to „Изаберите дат…“ at 158px) and its icon. */
.data-table-toolbar__filters > .ant-picker:not(.ant-picker-range) {
    flex-basis: 176px;
}

.data-table-toolbar__extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* I-062 TASK_10: /search's query is the prototype's .toolbar .search--wide (flex 1 1 360px, max 560px) with
   „Сачувај претрагу“ right beside it, not pushed to the row's end. */
[data-pattern="search-page"] .data-table-toolbar__search {
    flex: 1 1 360px;
    max-width: 560px;
}

[data-pattern="search-page"] .data-table-toolbar__extra {
    margin-left: 0;
}

/* I-049 TASK_24 (PLAN LP13 c): the toolbar's AntD controls drawn as the prototype's .ctl — height 36px, padding 0 12px,
   radius 8px, 1px --ctl-bd on --ctl-bg, 400 14.5px/1.3 var(--font), placeholder --muted, hover --ctl-bd-h, focus --focus +
   0 0 0 3px --pri-bg — and its search as .search (the 16px icon at left 11px inside the field, the input padding-left
   34px, the field the slot's full width; the AntD search button stays the icon, keyboard-reachable). The global
   search-group rules above are !important, so these are too. */
.data-table-toolbar .ant-input-group-wrapper.ant-input-search {
    display: block !important;
    width: 100% !important;
}

.data-table-toolbar .ant-input-search .ant-input-wrapper.ant-input-group {
    position: relative;
    display: block !important;
    width: 100% !important;
}

.data-table-toolbar .ant-input-search .ant-input,
.data-table-toolbar .ant-input:not(.ant-input-affix-wrapper .ant-input, .ant-input-number .ant-input),
.data-table-toolbar .ant-input-affix-wrapper,
.data-table-toolbar .ant-input-number,
.data-table-toolbar .ant-select:not(.ant-select-customize-input) .ant-select-selector,
.data-table-toolbar .ant-picker {
    height: 36px;
    border: 1px solid var(--ctl-bd) !important;
    border-radius: 8px !important;
    background: var(--ctl-bg) !important;
    color: var(--text);
    font: 400 14.5px/1.3 var(--font);
    box-shadow: none;
}

.data-table-toolbar .ant-input-search .ant-input {
    display: block !important;
    float: none;
    width: 100%;
    padding: 0 12px 0 34px;
}

.data-table-toolbar .ant-input:not(.ant-input-search .ant-input, .ant-input-affix-wrapper .ant-input, .ant-input-number .ant-input),
.data-table-toolbar .ant-input-affix-wrapper,
.data-table-toolbar .ant-select:not(.ant-select-customize-input) .ant-select-selector,
.data-table-toolbar .ant-picker {
    padding: 0 12px;
}

.data-table-toolbar .ant-input-affix-wrapper > .ant-input,
.data-table-toolbar .ant-input-number .ant-input-number-input {
    height: 34px;
    font: 400 14.5px/1.3 var(--font);
}

.data-table-toolbar .ant-select-multiple:not(.ant-select-customize-input) .ant-select-selector {
    height: auto;
    min-height: 36px;
    padding: 1px 32px 1px 4px;
}

/* The placeholder text 12px inside the border, as the single selects' (4px padding + 8px). */
.data-table-toolbar .ant-select-multiple .ant-select-selection-placeholder {
    left: 8px;
}

/* The phone touch target (44px, the global <= 480px block) still wins over the 36px .ctl. */
@media (max-width: 480px) {
    .data-table-toolbar .ant-select-multiple:not(.ant-select-customize-input) .ant-select-selector {
        min-height: 44px;
    }
}

.data-table-toolbar .ant-select-single .ant-select-selector .ant-select-selection-search {
    left: 12px;
    right: 32px;
}

.data-table-toolbar .ant-select-single .ant-select-selector .ant-select-selection-search-input {
    height: 34px;
}

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

.data-table-toolbar .ant-select-arrow,
.data-table-toolbar .ant-select-clear {
    right: 11px;
}

.data-table-toolbar .ant-input::placeholder,
.data-table-toolbar .ant-picker-input > input::placeholder,
.data-table-toolbar .ant-select-selection-placeholder {
    color: var(--muted);
    opacity: 1;
}

.data-table-toolbar .ant-picker-input > input {
    font: 400 14.5px/1.3 var(--font);
}

.data-table-toolbar .ant-input:not(.ant-input-affix-wrapper .ant-input):hover,
.data-table-toolbar .ant-input-affix-wrapper:hover,
.data-table-toolbar .ant-input-search .ant-input:hover,
.data-table-toolbar .ant-select:not(.ant-select-disabled):hover .ant-select-selector,
.data-table-toolbar .ant-picker:hover {
    border-color: var(--ctl-bd-h) !important;
}

.data-table-toolbar .ant-input:not(.ant-input-affix-wrapper .ant-input):focus,
.data-table-toolbar .ant-input-affix-wrapper-focused,
.data-table-toolbar .ant-input-search .ant-input:focus,
.data-table-toolbar .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,
.data-table-toolbar .ant-picker-focused {
    border-color: var(--focus) !important;
    box-shadow: 0 0 0 3px var(--pri-bg) !important;
}

.data-table-toolbar .ant-input-search .ant-input-group-addon {
    position: absolute !important;
    top: 50% !important;
    left: 11px !important;
    z-index: 1;
    display: block !important;
    width: 16px !important;
    height: 16px;
    transform: translateY(-50%);
}

.data-table-toolbar .ant-input-search .ant-input-group-addon .ant-btn.ant-input-search-button {
    display: block;
    width: 16px;
    height: 16px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    border: 0 !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 16px;
    line-height: 16px;
}

.data-table-toolbar .ant-input-search .ant-input-group-addon .ant-btn.ant-input-search-button:hover {
    background: transparent !important;
    color: var(--text) !important;
}

/* I-049 (TASK_07): a saved-search dropdown in the filters (/adresar) is a Select and its button side by side — it needs
   their width, not the 158px of a single filter. */
.data-table-toolbar__filters > .saved-search-dropdown {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

@media (max-width: 768px) {
    .data-table-toolbar__filters > .saved-search-dropdown {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .data-table-toolbar__views {
        flex: 1 1 100%;
    }

    .data-table-toolbar__views .saved-views {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .data-table-toolbar__views .saved-views::-webkit-scrollbar {
        display: none;
    }

    .data-table-toolbar__search {
        flex-basis: 100%;
        max-width: none;
    }

    .data-table-toolbar__filters > :not(label) {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    .data-table-toolbar__filters > .ant-picker-range,
    .data-table-toolbar__filters > :has(> .ant-picker-range) {
        flex-basis: 100%;
    }
}

/* --- data-table --- */
/* The frame around a page's AntD Table (DataTableFrame; prototype .tbl-wrap / .tbl / .th-sort / .c-act / .tbl-foot).
   Its root is the list's surface and scroll host (.glass-card.table-card--scroll-x, global). Already global and not
   declared again: the header's --th-bg and type, the row rule, row hover --row-h, the selected row --row-sel and the
   tabular numerals (overrides.css "Table Overrides"), the pinned cells' opaque base with their hover / selected layers
   (app.css "Pinned (Fixed) table cells") and the wrapping header cells of the scroll host. So no rule here sets a
   background on a table cell, and none declares position / left / right / z-index / inset on one: where a column is
   pinned is the frame's call, in C# (DataTablePins), never a stylesheet's (tests/scripts/app-css-pinned-position.test.js).
   Sortable headers are read through AntD 1.6.0's own classes (th.ant-table-column-has-sorters, th.ant-table-column-sort,
   .ant-table-column-sorter-up|down.active — TASK_03, R2). */
.data-table:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* I-049 TASK_22 (PLAN LP7): the frame is the prototype's flush .panel.tbl-wrap — no inner padding, the table against
   the panel's inner box, clipped to the 12px radius; the horizontal scroll stays on the frame (.table-card--scroll-x). */
.glass-card.data-table {
    padding: 0;
    overflow: hidden;
}

.glass-card.data-table.table-card--scroll-x {
    overflow-x: auto;
}

/* The prototype's .tbl cells: th 42px high, padding 0 10px; td 54px, padding 6px 10px; the selection column (.c-chk)
   padding-left 14px, padding-right 2px. (0,4,2) and up: over AntD's Size="Middle|Small" cell padding
   (.ant-table.ant-table-middle … th / td, 0,3,2 — ant-design-blazor.css loads after app.css). The body cells take it in
   a scroll-mode frame (.data-table--scroll) at every width and in a card-mode frame (.data-table--cards) only above
   640px — at <= 640px the phone card stack below owns their boxes (the prototype's .tbl td { height: auto; padding: 0 }
   there); the header is hidden in card mode. */
.glass-card.data-table .ant-table .ant-table-thead > tr > th {
    height: 42px;
    padding: 0 10px;
    line-height: 1.2; /* TASK_24: prototype .tbl th font 600 12.5px/1.2 (the size and weight are the global header type) */
}

.glass-card.data-table .ant-table-thead > tr > th.ant-table-selection-column {
    padding-left: 14px;
    padding-right: 2px;
}

.glass-card.data-table.data-table--scroll .ant-table-tbody > tr.ant-table-row > td {
    height: 54px;
    padding: 6px 10px;
    font-size: 14px; /* TASK_24: prototype .tbl font-size 14px, td line height the body's 1.5 (AntD's is 1.5715) */
    line-height: 1.5;
}

.glass-card.data-table.data-table--scroll .ant-table-tbody > tr.ant-table-row > td.ant-table-selection-column {
    padding-left: 14px;
    padding-right: 2px;
}

@media (min-width: 640.02px) {
    .glass-card.data-table.data-table--cards .ant-table-tbody > tr.ant-table-row > td {
        height: 54px;
        padding: 6px 10px;
        font-size: 14px;
        line-height: 1.5;
    }

    .glass-card.data-table.data-table--cards .ant-table-tbody > tr.ant-table-row > td.ant-table-selection-column {
        padding-left: 14px;
        padding-right: 2px;
    }
}

/* I-049 TASK_24: the prototype's two-line cell, verbatim — .cell2 { display: flex; flex-direction: column; gap: 2px;
   min-width: 0 }, each line one ellipsised line, .cell2__s 12.5px/1.35 --muted (.tbl .c-dl .mono 12.5px). */
/* I-049 TASK_26: an ellipsised column's header is one line too (prototype .tbl th { white-space: nowrap }), cut with an
   ellipsis where the label is longer than its column (the processing register's „Прекогранични пренос"). */
.data-table .ant-table-thead > tr > th.ant-table-cell-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.data-table .cell2 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.data-table .cell2 > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prototype .cell2 > .dl { white-space: normal } — the deadline band (e.g. „Заустављен · остало …“) wraps, never clips. */
.data-table .cell2 > .deadline-indicator {
    white-space: normal;
}

.data-table .cell2__s {
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--muted);
}

/* A tag as the second line (the processing register's „Системска“) is that line's 18px, not a table tag's 22px, so the
   two-line row stays the prototype's 54px. (0,5,0) over the table-tag rule's (0,4,0). The line is a flex row: an inline
   tag on the text's baseline grew the line box past the tag by the strut's descent. The tag sits in ToneTag's
   display: contents host, hence the descendant selectors. */
.data-table .ant-table-cell .cell2__s:has(.ant-tag.tone-tag) {
    display: flex;
}

.data-table .ant-table-cell .cell2__s .ant-tag.tone-tag {
    min-height: 0;
    height: 18px;
    padding-block: 0;
    line-height: 16px;
}

/* Long text in a cell: two clamped lines (prototype .tbl .wrap2, verbatim). */
.data-table .wrap2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
}

/* The created-date column's mono date (prototype .tbl .c-cr .mono { font-size: 12.5px } over .mono's letter-spacing
   -.01em). AntD's cells break long words (overflow-wrap: break-word) — the prototype's do not, so the 81px date keeps
   one line in its 96px column instead of wrapping into a taller row. */
.data-table td.dt-col--meta > .mono {
    font-size: 12.5px;
    letter-spacing: -0.01em;
    overflow-wrap: normal;
}

/* I-062 TASK_09: a count column (prototype .tbl .c-num, th and td) — right-aligned tabular figures; the card stack keeps
   its own left alignment (its cell rule outranks this one). */
.data-table .ant-table-thead > tr > th.dt-col--num,
.data-table .ant-table-tbody > tr > td.dt-col--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* The row's leading text in semibold (prototype .tbl .t-strong: a search term, a holiday name). */
.data-table .t-strong {
    font-weight: 600;
}

/* /overdue (I-049 TASK_34, owner defects 10 / 11): the identifier, status, deadline, overdue, last-action and action
   columns (.dt-col--fit) are as wide as their content and never wrap — a date stays „20.09.2026.“ on one line instead of
   AntD's break-word splitting it before the final dot — and the party / executor / OJ columns (AntD Ellipsis) share
   the rest of the panel, truncating only when it is genuinely too narrow. AntD writes table-layout: fixed inline (the
   ScrollX floor stays the table's min width); an auto layout sizes the columns by their content. */
.overdue-table .ant-table-content > table {
    table-layout: auto !important;
}

/* AntD shares ScrollX equally among Width-less columns (inline col width / min-width) — the content decides instead. */
.overdue-table .ant-table-content > table > colgroup > col {
    width: auto !important;
    min-width: 0 !important;
}

@media (min-width: 640.02px) {
    .overdue-table td.dt-col--fit {
        width: 1%;
        white-space: nowrap;
    }

    /* The identifier column keeps its Width (278px, border-box) whatever the rows show: the auto layout above would
       otherwise size it to the short forms on screen (R130/2026 ≈ 97px), below the 30-digit identifier's ≈ 256px budget
       every case list holds (I-041 D11, CaseAtomsListsTests.Lists_IdentifierNotClipped_At1440). */
    .overdue-table :is(th, td).dt-col--primary {
        width: 278px;
    }

    /* th too: a header's own text would otherwise decide how the rest is shared (the short „ОЈ“ got the least). */
    .overdue-table th.ant-table-cell-ellipsis,
    .overdue-table td.ant-table-cell-ellipsis {
        max-width: 0;
    }
}

/* Built-in AntD pagination inside the flush frame keeps the cells' 10px inset from the panel's edge. */
.glass-card.data-table .ant-table-pagination.ant-pagination {
    margin: 0 !important;
    padding: 12px 10px !important;
}

/* Sortable headers: --text on hover and while sorted (answering the !important --text-secondary of the global header
   rules), arrows --border-2 with the active one --text, and the focus ring patterns.js makes reachable. */
.data-table .ant-table-thead > tr > th.ant-table-column-has-sorters:hover,
.data-table .ant-table-thead > tr > th.ant-table-column-sort {
    color: var(--text) !important;
}

.data-table .ant-table-thead > tr > th.ant-table-column-has-sorters:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
    color: var(--text) !important;
}

/* (0,3,2): one step over AntD's `.ant-table-column-sorters:hover .ant-table-column-sorter` (#a6a6a6), so the arrows
   keep --border-2 while the header is hovered. */
.data-table .ant-table-thead > tr > th .ant-table-column-sorter {
    color: var(--border-2);
}

.data-table .ant-table-thead > tr > th .ant-table-column-sorter-up.active,
.data-table .ant-table-thead > tr > th .ant-table-column-sorter-down.active {
    color: var(--text);
}

/* I-045 (PLAN AD14): the selection checkbox's label covers its whole cell, so a click anywhere in the cell toggles the
   row (AntD keeps the label's click to itself) and never reaches a page's OnRowClick (/predmeti opens the case). The
   cell is its containing block: sticky when pinned, AntD's base position: relative otherwise. */
.data-table .ant-table-tbody td.ant-table-selection-column > .ant-checkbox-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
}

/* The pinned actions column is set off by a rule line (prototype .c-act); a shadow, not a pinning property. */
.data-table .ant-table-cell-fix-right {
    box-shadow: inset 1px 0 0 var(--line);
}

/* I-049 (TASK_07): expandable rows (the audit trail's details) — the +/- toggle sits on the panel in both themes, AntD's
   own is a white square. */
.data-table .ant-table-row-expand-icon {
    background: var(--panel-2);
    border-color: var(--border-2);
    color: var(--text-2);
}

.data-table .ant-table-row-expand-icon:hover {
    border-color: var(--text-2);
    color: var(--text);
}

/* The count line below the frame (TableRowCount; prototype .tbl-foot: padding 12px 4px 0). The page rhythm leaves it
   out (I-049 TASK_22), so the padding is the whole gap below the panel. */
.data-table__count {
    margin: 0;
    padding: 12px 4px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

/* No total yet: the live region stays in the DOM (its first text is announced) but takes no space. Not display: none —
   a hidden region is not a live one. */
.data-table__count:empty {
    margin: 0;
    padding: 0;
}

/* Loading: a header bar and LoadingRows 54px rows of the shared skeleton bars, one track per column. */
.data-table__skeleton-head,
.data-table__skeleton-row {
    display: grid;
    grid-template-columns: repeat(var(--dt-skeleton-columns, 6), minmax(0, 1fr));
    align-items: center;
    gap: 24px;
    padding: 0 16px;
}

.data-table__skeleton-head {
    height: 42px;
    background: var(--th-bg);
    border-bottom: 1px solid var(--border);
}

.data-table__skeleton-row {
    height: 54px;
    border-bottom: 1px solid var(--line);
}

.data-table__skeleton-row:last-child {
    border-bottom: 0;
}

.data-table__skeleton-head .pattern-skel {
    width: 56%;
    height: 10px;
}

.data-table__skeleton-row .pattern-skel:nth-child(3n + 1) {
    width: 88%;
}

.data-table__skeleton-row .pattern-skel:nth-child(3n + 2) {
    width: 64%;
}

.data-table__skeleton-row .pattern-skel:nth-child(3n) {
    width: 46%;
}

/* Phone card stack (prototype ≤ 640px): each row a card, its cells placed by the page's dt-col--* classes — the
   checkbox down the left, the primary cell across the top, the secondary (bold) and the status (right) on one line,
   every unclassed cell a line of its own, a meta cell (muted) beside the actions at the bottom right, phone-hidden
   cells gone. The frame passes null pins in card mode, so no cell is pinned here; placing the cells is display / grid /
   width work only. The cells tile the card without gaps (spacing is their padding), so the global hover and selected
   tints of the cells read as one tinted card. */
@media (max-width: 640px) {
    /* AntD writes the ScrollX width (and min-width / table-layout) inline on the table; the cards fit the frame. */
    .data-table--cards .ant-table table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
    }

    .data-table--cards .ant-table colgroup,
    .data-table--cards .ant-table-thead,
    .data-table--cards .ant-table-measure-row {
        display: none;
    }

    .data-table--cards .ant-table-tbody {
        display: block;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        border-bottom: 1px solid var(--line);
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row:last-child {
        border-bottom: 0;
    }

    /* An unclassed cell: a full-width line. */
    .data-table--cards .ant-table-tbody > tr.ant-table-row > td {
        display: block;
        grid-column: 2 / 4;
        width: auto;
        height: auto;
        padding: 3px 14px 3px 0;
        border-bottom: 0 !important;
        text-align: left;
    }

    /* The checkbox runs down the left of every line (empty lines collapse to 0 — there is no row gap). */
    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.ant-table-selection-column {
        grid-column: 1;
        grid-row: 1 / span 12;
        padding: 15px 10px 14px 12px;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--primary {
        grid-column: 2 / 4;
        padding-top: 14px;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--secondary {
        grid-column: 2;
        padding-right: 10px;
        font-weight: 600;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--status {
        grid-column: 3;
        text-align: right;
    }

    /* Muted, answering the !important --text-primary of the global cell rules. */
    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--meta {
        grid-column: 2;
        padding-right: 10px;
        padding-bottom: 14px;
        color: var(--muted) !important;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--phone-hidden {
        display: none;
    }

    .data-table--cards .ant-table-tbody > tr.ant-table-row > td.dt-col--actions {
        display: flex;
        grid-column: 3;
        align-items: flex-end;
        justify-content: flex-end;
        padding-bottom: 14px;
    }
}

/* --- band-grouped-list --- */
/* The desk list (prototype .qgh / .qr / .q-foot): the page's bands in order in one panel, each under a sticky 34px
   header, its rows 40–44px and ruled --line. The header sticks --band-list-sticky-top below the top of the scroll
   container (BandGroupedList.StickyTop, default var(--shell-header-h) = the prototype's .qgh { top: 56px }: right under
   the sticky shell header). overflow: clip rounds the corners without making the panel a scroll container, so the
   headers still stick to the content column (or to a bounded frame around the list). */
.band-list {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    overflow: clip;
}

.band-list__groups,
.band-list__rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.band-list__head {
    position: sticky;
    top: var(--band-list-sticky-top, var(--shell-header-h));
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin: 0;
    padding: 0 16px;
    background: var(--sticky);
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
}

/* The label is .group-label's recipe (F-264 tokens, uppercase, --text-2); the warn / err bands tint it. */
.band-list__head .band-list__label {
    color: inherit;
}

.band-list__head-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-2);
}

.band-list__head--err {
    color: var(--err-ink);
}

.band-list__head--warn {
    color: var(--warn-ink);
}

.band-list__head--err .band-list__head-dot {
    background: var(--err);
}

.band-list__head--warn .band-list__head-dot {
    background: var(--warn);
}

.band-list__head--info .band-list__head-dot {
    background: var(--info);
}

.band-list__head--ok .band-list__head-dot {
    background: var(--ok);
}

.band-list__count {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
}

/* A row: the dot, then the template's cells (.band-list__cells is display: contents, so they are grid items). Two
   lines of 17 + 20px, 3px padding and the rule make 44px. */
.band-list__row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) 148px 104px;
    align-items: center;
    gap: 0 14px;
    min-height: 44px;
    padding: 3px 12px 3px 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    outline: none;
    scroll-margin-top: calc(34px + var(--band-list-sticky-top, var(--shell-header-h)));
}

.band-list__group:last-child .band-list__row:last-child {
    border-bottom: 0;
}

.band-list__cells {
    display: contents;
}

.band-list .band-list__row:hover {
    background: var(--row-h);
}

.band-list .band-list__row--active,
.band-list .band-list__row--active:hover {
    background: var(--row-sel);
}

.band-list .band-list__row:focus-visible {
    box-shadow: inset 0 0 0 2px var(--focus);
}

/* The dot cell; an attention row's dot is AttentionBadge's own .attn-dot (global rule, --attn). */
.band-list__dot {
    display: flex;
    align-items: center;
    width: 8px;
}

/* The template's cells */
.band-list__main {
    min-width: 0;
}

.band-list__ref {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    font-size: 0.78125rem;
    line-height: 17px;
    color: var(--muted);
    white-space: nowrap;
}

/* B-188 (RAS walk 2, #1): in a numbered case's row the two-line delovodni broj (.case-id-dual, min-width: 0) absorbed
   all the shrinking and its number line spilled over the meta on the same line. As the prototype's desk row does
   (.qr__cid { flex: none } / .qr__meta { min-width: 0; ellipsis }), the number keeps its width and the meta truncates
   or wraps (below). */
.band-list__ref > .case-id-dual,
.band-list__ref > .case-id {
    flex: none;
}

.desk-row__meta {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Only a narrow desk column wraps (PR !1301 review): next to the aside it is 194 px at 1180, and a meta that does not
   fit beside the number moves to its own line, as the prototype's narrow .qr__ref does (flex-wrap: wrap; row-gap: 2px),
   instead of shrinking to 0. A wider column keeps the prototype's desktop row: the meta beside the number, ellipsized. */
.band-list__main:has(> .band-list__ref > .desk-row__meta) {
    container-type: inline-size;
    container-name: desk-row;
}

@container desk-row (max-width: 320px) {
    .band-list__ref:has(> .desk-row__meta) {
        flex-wrap: wrap;
        row-gap: 2px;
    }
}

.band-list__ref .case-id:not(.case-id--lg) {
    font-size: 0.71875rem;
}

.band-list__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.band-list__title {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 20px;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.band-list__tags {
    display: inline-flex;
    flex: none;
    flex-wrap: wrap;
    gap: 4px 6px;
    max-width: 100%;
}

/* A tag in a 44px row is 20px (prototype .qr__tags .tag), one class more than the global .ant-tag.tone-tag. */
.band-list .band-list__tags .ant-tag.tone-tag {
    height: 20px;
    padding: 0 6px;
    font-size: 0.71875rem;
}

.band-list__when {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* A tag in a data-table cell stays inside its column: a long one („Прекорачен рок за завођење") wraps instead of
   running over the next cell or under the sticky action column. */
.data-table .ant-table-cell .ant-tag.tone-tag {
    max-width: 100%;
    height: auto;
    min-height: 22px;
    padding-block: 3px;
    line-height: 1.25;
    white-space: normal;
}

/* A deadline tag longer than the 148px column wraps inside it instead of running into the action. */
.band-list .band-list__when .ant-tag.tone-tag {
    max-width: 100%;
    height: auto;
    min-height: 22px;
    white-space: normal;
}

.band-list__act {
    justify-self: end;
}

.band-list__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-size: 0.78125rem;
    color: var(--muted);
}

/* The keyboard hint (prototype .kbdh + kbd, I-062 D2): key caps ↑ ↓ Enter, then the sentence in the footer's font.
   The caps are the one shared key-cap rule (prototype kbd), in the CommandPalette block below. */
.band-list__kbd {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.band-list__kbd-text {
    margin-left: 6px;
}

/* Loading: three skeleton headers of four 44px rows */
.band-list__head--skeleton {
    position: static;
}

.band-list__row--skeleton {
    cursor: default;
}

.band-list__skel-label {
    width: 120px;
    height: 10px;
}

.band-list__skel-main {
    height: 14px;
}

.band-list__skel-when {
    width: 88px;
}

.band-list__skel-act {
    justify-self: end;
    width: 92px;
    height: 24px;
}

/* Phone: two-line rows (identifier and title over when + action), no keyboard hint */
@media (max-width: 640px) {
    .band-list__row {
        grid-template-columns: 8px minmax(0, 1fr) auto;
        grid-template-areas:
            "dot main main"
            ". when act";
        gap: 6px 12px;
        padding: 10px 14px;
    }

    .band-list__dot {
        grid-area: dot;
        align-self: start;
        margin-top: 5px;
    }

    .band-list__main,
    .band-list__skel-main {
        grid-area: main;
    }

    .band-list__when,
    .band-list__skel-when {
        grid-area: when;
    }

    .band-list__act,
    .band-list__skel-act {
        grid-area: act;
    }

    .band-list__ref {
        flex-wrap: wrap;
        row-gap: 2px;
        white-space: normal;
    }

    .band-list__kbd {
        display: none;
    }
}

/* Showcase-only: a bounded scroll frame for demos of sticky parts. Below 1000px the showcase's sticky nav strip covers
   the top of main, so a sticky demo sticks inside this frame instead (I-043 band list; the split form reuses it). */
.pattern-demo-frame {
    max-height: 720px;
    overflow: auto;
}

/* Showcase-only: a shorter frame for a demo whose content fits in 720px (the band list's ten rows), so it scrolls. */
.pattern-demo-frame--short {
    max-height: 440px;
}

/* Showcase-only: a demo frame is a scroll box of its own with no shell header above it, so the patterns' top-sticky
   parts, which clear the sticky header on a page (I-056 TASK_02), stick to the frame's top instead: the band header and
   the section strip at 0, the document pane 16px and the settings tabs 12px under it, the wizard rail 28px; the
   sections' scroll margin is the strip's alone. */
.pattern-demo-frame .band-list__head,
.pattern-demo-frame .split-form__strip {
    top: 0;
}

.pattern-demo-frame .band-list__row {
    scroll-margin-top: 34px;
}

.pattern-demo-frame .split-form__pane,
.pattern-demo-frame .record-split__pane {
    top: var(--space-md);
}

.pattern-demo-frame .split-form__section {
    scroll-margin-top: var(--split-form-strip-h, 56px);
}

.pattern-demo-frame .settings-layout__tabs {
    top: 12px;
}

.pattern-demo-frame .glass-card.wizard-shell__rail {
    top: 28px;
}

.pattern-demo-frame .detail-page-grid__side {
    top: var(--space-lg);
}

/* Showcase-only: a frame that stands in for the page's content box — a page-variant action bar (.split-form > .sticky-action-bar--page)
   bleeds -24 / -28px over .page-wrapper's side padding (28 / 24 / 16px), so without that padding the bar spilled 24px
   past the frame and made it scroll sideways (I-049 TASK_26 bar, PatternSplitFormTests). */
.pattern-demo-frame--page {
    padding-inline: 28px 24px;
}

@media (max-width: 999.98px) {
    .pattern-demo-frame--page {
        padding-inline: 24px;
    }
}

@media (max-width: 640px) {
    .pattern-demo-frame--page {
        padding-inline: 16px;
    }
}

/* --- event-feed --- */
/* The case's one chronological feed (prototype .blk__bar / .feed / .fday / .fgrp / .fe / .lockp): a bar with the block
   title (.group-label recipe) and the filter switch right-aligned, then a panel of day sections — a mono date with a
   rule after it over the day's entries. An entry is a 44px time column, a 28px node on the vertical --line connector
   and the body; the node's tone colours its icon and ring, and only an attention entry is filled (--attn). A locked
   entry is muted with a dashed node; the locked notice is a --panel-2 note above the first day. */
.event-feed {
    min-width: 0;
}

.event-feed__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.event-feed__heading {
    margin: 0 0 0 2px;
}

.event-feed__bar .saved-views {
    margin-left: auto;
}

.event-feed__panel {
    min-width: 0;
    padding-bottom: 8px;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
}

.event-feed__day {
    min-width: 0;
}

.event-feed__date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 16px 4px;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.event-feed__date::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

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

.event-feed__entry {
    position: relative;
    display: grid;
    grid-template-columns: 44px 28px minmax(0, 1fr);
    gap: 0 12px;
    padding: 5px 16px;
}

/* The connector through the node centres: padding 16 + time 44 + gap 12 + half the node 14. */
.event-feed__entry::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(16px + 44px + 12px + 14px);
    width: 1px;
    background: var(--line);
}

.event-feed__group .event-feed__entry:first-child::before {
    top: 14px;
}

.event-feed__group .event-feed__entry:last-child::before {
    bottom: calc(100% - 14px);
}

.event-feed__group .event-feed__entry:only-child::before {
    display: none;
}

.event-feed__time {
    font-family: var(--mono);
    font-size: 0.78125rem;
    line-height: 28px;
    color: var(--muted);
    text-align: right;
}

.event-feed__node {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-2);
    border-radius: 50%;
    background: var(--sticky);
    color: var(--text-2);
    font-size: 0.9375rem;
}

.event-feed__node--ok {
    border-color: var(--ok-bd);
    color: var(--ok-ink);
}

.event-feed__node--warn {
    border-color: var(--warn-bd);
    color: var(--warn-ink);
}

.event-feed__node--attention {
    border-color: var(--attn);
    background: var(--attn);
    color: var(--on-attn);
}

.event-feed__node--document {
    color: var(--text);
}

.event-feed__node--locked {
    border-style: dashed;
    color: var(--muted);
    font-size: 0.875rem;
}

.event-feed__body {
    min-width: 0;
    padding: 3px 0 9px;
}

.event-feed__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    font-size: 0.90625rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    overflow-wrap: anywhere;
}

.event-feed__entry--locked .event-feed__title {
    font-weight: 500;
    color: var(--muted);
}

.event-feed__meta {
    margin-top: 1px;
    font-size: 0.84375rem;
    color: var(--muted);
}

.event-feed__meta b,
.event-feed__meta strong {
    font-weight: 500;
    color: var(--text-2);
}

.event-feed__extra {
    margin-top: 3px;
}

.event-feed__extra .case-id:not(.case-id--lg) {
    font-size: 0.71875rem;
    white-space: normal;
}

/* The locked notice (LockedNotice): lock circle, title, the role's text and the default request-access button. */
.event-feed__locked {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 12px 16px 4px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--panel-2);
    color: var(--text);
}

.event-feed__locked-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--panel-3);
    color: var(--text-2);
    font-size: 1.125rem;
}

.event-feed__locked-body {
    min-width: 0;
}

.event-feed__locked-title {
    font-weight: 700;
}

.event-feed__locked-text {
    max-width: 70ch;
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--text-2);
}

.event-feed__locked-action {
    margin-top: 10px;
}

/* The hover host of the disabled button's reason tooltip (LockedNotice owns its visibility). */
.event-feed__request-tip {
    display: inline-block;
}

/* No request flow: the button stays focusable (aria-disabled, not disabled) and looks like the global disabled
   default button — one class more than its hover / focus rules, !important like them. */
.event-feed__locked .event-feed__request[aria-disabled="true"],
.event-feed__locked .event-feed__request[aria-disabled="true"]:hover,
.event-feed__locked .event-feed__request[aria-disabled="true"]:focus-visible {
    background: var(--panel) !important;
    border-color: var(--line) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

/* Loading: two skeleton day headers over five skeleton entries */
.event-feed__node--skeleton {
    border-style: dashed;
}

.event-feed__skel-date {
    width: 88px;
    height: 10px;
}

.event-feed__skel-time {
    width: 36px;
    height: 10px;
    margin: 9px 0 0 auto;
}

.event-feed__skel-title {
    width: 62%;
    height: 14px;
    margin-top: 4px;
}

.event-feed__skel-meta {
    width: 40%;
    height: 10px;
    margin-top: 8px;
}

/* Phone: no time column; the connector moves to the node centre (padding 14 + half the node 14) */
@media (max-width: 640px) {
    .event-feed__entry {
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 5px 14px;
    }

    .event-feed__time {
        display: none;
    }

    .event-feed__entry::before {
        left: calc(14px + 14px);
    }

    .event-feed__locked {
        margin: 12px 12px 4px;
    }
}

/* --- lifecycle-bar --- */
/* The case's lifecycle under its header (prototype .lc / .lc__s): one grid column per step (--lifecycle-steps, bound
   by LifecycleBar). A step is its node with the connector to the next step, the label, the date (mono) and an optional
   note. Reached connectors are solid --text-2, those beside a detour solid --border-2, the rest solid --border — none
   dashed (I-062 owner D3); the current node is --text with a --neu-bg halo; a detour that happened is a smaller
   --warn / --warn-ink node, one that has not happened the plain ring of a step not reached (I-062 owner D3). Vertical
   ≤ 640px: node left, date right, no lines. */
.lifecycle-bar {
    display: grid;
    grid-template-columns: repeat(var(--lifecycle-steps, 5), minmax(0, 1fr));
    margin: 0;
    padding: 16px 20px 14px;
    list-style: none;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
}

.lifecycle-bar__step {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.lifecycle-bar__top {
    display: flex;
    align-items: center;
    height: 16px;
}

.lifecycle-bar__node {
    flex: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-2);
    border-radius: 50%;
    background: var(--sticky);
}

.lifecycle-bar__line {
    flex: 1;
    height: 2px;
    margin: 0 10px;
    border-radius: 1px;
    background: var(--border);
}

/* The prototype's .lc__line.is-dash as Chrome draws it: a 2px dashed border-top on a zero-height box with the line's
   1px radius renders as one solid --border-2 stroke — the solid dim line the owner compared (I-062 D3). */
.lifecycle-bar__line--detour {
    background: var(--border-2);
}

.lifecycle-bar__line--done {
    background: var(--text-2);
}

.lifecycle-bar__step--past .lifecycle-bar__node {
    border-color: var(--text-2);
    background: var(--text-2);
}

.lifecycle-bar__step--current .lifecycle-bar__node {
    border-color: var(--text);
    background: var(--text);
    box-shadow: 0 0 0 4px var(--neu-bg);
}

/* I-062 D3: only a detour that happened has its own node; one that has not keeps the plain ring above. */
.lifecycle-bar__step--was .lifecycle-bar__node {
    width: 12px;
    height: 12px;
    margin: 0 1px;
    border-color: var(--warn);
    background: var(--warn-bg);
}

.lifecycle-bar__label {
    min-width: 0;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    overflow-wrap: anywhere;
}

.lifecycle-bar__step--future .lifecycle-bar__label,
.lifecycle-bar__step--detour .lifecycle-bar__label {
    font-weight: 500;
    color: var(--muted);
}

.lifecycle-bar__step--detour .lifecycle-bar__label,
.lifecycle-bar__step--was .lifecycle-bar__label {
    font-size: 0.8125rem;
}

.lifecycle-bar__step--was .lifecycle-bar__label {
    color: var(--warn-ink);
}

.lifecycle-bar__date,
.lifecycle-bar__note {
    font-family: var(--mono);
    font-size: 0.78125rem;
    line-height: 1.4;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.lifecycle-bar__step--current .lifecycle-bar__date {
    color: var(--text-2);
}

/* I-049 TASK_26 (PLAN LP13): the prototype's date and note are one .lc__d (12.5px/1.4, a <br> between) — the note sits
   right under the date, not a step gap (6px) below it. ≤ 640px the note has its own grid cell (reset below). */
.lifecycle-bar__date + .lifecycle-bar__note {
    margin-top: -6px;
}

/* The columns have no gap (the connector runs to the next node), so the text keeps clear of the next step: a
   detour's date range wraps after its dash instead of touching the neighbour's date. */
.lifecycle-bar__label,
.lifecycle-bar__date,
.lifecycle-bar__note {
    padding-right: 12px;
}

/* Loading: five skeleton steps */
.lifecycle-bar__skel-node {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.lifecycle-bar__skel-label {
    width: 62%;
    height: 12px;
}

.lifecycle-bar__skel-date {
    width: 46%;
    height: 10px;
}

@media (max-width: 860px) {
    .lifecycle-bar {
        padding: 14px 14px 12px;
    }

    .lifecycle-bar__line {
        margin: 0 6px;
    }
}

@media (max-width: 640px) {
    .lifecycle-bar {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0;
        padding: 10px 16px;
    }

    .lifecycle-bar__step {
        display: grid;
        grid-template-columns: 16px minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        padding: 6px 0;
    }

    .lifecycle-bar__top {
        grid-row: 1 / 3;
    }

    .lifecycle-bar__line {
        display: none;
    }

    .lifecycle-bar__label,
    .lifecycle-bar__skel-label {
        grid-column: 2;
        grid-row: 1;
    }

    .lifecycle-bar__date,
    .lifecycle-bar__skel-date {
        grid-column: 3;
        grid-row: 1;
        text-align: right;
    }

    .lifecycle-bar__label,
    .lifecycle-bar__date,
    .lifecycle-bar__note {
        padding-right: 0;
    }

    .lifecycle-bar__date + .lifecycle-bar__note {
        margin-top: 0;
    }

    .lifecycle-bar__note {
        grid-column: 3;
        grid-row: 2;
        text-align: right;
    }

    .lifecycle-bar__skel-date {
        width: 64px;
    }
}

/* --- ledger --- */
/* The wide register (prototype .ak-bar / .ak-scroll / .ak-tbl / .ak-gh / .ak-ft): a real <table> in its own scroll box
   (both axes), so the column header (top 0), the group header rows (top = header height) and the totals row (bottom 0)
   stick inside the box, and the first column (.ledger__c1 — never AntD's .ant-table-cell-fix-* classes) sticks left,
   opaque on --sticky under the row's tint. --ledger-row-tint is the ledger's own property (transparent / --row-h on
   hover / --row-sel on focus-within), not a design token. Sticky parts stack locally (z-index 1–4). The box's height
   budget arrives as --ledger-max-h from LedgerTable.MaxHeight. Native <table>: no .ant-table-* rule reaches it. */
.ledger-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-height: 34px;
    margin-bottom: 10px;
}

.ledger-bar__label {
    margin: 0 2px;
}

.ledger-bar__sep {
    width: 1px;
    height: 18px;
    margin: 0 2px;
    background: var(--border);
}

.ledger-bar__spacer {
    flex: 1 1 auto;
}

.ledger-bar__count {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ledger-bar__count b {
    color: var(--text-2);
    font-weight: 600;
}

.ledger {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: var(--text);
}

.ledger__scroll {
    --ledger-th-h: 42px;
    overflow: auto;
    overscroll-behavior: contain;
    max-height: var(--ledger-max-h, max(380px, calc(100dvh - 424px)));
    scrollbar-width: thin;
    container-type: inline-size;
}

.ledger .ledger__scroll:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.ledger__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13.5px;
}

.ledger__table th,
.ledger__table td {
    text-align: left;
}

.ledger__table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: var(--ledger-th-h);
    padding: 0 10px;
    box-sizing: border-box;
    background: var(--th);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-family: var(--font);
    font-size: var(--font-size-th);
    font-weight: var(--font-weight-th);
    line-height: 1.25;
    color: var(--text-2);
}

.ledger__th {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.ledger__th-n {
    flex: none;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* AntD's sheet (loaded after app.css) underlines abbr[title]: answered with the root class. */
.ledger .ledger__th abbr[title] {
    text-decoration: none;
    cursor: help;
}

.ledger__table .ledger__end {
    text-align: right;
}

.ledger__table .ledger__end .ledger__th {
    justify-content: flex-end;
}

.ledger__table tr {
    --ledger-row-tint: transparent;
}

.ledger__table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.4;
    background: linear-gradient(var(--ledger-row-tint), var(--ledger-row-tint));
    font-variant-numeric: tabular-nums;
}

.ledger .ledger__row:hover {
    --ledger-row-tint: var(--row-h);
}

.ledger .ledger__row:focus-within {
    --ledger-row-tint: var(--row-sel);
}

/* Pinned first column: opaque (--sticky under the row's tint) with an inset rule on its right. */
.ledger__table .ledger__c1 {
    position: sticky;
    left: 0;
    z-index: 1;
    background: linear-gradient(var(--ledger-row-tint), var(--ledger-row-tint)), var(--sticky);
    box-shadow: inset -1px 0 0 var(--border);
}

.ledger__table thead .ledger__c1 {
    z-index: 4;
    background: var(--th);
}

.ledger__no {
    display: inline-block;
    margin: -1px -4px;
    padding: 1px 4px;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.ledger .ledger__no:hover {
    color: var(--pri-ink);
}

.ledger .ledger__no:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

/* Group header rows: sticky under the column header; the toggle + totals stay at the left while the box scrolls sideways. */
.ledger__group-head th {
    position: sticky;
    top: var(--ledger-th-h);
    z-index: 2;
    height: 40px;
    padding: 0;
    box-sizing: border-box;
    background: linear-gradient(var(--panel-2), var(--panel-2)), var(--sticky);
    border-bottom: 1px solid var(--border);
    font-weight: 400;
    text-align: left;
}

.ledger__group + .ledger__group .ledger__group-head th {
    border-top: 1px solid var(--border);
}

.ledger__group-in {
    position: sticky;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    width: max-content;
    max-width: 100cqw;
    box-sizing: border-box;
    padding: 6px 12px 6px 8px;
}

.ledger__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 8px 0 4px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--text);
    font-family: var(--head);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.ledger .ledger__toggle:hover {
    background: var(--panel-3);
}

.ledger .ledger__toggle:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 0;
}

.ledger__chevron {
    display: inline-flex;
    color: var(--muted);
    font-size: 15px;
    transition: transform 0.14s ease-out;
}

.ledger__toggle[aria-expanded="false"] .ledger__chevron {
    transform: rotate(-90deg);
}

/* Group summary and totals: spans joined by a "·" in --border-2, numbers bold and tabular; warn numbers in --warn-ink. */
.ledger__sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    color: var(--muted);
    font-size: 12.5px;
}

.ledger__sum > span {
    white-space: nowrap;
}

.ledger__sum > span + span::before {
    content: "\00b7";
    margin: 0 8px;
    color: var(--border-2);
}

.ledger__sum b {
    color: var(--text-2);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ledger .ledger__sum .ledger__sum-warn,
.ledger .ledger__sum .ledger__sum-warn b {
    color: var(--warn-ink);
}

/* Sticky totals row of the current filter (stays when every group is collapsed). */
.ledger__totals td {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding: 0;
    background: var(--th);
    border-top: 1px solid var(--border-2);
    border-bottom: 0;
    vertical-align: middle;
}

.ledger__totals-in {
    position: sticky;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    width: max-content;
    max-width: 100cqw;
    box-sizing: border-box;
    min-height: 46px;
    padding: 8px 16px;
}

/* The .group-label recipe (F-264 label tokens) in --text-2. */
.ledger__totals-label {
    font-family: var(--font-display);
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-label);
    letter-spacing: var(--font-tracking-label);
    text-transform: uppercase;
    line-height: 1;
    color: var(--text-2);
}

.ledger__totals .ledger__sum {
    font-size: 13px;
    color: var(--text-2);
}

.ledger__totals .ledger__sum b {
    color: var(--text);
    font-size: 14px;
}

/* Cell helpers a page's row template may use: mono runs (dates, marks) at 13px, a secondary line in --text-2. */
.ledger__table .mono {
    font-size: 13px;
}

.ledger__note {
    display: block;
    color: var(--text-2);
    font-size: 12.5px;
}

/* F-266 TASK_00 (desktop gate width 1000, owner 2026-10-21): the transcript note is the print button's caption. The
   hub's head carries „Групно архивирање“ beside the print column (I-049; the prototype's #register head has the print
   column only), so below a 1100px viewport the note wraps to the button's width — the actions then fit beside the 12rem
   title column and stay on the title's row, as the prototype's #register head does at 1000. */
@media (max-width: 1099.98px) {
    .page-header__actions > .ledger__print {
        width: min-content;
    }
}

/* I-049 TASK_24 (PLAN LP13): the content and the classification cells, verbatim from the prototype — .ak-ct (500, --text,
   two clamped lines) and .ak-mk (the code 600 13px/1.4 mono beside the name 13px --text-2, two clamped lines). */
.ledger__ct {
    font-weight: 500;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ledger__mk {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.ledger__mk-c {
    flex: none;
    font: 600 13px/1.4 var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.ledger__mk-n {
    min-width: 0;
    color: var(--text-2);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeleton rows keep the ledger's shape: 52px rows of the shared .pattern-skel bar. */
.ledger__skel-row td {
    height: 52px;
    vertical-align: middle;
}

.ledger__skel-row .pattern-skel {
    max-width: 100%;
}

@media (max-width: 640px) {
    .ledger-bar__label,
    .ledger-bar__sep {
        display: none;
    }

    .ledger__scroll {
        max-height: max(440px, calc(100dvh - 300px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ledger__chevron {
        transition: none;
    }
}

/* --- sticky-action-bar --- */
/* The bottom bar shared by the split form and the settings layout (prototype .ik-bar): the page's status left (a polite
   live region, always in the DOM), its buttons right. Sticky to the bottom of its scroll container (.content-layout
   on a page), translucent --hdr-bg + blur, top rule --line; z-index 2, under the shell's 99 / 150 / 200. A page whose
   container pads its content sets --sticky-action-bar-bleed to that padding for an edge-to-edge bar. AntD buttons get
   their 44px at <=480px from the global touch-target block — never sized here. */
.sticky-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    background: var(--hdr-bg);
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
    border-top: 1px solid var(--line);
}

.sticky-action-bar--page {
    margin: var(--space-lg) calc(-1 * var(--sticky-action-bar-bleed, 0px)) 0;
}

.sticky-action-bar--panel {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* The split form's bar = the prototype's .ik-bar, verbatim (I-049 TASK_26): it bleeds to the content box's edges —
   margin: 24px -24px -56px -28px; padding: 12px 24px 12px 28px (≤ 999.98px margin: 24px -24px -48px; padding: 12px
   24px; ≤ 640px margin: 20px -16px -40px; padding: 10px 16px) — over .page-wrapper's 28 / 24 / 56 padding. */
.split-form > .sticky-action-bar--page {
    margin: 24px -24px 0 -28px;
    padding: 12px 24px 12px 28px;
}

/* the bottom bleed only where the form ends the page (the prototype's intake); a block after it (the batch tab's drafts)
   must not slide under the bar */
.split-form:last-child > .sticky-action-bar--page {
    margin-bottom: -56px;
}

@media (max-width: 999.98px) {
    .split-form > .sticky-action-bar--page {
        margin: 24px -24px 0;
        padding: 12px 24px;
    }

    .split-form:last-child > .sticky-action-bar--page {
        margin-bottom: -48px;
    }
}

@media (max-width: 640px) {
    .split-form > .sticky-action-bar--page {
        margin: 20px -16px 0;
        padding: 10px 16px;
    }

    .split-form:last-child > .sticky-action-bar--page {
        margin-bottom: -40px;
    }
}

.sticky-action-bar__status {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    color: var(--text-2);
}

/* An empty status leaves the flow (it stays in the accessibility tree, so the next message is announced). */
.sticky-action-bar__status:empty {
    position: absolute;
}

.sticky-action-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-left: auto;
}

/* The page's error message in the status (e.g. „Исправите означена поља (3).“): error ink after a dot. */
.sticky-action-bar__error {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--err-ink);
}

.sticky-action-bar__error::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--err);
}

@media (max-width: 640px) {
    .sticky-action-bar {
        padding: 10px 16px;
    }

    .sticky-action-bar__status:not(:empty) {
        flex-basis: 100%;
    }

    .sticky-action-bar__actions {
        flex: 1 1 100%;
    }

    .sticky-action-bar__actions > * {
        flex: 1 1 auto;
    }

    .sticky-action-bar__actions > .ant-btn-primary {
        flex-grow: 2;
    }
}

/* --- split-form --- */
/* A document beside the form that registers it (prototype .ik / .ik-docs / .ik-prev / .sheet / .ik-anchor / .ak / .fsec /
   .fl-row / .drop): the document pane 4fr, the form 6fr (server error, the section strip, the sections in one
   surface), then the sticky action bar. The page scrolls in .content-layout under the sticky 56px shell header (I-056
   TASK_02), so the parts stick under it as the prototype's do: the pane at 72px (.ik-docs), the strip at 56px
   (.ik-anchor), and each section's scroll-margin-top (112px = header 56 + strip 56, .fsec) lands a scrolled-to heading
   just below the strip. Below 1000px (the shell's 999.98px query) one column, pane above, preview hidden. */
.split-form {
    /* the strip's share of the sections' scroll margin: the 48px strip (.ik-anchor, padding 8 + 32px links + 8) + its
       8px overlap; the demo frames of /design-system (no header) use it alone */
    --split-form-strip-h: 56px;
    display: block;
    min-width: 0;
}

.split-form__grid,
.record-split {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: var(--space-lg);
    align-items: start;
}

.split-form__pane,
.record-split__pane {
    position: sticky;
    top: 72px;
    min-width: 0;
}

.split-form__form {
    min-width: 0;
}

.split-form__alert {
    margin-bottom: 14px;
}

/* Document pane — a surface whose rows and preview run edge to edge. */
.glass-card.split-form__docs {
    padding: 0;
    overflow: hidden;
}

.split-form__docs-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 12px;
}

.split-form__docs-title {
    margin: 0;
    font: 700 15.5px/1.3 var(--head);
    color: var(--text);
}

.split-form__docs-count {
    font-size: 13px;
    color: var(--muted);
}

.split-form__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 18px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}

/* The paper placeholder of the selected file: a heading bar and text lines on --sheet. */
.split-form__sheet {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: min(190px, 62%);
    aspect-ratio: 1 / 1.414;
    padding: 12% 11%;
    border: 1px solid var(--border-2);
    border-radius: 3px;
    background: var(--sheet);
}

.split-form__sheet > span {
    display: block;
    height: 5px;
    border-radius: 3px;
    background: var(--border);
}

.split-form__sheet > span:nth-child(1) {
    width: 55%;
    height: 8px;
    margin-bottom: 6px;
    background: var(--border-2);
}

.split-form__sheet > span:nth-child(3) {
    width: 92%;
}

.split-form__sheet > span:nth-child(4) {
    width: 84%;
}

.split-form__sheet > span:nth-child(6) {
    width: 60%;
}

.split-form__sheet > span:nth-child(7) {
    width: 88%;
    margin-top: 8px;
}

.split-form__sheet > span:nth-child(8) {
    width: 95%;
}

.split-form__sheet > span:nth-child(9) {
    width: 40%;
}

.split-form__sheet--empty {
    justify-content: center;
    align-items: center;
    padding: 10%;
    border-style: dashed;
    /* I-049 TASK_17: --muted on the dark sheet layered over the pane was 3.61:1. */
    color: var(--text-2);
    text-align: center;
    font-size: 12.5px;
}

.split-form__caption {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-2);
    text-align: center;
}

/* File rows: a select button (aria-pressed) and a remove button; the selected row tinted --row-sel. */
.split-form__files {
    margin: 0;
    padding: 0;
    list-style: none;
}

.split-form__file {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--line);
}

.split-form__file--selected {
    background: var(--row-sel);
}

.split-form__file-select {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 8px 8px 16px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.split-form__file-icon {
    flex: none;
    color: var(--muted);
}

.split-form__file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.split-form__file-size {
    flex: none;
    font: 12px/1 var(--mono);
    color: var(--muted);
}

.split-form__file-rm {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.split-form__docs .split-form__file:not(.split-form__file--selected):hover {
    background: var(--row-h);
}

.split-form__docs .split-form__file-rm:hover {
    background: var(--panel-3);
    color: var(--text);
}

.split-form__docs .split-form__file-select:focus-visible,
.split-form__docs .split-form__file-rm:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

/* The page's upload control under the rows; .split-form__drop is the prototype's dashed drop button. */
.split-form__drop-slot {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
}

.split-form__drop {
    position: relative; /* hosts FileUploadZone's transparent file-input overlay (compact mode, I-046) */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 20px 16px;
    border: 1.5px dashed var(--border-2);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text-2);
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.split-form__drop b {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.split-form__drop small {
    font-size: 12.5px;
    color: var(--muted);
}

.split-form__docs .split-form__drop:hover {
    border-color: var(--ctl-bd-h);
    color: var(--text);
}

.split-form__docs .split-form__drop:focus-visible,
.split-form__docs .split-form__drop:has(:focus-visible),
.signed-act-stack .split-form__drop:has(:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* Section strip — sticky right under the shell header, translucent, scrolls sideways without a scrollbar. */
.split-form__strip {
    position: sticky;
    top: 56px;
    z-index: 2;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 2px;
    /* Prototype .ik-anchor, verbatim (I-049 TASK_26): padding: 8px 0; margin: -8px 0 10px — 48px tall over 32px links. */
    padding: 8px 0;
    margin: -8px 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    background: var(--hdr-bg);
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
}

.split-form__strip::-webkit-scrollbar {
    display: none;
}

/* I-062 TASK_10 (D9): links scrolled out of view fade at that edge (patterns.js enhanceStrip sets data-fade; none when
   every link fits). The mask's opaque stop is a token (only its alpha counts); revealStripLink keeps the current link
   clear of the --strip-fade band. */
.split-form__strip {
    --strip-fade: 48px;
}

.split-form__strip[data-fade="end"] {
    -webkit-mask-image: linear-gradient(to right, var(--bg) calc(100% - var(--strip-fade)), transparent);
    mask-image: linear-gradient(to right, var(--bg) calc(100% - var(--strip-fade)), transparent);
}

.split-form__strip[data-fade="start"] {
    -webkit-mask-image: linear-gradient(to right, transparent, var(--bg) var(--strip-fade));
    mask-image: linear-gradient(to right, transparent, var(--bg) var(--strip-fade));
}

.split-form__strip[data-fade="both"] {
    -webkit-mask-image: linear-gradient(to right, transparent, var(--bg) var(--strip-fade), var(--bg) calc(100% - var(--strip-fade)), transparent);
    mask-image: linear-gradient(to right, transparent, var(--bg) var(--strip-fade), var(--bg) calc(100% - var(--strip-fade)), transparent);
}

/* Classed anchors in a <nav>: I-041's global link underline skips them; the hover feedback is the strip's own. */
.split-form__strip .split-form__strip-link {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font: 600 13.5px/1 var(--font);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.split-form__strip .split-form__strip-link:hover,
.split-form__strip .split-form__strip-link[aria-current="true"] {
    background: var(--panel-3);
    color: var(--text);
}

.split-form__strip .split-form__strip-link:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.split-form__strip-circle {
    display: grid;
    flex: none;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--border-2);
    font: 600 10.5px/1 var(--mono);
    color: var(--muted);
}

.split-form__strip-check {
    font-size: 11px;
}

.split-form__strip-link--done .split-form__strip-circle {
    background: var(--ok-bg);
    box-shadow: inset 0 0 0 1px var(--ok-bd);
    color: var(--ok-ink);
}

.split-form__strip-link--error .split-form__strip-circle {
    background: var(--err-bg);
    box-shadow: inset 0 0 0 1px var(--err-bd);
    color: var(--err-ink);
}

/* The section's error count — the strip's own red badge (not AttentionBadge, which is teal "waits for you"). */
.split-form__strip-count {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--err-bd);
    border-radius: 10px;
    background: var(--err-bg);
    color: var(--err-ink);
    font: 700 11.5px/1 var(--font);
}

/* Sections in one surface; each is a strip target whose scroll-margin-top clears the header and the strip. */
.glass-card.split-form__sections {
    padding: 0;
}

.split-form__section {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 112px;
    outline: none;
}

.split-form__section:first-child {
    border-top: 0;
}

.split-form__sections .split-form__section:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.split-form__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font: 700 16px/1.3 var(--head);
    color: var(--text);
}

.split-form__section-n {
    font: 600 11.5px/1 var(--mono);
    color: var(--muted);
}

/* Field helpers a page's sections may use: the required marker, the field error text and the invalid field's border
   (AntD Input with aria-invalid; !important answers the overrides.css input border, one class more). */
.split-form__req {
    margin-left: 2px;
    color: var(--muted);
}

.split-form__error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--err-ink);
}

.split-form .split-form__section .ant-input[aria-invalid="true"] {
    border-color: var(--err) !important;
}

/* Busy (submitting): the field errors and the bar's error count hide (prototype .ikf.is-busy). */
.split-form--busy .split-form__error,
.split-form--busy .form-error,
.split-form--busy .ant-form-item-explain-error,
.split-form--busy .sticky-action-bar__error {
    display: none;
}

/* Loading: the pane and three sections as skeletons of the shared .pattern-skel bar. */
.glass-card.split-form__skel-docs {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.split-form__skel-title {
    width: 40%;
    height: 14px;
}

.split-form__skel-sheet {
    display: block;
    align-self: center;
    width: min(190px, 62%);
    aspect-ratio: 1 / 1.414;
    border-radius: 3px;
    background: var(--skel);
}

.split-form__skel-row {
    display: flex;
    align-items: center;
    height: 36px;
    border-top: 1px solid var(--line);
}

.split-form__skel-row .pattern-skel {
    width: 70%;
}

.split-form__section--skeleton {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.split-form__skel-field {
    width: 100%;
    height: 36px;
}

.split-form__skel-field + .split-form__skel-field {
    width: 60%;
}

@media (max-width: 999.98px) {
    .split-form__grid,
    .record-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .split-form__pane,
    .record-split__pane {
        position: static;
    }

    .split-form__preview,
    .split-form__skel-sheet {
        display: none;
    }
}

@media (max-width: 640px) {
    .split-form__section {
        padding: 18px 16px 20px;
    }
}

/* Native controls the pattern draws reach 44px at <=480px (AntD controls get theirs from the touch-target block). */
@media (max-width: 480px) {
    .split-form__strip .split-form__strip-link {
        height: 44px;
    }

    .split-form__file-rm {
        width: 44px;
        height: 44px;
        margin-right: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .split-form__strip .split-form__strip-link {
        transition: none;
    }
}

/* --- settings-layout --- */
/* A settings page (prototype .st / .st-tabs / .st-tab / .st-panel / .st-hd / .st-sec / .st-bar / .st-state): a vertical
   tab list 232px (208px <=1100px) beside one panel (a .glass-card, max 880px) holding the active tab's one form — the
   page's header, titled sections and the SettingsSaveBar (the shared sticky-action-bar, panel variant). The tabs stick
   at 76px (.st-tabs): 20px under the sticky shell header at the top of the scroll container (.content-layout). The selected tab is the primary tint (--pri-bg / --pri-ink) — "you are here"; an unsaved tab a --warn dot.
   <=700px the tabs are a horizontal strip with a 2px --pri underline on the selected tab. */
.settings-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* I-056 TASK_13 (review M3): the directory column (twelve links + the open page's sub-items) can outgrow a laptop viewport;
   a sticky box does not scroll with the page, so it scrolls itself — capped at the viewport below its 76px sticky top
   with a 16px foot, every link reachable and a focused link scrolled into view by the browser. */
.settings-layout__tabs {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-height: calc(100vh - 76px - 16px);
    overflow-y: auto;
}

.settings-layout__tab {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font: 600 14px/1.3 var(--head);
    color: var(--text-2);
    text-align: left;
    cursor: pointer;
}

/* The prototype's tab icon is 17px (U.icon(…, 17)); AntD's Icon is 1em. */
.settings-layout__tab-icon {
    flex: none;
    display: inline-flex;
    font-size: 17px;
    color: var(--muted);
}

.settings-layout__tab-label {
    flex: 1 1 auto;
    min-width: 0;
}

.settings-layout .settings-layout__tab:hover {
    background: var(--panel-3);
    color: var(--text);
}

/* The --pri-bg tint lies on the opaque --panel, so --pri-ink keeps >= 4.5:1 whatever the tab list sits on (light: 4.7:1). */
.settings-layout__tab[aria-selected="true"],
.settings-layout .settings-layout__tab[aria-selected="true"]:hover {
    background: linear-gradient(var(--pri-bg), var(--pri-bg)), var(--panel);
    color: var(--pri-ink);
}

.settings-layout__tab[aria-selected="true"] .settings-layout__tab-icon {
    color: var(--pri-ink);
}

.settings-layout .settings-layout__tab:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

/* I-056 TASK_08 (PLAN AD7, owner amendment): the column as the settings family's one navigation — the links take the
   tab's box and look (AntD's a / a:active colours never reach them), the open page (aria-current="page") the selected
   tint. The open page's own tabs are its sub-items, indented under its link on a --line rule; then the link keeps the
   plain ink and the selected sub-item alone carries the tint. */
.settings-layout a.settings-layout__tab {
    color: var(--text-2);
    text-decoration: none;
}

.settings-layout a.settings-layout__tab:hover {
    color: var(--text);
}

.settings-layout a.settings-layout__tab[aria-current="page"],
.settings-layout a.settings-layout__tab[aria-current="page"]:hover {
    background: linear-gradient(var(--pri-bg), var(--pri-bg)), var(--panel);
    color: var(--pri-ink);
}

.settings-layout a.settings-layout__tab[aria-current="page"] .settings-layout__tab-icon {
    color: var(--pri-ink);
}

.settings-layout a.settings-layout__tab--parent[aria-current="page"] {
    background: none;
    color: var(--text);
}

.settings-layout a.settings-layout__tab--parent[aria-current="page"]:hover {
    background: var(--panel-3);
    color: var(--text);
}

.settings-layout a.settings-layout__tab--parent[aria-current="page"] .settings-layout__tab-icon {
    color: var(--text);
}

.settings-layout__subtabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin-left: 20px;
    padding-left: 8px;
    border-left: 1px solid var(--line);
}

/* The unsaved marker (role="img", named Patterns.Settings.UnsavedMarker). */
.settings-layout__dirty {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warn);
}

/* The panel: the page's header and sections run edge to edge; the save bar is its bottom. */
.glass-card.settings-layout__panel {
    min-width: 0;
    max-width: 880px;
    padding: 0;
}

/* I-048 D18: a switch in a toolbar's filters keeps its label on one line — the toolbar's flex items are narrow. */
.data-table-toolbar__filters > .settings-layout__switch {
    flex: none;
    white-space: nowrap;
}

/* I-049 TASK_24: a radio-button group in the filters (/admin/postupci Сви / Активан / Неактиван, in its labelled
   role=group wrapper) is a segmented switch — its own width, never squeezed to a select's 158px and wrapped. */
.data-table-toolbar__filters > [role="group"]:has(> .ant-radio-group) {
    flex: none;
    min-width: 0;
    white-space: nowrap;
}

/* I-048 D18: the panel of a list page (API keys, data export) spans its container — a 950px table must not scroll inside
   the 880px a form panel keeps (the column-budget tests measure the table at 1440). */
.glass-card.settings-layout__panel.settings-layout__panel--wide {
    max-width: none;
}

.settings-layout__panel:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* The page's panel header: an h2 and a description. */
.settings-layout__head {
    padding: 20px 24px 18px;
}

.settings-layout__title {
    margin: 0;
    font: 700 19px/1.3 var(--head);
    color: var(--text);
}

.settings-layout__desc {
    margin: 4px 0 0;
    max-width: 72ch;
    font-size: 14px;
    line-height: 1.5; /* the prototype's body line height (.st-hd p inherits it); AntD's Form sets 1.5715 */
    color: var(--text-2);
}

/* I-048 D18: a panel head that also carries the panel's one action (API keys: „Нови кључ“, data export: „Покрени извоз“). */
.settings-layout__head--with-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-md);
}

.settings-layout__section {
    padding: 20px 24px 22px;
    border-top: 1px solid var(--line);
}

/* B-194 (#13): AntD pulls a field's help up into its bottom margin with a -24px "margin-offset" sibling, but a field
   here keeps only overrides.css's 20px margin — so every help line ran 4px into the next field, and a help of two or
   three lines sat on the next label with no gap. The help is in flow under its control instead (the prototype's
   .fi__hint) and the field's own margin spaces the next field — what .form-stack does for its fields; a settings
   section is no stack. Only a field with a help (AntD's .ant-form-item-with-help): a field without one still renders an
   empty 24px explain line, which the offset keeps hidden. AntD 1.6.0 also adds -with-help to a field while it shows a
   validation error (with -has-error), so an erroring field keeps the offset — AntD's own error layout. Two classes and
   !important: AntD sets the offset inline. */
.settings-layout__section .ant-form-item-with-help:not(.ant-form-item-has-error) .ant-form-item-margin-offset.ant-form-item-margin-offset {
    margin-bottom: 0 !important;
}

/* B-194 (#13, review 19708): the kept offset pulls the error line 24px under the field's box — 4px into the next
   field's label, and past a section's bottom border for its last field (E2E WorkflowSettings_FieldError_…). The
   erroring field gives the line back its room below the offset, so the error clears what is under it, and a field
   whose help turns into its error (Help = error ?? help) keeps its height. */
.settings-layout__section .ant-form-item-with-help.ant-form-item-has-error {
    padding-bottom: var(--space-lg);
}

/* The section title composes .group-label (uppercase, --text-2) with the prototype's .st-sec h3 type, verbatim. */
.settings-layout__section .settings-layout__section-title {
    margin: 0 0 14px 1px;
    font: 700 11.5px/1 var(--head);
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--text-2);
}

/* Read-only values of a section (a <dl> of label / value pairs in two columns). */
.settings-layout__values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px var(--space-lg);
    margin: 0;
}

.settings-layout__values dt {
    font-size: 13px;
    color: var(--text-2);
}

.settings-layout__values dd {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--text);
}

/* I-049 TASK_14: tags of a read-only value (/profile roles) wrap with a gap; a list of values (/profile organisational
   units) stacks without bullets. */
.settings-layout__values dd.settings-layout__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.settings-layout__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.settings-layout__list > li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

/* A number field keeps a short width (AntD's InputNumber is 90px by default). */
.settings-layout .settings-layout__num {
    width: 100%;
    max-width: 168px;
}

/* A settings form's required mark and its help / error lines are the global form rules of overrides.css (§ Form Item
   Overrides — I-062 TASK_13 promoted TASK_10's settings-only copies). */

/* A switch with its state label beside it (design.md § Switch labels). */
.settings-layout__switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

/* The save bar = the prototype's .st-bar on the shared sticky-action-bar (panel variant): z-index 5, gap 8px 12px, the
   panel's 12px bottom corners; <=700px padding 12px 16px (over the shared <=640px 10px 16px). */
.sticky-action-bar.settings-save-bar {
    z-index: 5;
    gap: 8px 12px;
    border-radius: 0 0 12px 12px;
}

/* The save bar's status = the prototype's .st-state: 13.5px --muted, --warn-ink 600 while unsaved (the „·“ before the
   error count takes it too), a 15px --ok-ink check after a save, --err-ink for the error count. */
.settings-save-bar__state {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    font-size: 13.5px;
}

.settings-save-bar__state--dirty {
    font-weight: 600;
    color: var(--warn-ink);
}

.settings-save-bar__state--saved {
    color: var(--muted);
}

/* After a save the focus moves to the saved status (a disabled Save cannot keep it). */
.settings-save-bar .settings-save-bar__state:focus {
    outline: none;
}

.settings-save-bar .settings-save-bar__state:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.settings-save-bar__dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warn);
}

.settings-save-bar__error {
    font-weight: 600;
    color: var(--err-ink);
}

.settings-save-bar__ok {
    display: inline-flex;
    font-size: 15px;
    color: var(--ok-ink);
}

/* Error: the error face in the panel's width. */
.settings-layout__error {
    grid-column: 1 / -1;
    max-width: 880px;
}

/* I-056 TASK_13 (review L5): in the directory the error face takes the panel's place beside the column — the column
   stays, so a failed load never leaves the user without the settings links. */
.settings-layout__tabs ~ .settings-layout__error {
    grid-column: auto;
}

/* Loading: skeleton tabs and a panel of skeleton fields of the shared .pattern-skel bar. */
.settings-layout__tab--skeleton {
    cursor: default;
}

.settings-layout__skel-icon {
    flex: none;
    width: 16px;
    height: 16px;
}

.settings-layout__skel-label {
    width: 60%;
}

.settings-layout__panel--skeleton .settings-layout__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-layout__skel-title {
    width: 40%;
    height: 18px;
}

.settings-layout__skel-desc {
    width: 58%;
    margin-top: 10px;
}

.settings-layout__skel-field {
    width: 100%;
    height: 36px;
}

.settings-layout__skel-field + .settings-layout__skel-field {
    width: 60%;
}

@media (max-width: 1100px) {
    .settings-layout {
        grid-template-columns: 208px minmax(0, 1fr);
        gap: 20px;
    }

    .settings-layout__section .form-grid,
    .settings-layout__values {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .settings-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .sticky-action-bar.settings-save-bar {
        padding: 12px 16px;
    }

    .settings-layout__tabs {
        position: static;
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        scrollbar-width: none;
        border-bottom: 1px solid var(--border);
    }

    .settings-layout__tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-layout__subtabs {
        flex-direction: row;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .settings-layout__tab {
        flex: none;
        width: auto;
        min-height: 42px;
        margin-bottom: -1px;
        padding: 10px 12px 11px;
        border-bottom: 2px solid transparent;
        border-radius: 6px 6px 0 0;
        white-space: nowrap;
    }

    .settings-layout .settings-layout__tab:hover {
        background: transparent;
    }

    .settings-layout__tab[aria-selected="true"],
    .settings-layout .settings-layout__tab[aria-selected="true"]:hover {
        background: transparent;
        color: var(--text);
        border-bottom-color: var(--pri);
    }

    .settings-layout__tab[aria-selected="true"] .settings-layout__tab-icon {
        color: var(--text);
    }

    .settings-layout__tab--skeleton {
        width: 120px;
    }

    .settings-layout__head,
    .settings-layout__section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .settings-save-bar .sticky-action-bar__actions {
        flex: 1 1 100%;
    }

    .settings-save-bar .sticky-action-bar__actions > * {
        flex: 1 1 auto;
    }

    .settings-save-bar .sticky-action-bar__actions > .ant-btn-primary {
        flex-grow: 2;
    }
}

/* Native tab buttons reach 44px at <=480px (the save bar's AntD buttons get theirs from the touch-target block). */
@media (max-width: 480px) {
    .settings-layout__tab {
        min-height: 44px;
    }
}

/* /settings/paket (I-049 TASK_14): promoted from the deleted Paket.razor.css (the settings-layout-page archetype allows no
   scoped CSS). Quota meters and feature rows inside the one read-only panel; the back button reads in secondary text. */
.page-header .back-button {
    color: var(--text-2);
}

.paket-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.paket-meter-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.paket-meter-value {
    font-size: 0.875rem;
}

.paket-feature-row {
    display: flex;
    flex-wrap: wrap; /* I-008 (D8): name + source tag + state tag wrap inside the card at 390px */
    gap: var(--space-xs) var(--space-sm);
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}

.paket-feature-row:last-child {
    border-bottom: 0;
}

.paket-feature-label {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    align-items: center;
    gap: var(--space-sm);
}

/* --- bare-layout --- */
/* BareLayout (prototype .bare / .ob-top / .ob-wrap): no sider, no shell header — a slim top bar (64px, sticky at the top of
   .bare-layout, which is what scrolls in this layout; translucent --hdr-bg + blur, a --line rule) with the page's organ
   row left and PisMark, the exit link and the script toggle right, then the page's content (its .page-wrapper as the
   prototype's .ob-wrap: max 1200px centred, padding 32/28, 20/16 on a phone). The bar is themed — it follows dark / light, unlike the
   sider's dark island: I-039's OrganContext is reused unchanged and reads the themed tokens through the --sd-*
   properties re-pointed on .bare-layout__context (its subtree only); three contextual rules drop the sider box, size the
   logo box with I-039's --lb hook and hide the overlay close button (the bar has no overlay). */
/* The root is the layout's one scroll container (MainLayout's model: html, body and #app never scroll — overflow:
   hidden, height 100% — and one element inside them does; there .content-layout, here the root, so the top bar and
   the wizard rail stick inside it). A min-height alone would grow the root past the viewport into #app's clipped
   overflow, where no wheel or touch can reach (PR !656 IR1). */
/* scroll-padding-top: focus scrolling and scrollIntoView stop below the sticky top bar, never under it (I-056 TASK_13,
   review M1 — onboarding step 2's unit tree). */
.bare-layout {
    --bare-layout-top-h: 64px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    scroll-padding-top: var(--bare-layout-top-h);
    background: radial-gradient(900px 520px at 82% -14%, var(--glow), transparent 70%), var(--bg);
}

.bare-layout__top {
    position: sticky;
    top: 0;
    z-index: 5;
    flex: none;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: var(--bare-layout-top-h);
    padding: 10px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--hdr-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* The organ row in a themed bar: the sider's dark-island properties point at the themed ones here. */
.bare-layout__context {
    --sd-strong: var(--text);
    --sd-muted: var(--muted);
    --sd-text: var(--text-2);
    --sd-hover: var(--row-h);
    --sd-bd: transparent;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.bare-layout__context .sd-top {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-bottom: 0;
}

.bare-layout__context .logo-box {
    --lb: 40px;
}

.bare-layout__context .sd-close {
    display: none;
}

.bare-layout__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    margin-left: auto;
}

/* The prototype's .ob-sep between the mark and „Ћир | Lat“ (F-266 TASK_07). */
.bare-layout__sep {
    flex: none;
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: var(--border);
}

/* The exit link: a quiet text link with an icon; it underlines on hover like every text link (I-041). */
.bare-layout__exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
}

.bare-layout .bare-layout__exit:hover {
    background: var(--row-h);
    color: var(--text);
    text-decoration: underline;
}

.bare-layout .bare-layout__exit:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.bare-layout__main {
    flex: 1 0 auto;
}

/* Skip-link target only (tabindex=-1, never a Tab stop): no focus box around the whole content (as .content-wrapper). */
.bare-layout__main:focus {
    outline: none;
}

/* The page's .page-wrapper is the prototype's .ob-wrap (I-049 TASK_22, PLAN LP7): the onboarding column, 1200px centred,
   padding 32px 28px 56px (20px 16px 40px at <= 640px, below) — the bar is the only chrome above it, so no shell-header
   arithmetic. The only centred column of the App: MainLayout's content box is left-aligned. */
.bare-layout__main .page-wrapper {
    width: 100%;
    max-width: 1200px;
    min-height: 0;
    margin: 0 auto;
    padding: 32px 28px 56px;
}

@media (max-width: 640px) {
    .bare-layout__top {
        gap: 10px;
        padding: 10px 16px;
    }

    .bare-layout__context .sd-org__sub,
    .bare-layout__top .pmark span,
    .bare-layout__exit-text {
        display: none;
    }

    .bare-layout__exit {
        min-width: 34px;
        padding: 0;
    }

    .bare-layout__main .page-wrapper {
        padding: 20px 16px 40px;
    }
}

/* The exit link reaches 44px at <=480px (the script toggle's Segmented gets its size from the touch-target block). */
@media (max-width: 480px) {
    .bare-layout__exit {
        min-width: 44px;
        min-height: 44px;
    }
}

/* --- wizard-shell --- */
/* WizardShell + WizardStepRail (prototype .ob-hd / .ob-prog / .ob-grid / .ob-rail / .ob-st* / .ob-node / .ob-step*): the
   header (title, subtitle, a 240px progress block), then the rail (272px, sticky) beside one step panel (gap 28px). The
   rail sticks 28px under the bare layout's top bar (--bare-layout-top-h, declared by .bare-layout: 64 + 28 = 92, the
   prototype's .ob-rail); inside MainLayout the property is undefined and the rail sticks 28px under the sticky shell
   header (--shell-header-h, I-056 TASK_02). Nodes: open --border-2 / --bg-2, done the ok tones with a check, current --text / --bg with a
   --neu-bg halo; connectors 1.5px --border-2 (--ok-bd after a done step); the current row --row-sel. The progress bar
   is neutral (--text-2), not the global brand gradient. Below 1000px (the shell's 999.98px query) the rail runs
   horizontally above the panel — numbers and the current title —, <=640px numbers only and the footer buttons full width. */
.wizard-shell {
    min-width: 0;
}

/* I-056 TASK_09 (PLAN AD12): inside MainLayout the in-app wizard (head + grid) is capped like the prototype's .ob-wrap
   inner box — max 1200px less 2 × 28px padding = 1144px (.ob-hd and .ob-grid both sit inside .ob-wrap) — left-aligned
   in the content box (no auto margins: MainLayout's columns are never centred, I-049 LP3). The bare layout's
   onboarding wizard already sits in the .ob-wrap column (.bare-layout__main .page-wrapper) and is not matched here. */
.page-wrapper[data-pattern="app-wizard-page"] .wizard-shell {
    max-width: 1144px;
}

.wizard-shell__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 32px;
}

.wizard-shell__heading {
    flex: 1 1 420px;
    min-width: 0;
}

.wizard-shell .wizard-shell__title {
    margin: 0;
}

.wizard-shell__subtitle {
    max-width: 64ch;
    margin-top: 4px; /* the prototype's .page-sub (.ob-hd .page-sub only sets the 64ch measure) */
}

.wizard-shell__progress {
    flex: 0 0 240px;
    min-width: 0;
}

/* The prototype's .prog (6px, radius 3, --panel-3 track; the bar's 6px is the Progress StrokeWidth) and .prog__cap
   (6px below, 12.5px on the body line height, --muted) — I-049 TASK_27, LP13. */
.wizard-shell__progress .ant-progress {
    display: block;
    margin: 0;
    line-height: 1;
}

.wizard-shell__progress .ant-progress-outer {
    display: block;
    margin: 0;
    padding: 0;
}

.wizard-shell__progress .ant-progress-inner {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--panel-3);
    overflow: hidden;
}

.wizard-shell__progress .ant-progress-bg {
    border-radius: 3px;
}

.wizard-shell__progress-caption {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
}

.wizard-shell__grid {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 28px;
}

.glass-card.wizard-shell__rail {
    position: sticky;
    top: calc(var(--bare-layout-top-h, var(--shell-header-h)) + 28px);
    min-width: 0;
    padding: 8px;
}

.wizard-shell__steps {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wizard-shell__step {
    position: relative;
}

/* The connector from a node down to the next one. */
.wizard-shell__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 42px;
    bottom: -6px;
    left: 23px;
    width: 1.5px;
    border-radius: 1px;
    background: var(--border-2);
    pointer-events: none;
}

.wizard-shell__step--done:not(:last-child)::after {
    background: var(--ok-bd);
}

.wizard-shell__step-button {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s;
}

.wizard-shell .wizard-shell__step-button:hover {
    background: var(--row-h);
}

.wizard-shell__step-button[aria-current="step"],
.wizard-shell .wizard-shell__step-button[aria-current="step"]:hover {
    background: var(--row-sel);
}

.wizard-shell .wizard-shell__step-button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.wizard-shell__node {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    grid-row: span 2;
    align-self: start;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--border-2);
    border-radius: 50%;
    background: var(--bg-2);
    font: 700 12.5px/1 var(--head);
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.wizard-shell__step--done .wizard-shell__node {
    border-color: var(--ok-bd);
    background: var(--ok-bg);
    color: var(--ok-ink);
}

.wizard-shell__step--current .wizard-shell__node {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 0 0 4px var(--neu-bg);
}

.wizard-shell__step-name {
    min-width: 0;
    font: 600 14px/1.3 var(--head);
    color: var(--text-2);
}

.wizard-shell__step--current .wizard-shell__step-name {
    font-weight: 700;
    color: var(--text);
}

.wizard-shell__step-status {
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--muted);
}

.wizard-shell__step--done .wizard-shell__step-status {
    color: var(--ok-ink);
}

/* The step panel: head (kicker, title + tag, description), body, footer — edge to edge inside the card. */
.glass-card.wizard-shell__panel {
    min-width: 0;
    padding: 0;
}

.wizard-shell__panel-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
}

/* The prototype's .ob-step__k, verbatim (the kicker composes .group-label for its role; the type is the prototype's). */
.wizard-shell .wizard-shell__kicker {
    margin: 0;
    font: 700 11px/1 var(--head);
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--muted);
}

.wizard-shell__panel-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.wizard-shell__panel-title {
    margin: 0;
    font: 700 21px/1.25 var(--head);
    color: var(--text);
}

/* Focused by script on a step change (tabindex="-1") so it is announced — not a Tab stop, no ring. */
.wizard-shell .wizard-shell__panel-title:focus {
    outline: none;
}

.wizard-shell__panel-desc {
    max-width: 70ch;
    margin: 6px 0 0;
    font-size: 14.5px;
    color: var(--text-2);
}

.wizard-shell__body {
    display: grid;
    gap: 20px;
    min-width: 0;
    padding: 20px 24px 24px;
}

.wizard-shell__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--line);
}

.wizard-shell__error {
    margin-top: 28px;
}

/* Loading: rail rows and a panel of the shared .pattern-skel bar. */
.glass-card.wizard-shell__rail--skeleton {
    display: flex;
    flex-direction: column;
}

.wizard-shell__skel-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    padding: 10px;
}

.wizard-shell__skel-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.wizard-shell__skel-name {
    width: 70%;
}

.wizard-shell__panel--skeleton .wizard-shell__panel-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wizard-shell__skel-kicker {
    width: 22%;
    height: 10px;
}

.wizard-shell__skel-title {
    width: 46%;
    height: 20px;
}

.wizard-shell__skel-desc {
    width: 70%;
}

.wizard-shell__skel-field {
    width: 100%;
    height: 36px;
}

.wizard-shell__skel-field + .wizard-shell__skel-field {
    width: 60%;
}

.wizard-shell__skel-bar {
    width: 100%;
    height: 8px;
}

.wizard-shell__skel-caption {
    width: 40%;
    height: 10px;
    margin-top: 9px;
}

/* The prototype's .ob-grid collapses at max-width 1000px (not the shell's 999.98px) — I-049 TASK_32. */
@media (max-width: 1000px) {
    .wizard-shell__progress {
        flex-basis: 100%;
    }

    .wizard-shell__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-top: 20px;
    }

    .glass-card.wizard-shell__rail {
        position: static;
        padding: 6px;
        overflow-x: auto;
    }

    .wizard-shell__steps {
        flex-direction: row;
        justify-content: space-between;
        gap: 2px;
    }

    .wizard-shell__step {
        flex: none;
    }

    .wizard-shell__step:not(:last-child)::after {
        display: none;
    }

    .wizard-shell__step-button {
        grid-template-columns: 28px auto;
        column-gap: 8px;
        padding: 8px 10px 8px 8px;
    }

    .wizard-shell__node {
        grid-row: auto;
        align-self: center;
    }

    .wizard-shell__step-status {
        display: none;
    }

    .wizard-shell__step-name {
        font-size: 13.5px;
        white-space: nowrap;
    }

    .wizard-shell__step:not(.wizard-shell__step--current) .wizard-shell__step-button {
        grid-template-columns: 28px;
    }

    .wizard-shell__step:not(.wizard-shell__step--current) .wizard-shell__step-name {
        display: none;
    }

    .glass-card.wizard-shell__rail--skeleton {
        flex-direction: row;
        justify-content: space-between;
    }

    .wizard-shell__skel-row {
        grid-template-columns: 28px;
        padding: 8px;
    }

    .wizard-shell__skel-name {
        display: none;
    }
}

@media (max-width: 640px) {
    .wizard-shell__step-button,
    .wizard-shell__step:not(.wizard-shell__step--current) .wizard-shell__step-button {
        grid-template-columns: 28px;
        padding: 8px;
    }

    .wizard-shell__step-name {
        display: none;
    }

    .wizard-shell__panel-head {
        padding: 18px 16px 14px;
    }

    .wizard-shell__body {
        padding: 16px;
    }

    .wizard-shell__footer {
        padding: 12px 16px;
    }

    .wizard-shell__footer > *,
    .wizard-shell__footer .ant-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Native step buttons reach 44px at <=480px (the footer's AntD buttons get theirs from the touch-target block). */
@media (max-width: 480px) {
    .wizard-shell__step-button {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wizard-shell__step-button {
        transition: none;
    }
}

/* --- decision-modal --- */
/* DecisionModal (prototype .dlg / .dlg__hd / .dlg__ic / .dlg__bd / .dlg__ft, .dm-body / .dm-facts, .fcount): the root
   class sits on the AntD Modal's WrapClassName. The panel's surface (--float), border, radius, --shadow, the mask, the
   close button and the dialog's body and footer padding keep their global rules (overrides.css "Modal/Drawer
   Overrides" — every Modal is the prototype's dialog since I-062 TASK_12); this block lays out the pattern's own parts
   — each AntD rule one class more than the overrides.css rule it answers, !important only where that rule is. Header:
   a 32px icon circle (--panel-3 / --text-2; warn tones in Blocked) + the 18/700 title, so the head starts at 18px (the
   icon sets its height; a plain title starts at 21). Body: a 14px grid of the 14.5/1.5 sentence, the bordered facts
   list (124px labels, one column <=640px) and the note with its mono counter. Motion only on open (AntD's zoom),
   none under reduced motion. */
.decision-modal .ant-modal-header {
    padding: 18px 56px 4px 20px !important;
}

.decision-modal__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.decision-modal__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--panel-3);
    color: var(--text-2);
    font-size: 16px;
}

.decision-modal__icon--warn {
    background: var(--warn-bg);
    color: var(--warn-ink);
}

.decision-modal .decision-modal__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding-top: 3px;
    font: 700 18px/1.35 var(--head);
    color: var(--text);
    outline: none;
}

.decision-modal__body {
    display: grid;
    gap: 14px;
}

.decision-modal .decision-modal__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.decision-modal__alert .ant-alert {
    margin: 0;
}

.decision-modal__facts {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.decision-modal__fact {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 2px 12px;
    padding: 9px 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--text);
}

.decision-modal__fact:first-child {
    border-top: 0;
}

.decision-modal__fact dt {
    padding-top: 1px;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.decision-modal__fact dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

/* A value of several parts (an act title and its tags) */
.decision-modal__inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.decision-modal__facts b,
.decision-modal__facts strong {
    font-weight: 600;
}

.decision-modal__facts .case-id {
    font-size: 12.5px;
    white-space: normal;
}

.decision-modal__facts .case-id__k,
.decision-modal__facts .case-id__f {
    white-space: nowrap;
}

/* CF-114 TASK_17: under a delovodni broj the identifier stays the smaller second line (Спој .dvn .cid--sub). */
.decision-modal__facts .case-id--sub {
    font-size: .8em;
}

.decision-modal__note {
    display: grid;
    gap: 6px;
}

.decision-modal__note-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
}

.decision-modal__counter {
    justify-self: end;
    font: 12px/1 var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

/* Cancel / Close left, the one primary right; the gap replaces AntD's margin between footer buttons. */
.decision-modal .ant-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.decision-modal .ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
    margin-left: 0;
}

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

    .decision-modal .ant-modal-footer .ant-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .decision-modal .ant-modal {
        animation: none !important;
    }
}

/* === Home desk (I-044) === */
/* The role desk's page-level classes (catalog layout desk-page, molecule aside-panel; ported from the prototype's
   .summary / .home-grid / .home-aside / .ap__* / .arow* / .wl__* / .qa / .os* rules). Tokens only, no scoped CSS. The
   figures row, the band list and its row cells are I-043's (block above) and are not restyled here — a desk row adds
   only .desk-row__sub and its "when" text .desk-when. Breakpoints: the existing 1100px (one column, the aside in a grid of its own) and 640px. */

/* --- desk-page --- */
/* The one sentence about deadlines under the page header; its two counts link to their band header. */
.home-summary {
    max-width: 72ch;
    margin: 14px 0 0;
    font-size: 1.03125rem;
    line-height: 1.5;
    color: var(--text-2);
}

.home-summary__link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    border-radius: 3px;
}

.home-summary__link--err,
.home-summary__link--err:hover {
    color: var(--err-ink);
}

.home-summary__link--warn,
.home-summary__link--warn:hover {
    color: var(--warn-ink);
}

/* Loading: two skeleton lines in place of the sentence */
.home-summary--skeleton {
    display: grid;
    gap: 8px;
    max-width: 640px;
}

.home-summary__skel {
    height: 14px;
}

.home-summary__skel:first-child {
    width: 92%;
}

.home-summary__skel:last-child {
    width: 58%;
}

/* The desk beside the 320px aside; one column for the empty and error faces (no aside). */
.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 28px;
    margin-top: 26px;
}

.home-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.home-desk {
    min-width: 0;
}

/* The queue's title and, right-aligned, the По року | По кораку switch (SavedViewSwitch). */
.home-desk__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    margin-bottom: 4px;
}

.home-desk__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.home-desk__switch {
    margin-left: auto;
}

.home-desk__skel-title {
    width: 140px;
    height: 16px;
}

/* The right column: one panel per role block, then notifications. */
.home-aside {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
}

/* --- aside-panel --- */
/* A panel of the aside — the band list's panel recipe: the prototype's .panel, --panel (F-266 TASK_03: --glass-bg is
   --panel-2, a sub-surface tone that only matched dark within the colour tolerance). */
.aside-panel {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    overflow: clip;
}

/* The panel heading — the .group-label scale (F-264 tokens), --text-2; the display font is the global h2's. */
.aside-panel__hd {
    margin: 0;
    padding: 14px 16px 10px;
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-label);
    letter-spacing: var(--font-tracking-label);
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-2);
}

.aside-panel__sub {
    margin: -2px 0 0;
    padding: 0 16px 12px;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* I-049 (TASK_07): a panel whose body is a control, not a ruled list (the org tree comparison): the heading's gutter. */
.aside-panel__body {
    padding: 0 16px 16px;
}

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

.aside-panel__list > li {
    border-top: 1px solid var(--line);
}

/* Loading: a skeleton panel of bars */
.aside-panel--skeleton {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.aside-panel__skel:first-child {
    width: 40%;
    height: 10px;
}

.aside-panel__skel:last-child {
    width: 80%;
}

/* A ruled row of a panel: label (+ sub line) and a tabular figure on the right. */
.aside-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--text);
}

.aside-row--top {
    align-items: flex-start;
}

.aside-row__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aside-row__label--wrap {
    white-space: normal;
}

.aside-row__sub {
    display: block;
    overflow: hidden;
    font-size: 0.78125rem;
    font-weight: 400;
    color: var(--muted);
    text-overflow: ellipsis;
}

.aside-row__n {
    flex: none;
    font-size: 0.84375rem;
    font-weight: 600;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

/* A notification's unread dot (AttentionBadge Dot) column and its mono time stamp. */
.aside-row__dot {
    display: flex;
    flex: none;
    width: 8px;
    margin-top: 6px;
}

.aside-row__time {
    display: block;
    margin-top: 2px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Workload: the handler's initials and the missed-deadline count. */
.workload__avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--panel-3);
    font-family: var(--head);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-2);
}

.workload__overdue {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 3px;
    font-size: 0.78125rem;
    font-weight: 600;
    line-height: 1;
    color: var(--err-ink);
    font-variant-numeric: tabular-nums;
}

/* Quick start: stacked 36px default buttons, left-aligned, the channel icon in --text-2. */
.quick-start {
    display: grid;
    gap: 8px;
    padding: 0 16px 16px;
}

.quick-start .ant-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 36px;
}

.quick-start .ant-btn .anticon {
    color: var(--text-2);
}

/* Organ state: a warning (or the all-clear) row — icon, title over its explanation, then the action. */
.organ-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px 16px;
}

.organ-check__icon {
    padding-top: 1px;
}

.organ-check__icon--warn {
    color: var(--warn-ink);
}

.organ-check__icon--ok {
    color: var(--ok-ink);
}

.organ-check__text {
    min-width: 0;
}

.organ-check__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.organ-check__meta {
    display: block;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.organ-check__action {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
}

/* The row variant (prototype .os--row — the /archival/dashboard attention list): the action at the row's end. */
.organ-check--row {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
}

.organ-check--row .organ-check__icon {
    padding-top: 0;
}

.organ-check--row .organ-check__action {
    grid-column: 3;
    grid-row: 1;
    margin-top: 0;
}

/* A notification's text and time are one bare button (prototype .lnk) to its target; unread text in 500. */
.aside-row__action {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.aside-row__action:hover .aside-row__text {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.aside-row__action:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.aside-row--unread .aside-row__text {
    font-weight: 500;
}

/* --- desk row --- */
/* A desk row's emphasised first meta part (prototype .qr__sub); the row cells are I-043's .band-list__*. */
.desk-row__sub {
    color: var(--text-2);
}

/* A desk row's "when" (prototype .qr__when, I-062 D2): plain text in its tone — no chip, no frame, no dot — for a case
   deadline (DeadlineIndicator Desk) and any other row's state alike. It stays on one line (I-044 TASK_14): the column
   below grows to the text („Прекорачен рок за завођење") and the title cell truncates instead. */
.desk-when {
    font: 600 0.78125rem/16px var(--font);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.desk-when--err {
    color: var(--err-ink);
}

.desk-when--warn {
    color: var(--warn-ink);
}

.desk-when--ok {
    color: var(--ok-ink);
}

.desk-when--info {
    color: var(--info-ink);
}

.desk-when--attention {
    color: var(--attn-ink);
}

.desk-when--neutral {
    color: var(--text);
}

.desk-when--muted {
    color: var(--muted);
}

@media (min-width: 641px) {
    .home-desk .band-list__row {
        grid-template-columns: 8px minmax(0, 1fr) minmax(148px, max-content) 104px;
    }
}

/* --- breakpoints --- */
@media (max-width: 1100px) {
    .home-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-aside {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        align-items: start;
    }
}

@media (max-width: 640px) {
    .home-summary {
        font-size: 0.96875rem;
    }
}

/* === Command palette (I-040) === */
/* --- command-palette --- */
/* CommandPalette (prototype .cmdk / .cmd / .cmd__*, kbd): the header trigger .cmdk and the palette, an AntD Modal whose
   WrapClassName is .cmd. The panel's surface (--float), border and --shadow and the --scrim mask keep their global
   rules (overrides.css "Modal/Drawer Overrides"); every AntD rule here carries .cmd, so no other modal changes. The
   /design-system copies are div.cmd > .ant-modal-content in the page flow, so the placement rules sit under
   .ant-modal-wrap.cmd (the live wrap) only. Selection is neutral (--panel-3), never the primary or attention colour.
   Motion only on open (AntD's zoom, shortened), none under reduced motion. */
.cmdk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 440px;
    width: min(440px, 100%);
    min-width: 0;
    height: 36px;
    padding: 0 8px 0 12px;
    border: 1px solid var(--ctl-bd);
    border-radius: 9px;
    background: var(--ctl-bg);
    color: var(--muted);
    font: 400 14px/1 var(--font);
    text-align: left;
    cursor: pointer;
}

.cmdk:hover {
    border-color: var(--ctl-bd-h);
}

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

.cmdk__ph {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The shortcut hints: the trigger's ⌘K, the input's Esc and the footer's keys — and the band list's keyboard hint
   (I-062 D2): the prototype's one kbd rule */
.cmdk kbd,
.cmd kbd,
.band-list__kbd kbd {
    flex: none;
    padding: 3px 6px;
    border: 1px solid var(--border-2);
    border-radius: 5px;
    background: var(--panel-2);
    color: var(--muted);
    font: 500 11.5px/1 var(--mono);
}

/* Live placement: 10vh from the top, no AntD bottom padding (the panel width is the Modal's Width, 640) */
.ant-modal-wrap.cmd .ant-modal {
    top: 10vh;
    padding-bottom: 0;
}

.ant-modal-wrap.cmd .ant-modal:is(.ant-zoom-enter, .ant-zoom-appear) {
    animation-duration: .14s;
}

/* color: AntD's light-theme rgba(0,0,0,.85) would otherwise be what any row without its own colour inherits */
.cmd .ant-modal-content {
    overflow: hidden;
    color: var(--text);
}

/* The header only names the dialog (AntD 1.6.0's Modal takes no aria-label): the .visually-hidden recipe */
.cmd .ant-modal-header {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
}

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

.cmd__in {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 18px;
}

.cmd__in:focus-within {
    box-shadow: inset 0 -2px 0 var(--focus);
}

.cmd__in input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: 400 16px/1 var(--font);
    outline: none;
}

.cmd__in input::placeholder {
    color: var(--muted);
}

.cmd__list {
    max-height: min(440px, 58vh);
    margin: 0;
    padding: 4px 0 8px;
    overflow-y: auto;
    list-style: none;
}

/* A headed group (role="group", named by its heading) holds its options in a nested list */
.cmd__grp,
.cmd__grp-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Group heading — the F-264 .group-label look in --muted */
.cmd__g {
    padding: 12px 18px 6px;
    font-family: var(--font-display);
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-label);
    letter-spacing: var(--font-tracking-label);
    line-height: 1;
    text-transform: uppercase;
    color: var(--muted);
}

.cmd__o {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 8px 18px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}

.cmd__o > .anticon {
    flex: none;
    color: var(--muted);
    font-size: 16px;
}

.cmd__o[aria-selected="true"] {
    background: var(--panel-3);
}

.cmd__o[aria-selected="true"] > .anticon {
    color: var(--text);
}

/* A case row: the full identifier (12px, as in a table cell) over the party · status line */
.cmd__txt {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cmd__o .case-id {
    font-size: 12px;
}

.cmd__sub {
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmd__none {
    padding: 22px 18px;
    color: var(--muted);
    font-size: 14px;
}

/* Searching (a spinner) and failed (an --err-ink icon) rows of the Предмети group; not options */
.cmd__state {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 8px 18px;
    color: var(--muted);
    font-size: 14px;
}

.cmd .cmd__state .ant-spin {
    display: inline-flex;
    flex: none;
}

.cmd__state--err {
    color: var(--text-2);
}

.cmd__state--err > .anticon {
    flex: none;
    color: var(--err-ink);
    font-size: 16px;
}

.cmd__ft {
    display: flex;
    gap: 16px;
    padding: 9px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.cmd__ft span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ≤640px: the trigger is a 36px icon button; the palette spans the width minus 16px gutters */
@media (max-width: 640px) {
    .cmdk {
        flex: none;
        justify-content: center;
        width: 36px;
        padding: 0;
    }

    .cmdk__ph,
    .cmdk kbd {
        display: none;
    }

    .ant-modal-wrap.cmd .ant-modal {
        top: 8vh;
        width: calc(100% - 32px) !important;
        max-width: none;
        margin: 0 auto;
    }
}

/* ≤480px: the shell's touch-target rule (as .uchip, .bell) */
@media (max-width: 480px) {
    .cmdk {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ant-modal-wrap.cmd .ant-modal {
        animation: none !important;
    }
}

/* --- i049-pisar-queues --- */
/* ===== I-049 TASK_05 — pisar queues on the data-table-page archetype (rules the deleted page CSS carried) ===== */
/* The pager row under a DataTableFrame (was a scoped copy per list page). */
.pagination-row {
    display: flex;
    justify-content: center;
    padding: var(--space-md) 0;
}

/* A list whose rows open on click (OnRowClick): the frame is given this class; other tables keep the default cursor. */
.data-table--clickable .ant-table-tbody > tr.ant-table-row {
    cursor: pointer;
}

/* The row actions of a dispatch / dopuna table: buttons side by side, never wrapping inside the pinned cell. */
.table-action-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-sm);
}

/* I-049 TASK_32: the row-actions cell's content is the prototype's .act (display flex, gap 4px, justify-content flex-end) —
   the last action sits on the cell's 10px right padding whatever precedes it (/predmeti's approval icon, the two or three
   buttons of /approvals, /overdue, /dopune), as on #cases. */
.glass-card.data-table td.dt-col--actions > .table-action-group {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

/* The two post sections of the Књига отпреме register (I-049 TASK_24, PLAN LP13): the prototype's .blk / .blk__h,
   verbatim — the heading above each flush panel (display flex, gap 8px, margin 0 0 10px 2px, 700 11.5px/1 var(--head),
   letter-spacing .085em, uppercase, --text-2), .blk + .blk 24px. */
.register-section + .register-section {
    margin-top: 24px;
}

.register-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 2px;
    font: 700 11.5px/1 var(--head);
    letter-spacing: 0.085em;
    text-transform: uppercase;
    color: var(--text-2);
}

/* ===== CF-117 — unseen rows („Ново и измењено“): /predmeti, /submissions, /submissions/unclassified =====
   The prototype's tr.nv-unseen in tokens — attention means new / unhandled only (D_API): a 3px --attn inset on the row's
   first cell, AttentionBadge's dot (.attn-dot, followed by its sr-only „Ново.“) before the number — in the identifier
   cell's left gutter on the case list (.cell2 > .nv-dot: left -9px, top 6px), inline 7px before the number on the
   submission lists (.tc-q .nv-dot) — and the row's lead text in --text: the case title and the party 600, the
   submission number 700. is-unseen is set only from the Api's HasUnseen / IsUnseen. Both themes from the tokens. */
.data-table .ant-table-tbody > tr.ant-table-row.is-unseen > td:first-child {
    box-shadow: inset 3px 0 0 var(--attn);
}

.data-table tr.is-unseen .cell2 {
    position: relative;
}

.data-table tr.is-unseen .cell2 > .attn-dot {
    position: absolute;
    left: -9px;
    top: 6px;
    overflow: visible;
}

.data-table tr.is-unseen td.dt-col--primary > .attn-dot {
    margin-right: 7px;
    vertical-align: 1px;
}

.data-table tr.is-unseen .cell2__s.case-title,
.data-table tr.is-unseen td.dt-col--secondary {
    font-weight: 600;
    color: var(--text);
}

/* The party cell's own second line (the queue's subject) stays the muted .cell2__s */
.data-table tr.is-unseen td.dt-col--secondary .cell2__s {
    font-weight: 400;
}

.data-table tr.is-unseen .queue-table__id,
.data-table tr.is-unseen .submissions-table__id {
    font-weight: 700;
    color: var(--text);
}

/* ===== CF-117 — the case feed's „new since your last visit“ markers and Почетна „Шта је ново“ =====
   Prototype feedEntry / feedHtml / homeAside in tokens; attention means new / unhandled only (D_API). A new entry
   (FeedEntry New, .event-feed__entry--new) keeps its tone's node fill and takes the --attn border and --attn-ink icon
   (prototype .fe.nv-new .fe__n:not(.t-attn)) — an attention node already is the accent. Its „Ново“ tag is ToneTag's
   attention tone (overrides.css). The notice (.event-feed__since, prototype p.nv-since) opens the feed panel: the
   attention dot and one line in --text-2, ruled off from the first day. The panel's header row
   (.whats-new__hd, prototype .ap__hd--row) carries the heading's gutter on the left and the text button on the right —
   AntD Text at the default size (the global .ant-btn-text colours, hover and focus); only its placement, the
   prototype's .btn--sm box (28px high) and .nv-all type (600 12.5px/1, no uppercase) are set here. Both themes from
   the tokens. */
.event-feed__entry--new .event-feed__node:not(.event-feed__node--attention) {
    border-color: var(--attn);
    color: var(--attn-ink);
}

.event-feed__since {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 0.84375rem;
    color: var(--text-2);
}

.whats-new__hd {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-right: 10px;
}

.whats-new__title {
    flex: 1 1 auto;
    min-width: 0;
}

.whats-new__title:focus {
    outline: none;
}

.whats-new__title:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.whats-new__hd .ant-btn.whats-new__mark-all {
    flex: none;
    height: 28px;
    margin: 4px 0 0;
    padding: 0 6px;
    font: 600 12.5px/1 var(--font);
    letter-spacing: 0;
    text-transform: none;
}

/* ===== I-049 TASK_08 — catalogs on the data-table-page archetype (rules the deleted page CSS carried) ===== */
/* The „назад“ link above a list page's head (the procedures list opened from the onboarding wizard). */
.page-back-link {
    margin-bottom: var(--space-sm);
}

.page-back-link .ant-btn-link {
    padding: 0;
}

/* ===== I-049 TASK_09 — security registers on the data-table-page archetype (rules the deleted page CSS carried) ===== */
/* The processing register: the drag hint above the frame, the handle cell, the retention sub-line, the row actions. */
.register-hint {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0; /* TASK_24: in the toolbar's extra slot, aligned by the toolbar row */
    color: var(--muted);
    font-size: 0.8125rem;
}

/* The handles are hidden in the phone card stack, so is the hint about them. */
@media (max-width: 640px) {
    .register-hint {
        display: none;
    }
}

.register-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: grab;
}

.register-handle:active {
    cursor: grabbing;
}

.register-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Drag-reorder: the row being dragged is tinted, the row it would land on gets a rule above it. */
.data-table .register-row--dragging > td {
    background: var(--pri-bg);
}

.data-table .register-row--dragover > td {
    box-shadow: inset 0 2px 0 var(--pri);
}

/* ===== I-049 TASK_10 — case-domain detail pages on the detail-page archetype (rules the deleted page CSS carried) ===== */
/* The header of a record page (submission, outgoing act, АК entry, disposal / transfer proceeding, print center) is the
   case page's recipe: --simple has no card, but the <= 768 / <= 480 .page-header rules re-add a card's inner padding —
   a record header stays flush with the cards below it at every width. */
.page-header.record-header {
    padding: 0;
}

/* The record's identifier above the title, in mono (a case identifier brings its own .case-id markup); as the link's only
   text it has no underline at rest. */
.record-header__id > a {
    text-decoration: none;
}

/* I-062 TASK_11: a case identifier linking back to its case keeps the case page's inks (prototype .case-hd__id — the key
   parts --text, the fixed parts --muted), not the link's orange; the hover underline still marks the link. */
.record-header__id > a .case-id .case-id__k {
    color: var(--text);
}

.record-header__id > a .case-id .case-id__f {
    color: var(--muted);
}

.record-header__id {
    min-width: 0;
    margin-bottom: 6px; /* prototype .case-hd__id */
    font: 500 17px/1.3 var(--mono);
    color: var(--text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* The tag row under the title: status, deadline chip, channel, owner / party. */
.record-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px; /* prototype .case-hd__meta, verbatim (I-049 TASK_26) */
    margin-top: 12px;
}

.record-header__party {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* prototype .case-hd__party, verbatim (I-049 TASK_26) */
    padding-left: 12px;
    border-left: 1px solid var(--border);
    color: var(--text-2);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.record-header__party:first-child {
    padding-left: 0;
    border-left: 0;
}

/* A full-width row of the header (lifecycle bar, attention notice, banners): the header is a wrapping flex row, so a
   100% basis puts each row under the title and the actions. */
.record-header__row {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

/* I-049 TASK_26 (PLAN LP13): the record header's rhythm = the prototype's .case-hd block, verbatim — .case-hd { gap: 24px }
   between the title column and the actions, .case-hd__act { gap: 8px; padding-top: 26px } top-aligned, the lifecycle bar
   .lc { margin-top: 20px } and each notice .case-alert { margin-top: 18px } below it (≤ 999.98px the actions drop under
   the title, .case-hd { gap: 14px }, .case-hd__act { padding-top: 0 }). The rows are rows of the one header (PLAN D14). */
.page-header.record-header,
.page-header.predmet-header {
    column-gap: 24px;
    row-gap: 0;
}

.record-header > .page-header__actions,
.predmet-header > .page-header__actions {
    align-self: flex-start;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 26px;
}

.record-header > .record-header__row,
.predmet-header > .predmet-header__row {
    margin-top: 18px;
}

/* I-049 TASK_32: the case header's row = the prototype's .case-hd — the title column grows and shrinks (.case-hd__main
   { flex: 1; min-width: 0 }) and the actions keep their size (.case-hd__act { flex: none }), so a long title wraps
   instead of pushing the actions under it.
   I-049 TASK_34 (owner 3B): the header is a container (case-hd) and switches to the prototype's narrow .case-hd —
   actions under the title block, left-aligned, no top padding, gap 14 — whenever it is narrower than 1100px, not only
   below a 1000px viewport: a 1100px header leaves a 480px title block beside a bar of up to 596px (the prototype's
   #case reaches 480px at a 1100px viewport). At 1440 (a 1132px header) every bar stays on the title row, the
   administrator's five actions (701px) included; at 1000 (692px) the actions sit under the title and the meta chips keep
   the full width. Every record header (submission, act, security records …) shares the recipe. CSS only — a container
   query, no measuring. */
.page-header.predmet-header,
.page-header.record-header {
    container: case-hd / inline-size;
}

/* CF-112: the case title and its „Измени назив предмета“ pencil (prototype .tc-ttl / .tc-ttl__edit, verbatim) — the h1 stays
   the block's first text element and shrinks, the ghost icon button keeps its size beside the first line. The colour is
   !important against the global text button's own !important --text-secondary (§ Text button); the hover background
   stays the text button's. */
.tc-ttl {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.tc-ttl .page-title {
    min-width: 0;
}

.ant-btn.tc-ttl__edit {
    flex: none;
    margin-top: 4px;
    color: var(--muted) !important;
}

.ant-btn.tc-ttl__edit:is(:hover, :focus-visible):not(:disabled) {
    color: var(--text) !important;
}

.predmet-header > .page-header__content,
.record-header > .page-header__content {
    flex: 1 1 0%;
    min-width: 0;
}

.predmet-header > .page-header__actions,
.record-header > .page-header__actions {
    flex: none;
    max-width: 100%;
}

@container case-hd (max-width: 1099.98px) {
    .predmet-header > .page-header__content,
    .record-header > .page-header__content {
        flex: 1 1 100%;
    }

    /* B-194 (#6): --case-hd-stacked tells the case header's „⋯“ (CaseActionButtons, patterns.js observeHeaderStacked)
       that the actions now start at the left — its menu then opens from the button's left edge, as the prototype's
       narrow .case-hd__act .pop { right: auto; left: 0 }, instead of growing leftwards over the navigation. */
    .predmet-header > .page-header__actions,
    .record-header > .page-header__actions {
        --case-hd-stacked: 1;
        padding-top: 0;
        margin-top: 14px;
        margin-left: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 999.98px) {
    .predmet-header > .page-header__content,
    .record-header > .page-header__content {
        flex: 1 1 100%;
    }
}

.record-header > .record-header__row:has([data-pattern="lifecycle-bar"]),
.predmet-header > .predmet-header__row:has([data-pattern="lifecycle-bar"]) {
    margin-top: 20px;
}

/* A notice row of the record header (and /admin/praznici's next-year banner) is the global AntD Alert — the prototype's
   .alert, verbatim (overrides.css § Alert Overrides; I-062 TASK_13 made the TASK_26 / TASK_09 notice recipe global). */

/* A detail page's key facts = the prototype's dl.panel.desc, verbatim — .desc { display: grid; grid-template-columns:
   repeat(2, minmax(0, 1fr)) }, .desc__i { padding: 12px 16px; border-top: 1px solid var(--line) } (none on the first
   row), the left column's border-right, dt { font-size: 12.5px; color: var(--muted); margin-bottom: 2px },
   dd { font-size: 14.5px; color: var(--text) } — label over value. AntD's bordered Descriptions renders label | value
   cells per row: its rows become display: contents and each label / value pair is placed in its column (dense flow
   keeps the pair together); a one-pair row (a Span="2" fact or a Column="1" list) spans both columns (LP13 c). */
.detail-page-grid__main .ant-descriptions-bordered > .ant-descriptions-view {
    border: 1px solid var(--border) !important; /* over overrides.css's bordered-Descriptions block */
    border-radius: 12px !important;
    background: var(--panel);
    overflow: hidden;
}

/* inside a card the card is the panel (no surface in a surface): the facts grid draws no chrome of its own. The
   onboarding welcome card (prototype .ob-desc > dl.desc) is such a card. */
.detail-page-grid__main .glass-card .ant-descriptions-bordered > .ant-descriptions-view,
.step1-welcome__card .ant-descriptions-bordered > .ant-descriptions-view {
    border: 0 !important;
    border-radius: 0 !important;
    background: none;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered > .ant-descriptions-view > table,
:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered > .ant-descriptions-view > table > tbody {
    display: block;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered > .ant-descriptions-view > table > tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row {
    display: contents;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-label,
:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-content {
    display: block;
    min-width: 0;
    border: 0 !important;
    background: none !important;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-label {
    padding: 12px 16px 2px;
    border-top: 1px solid var(--line) !important;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted) !important;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-label::after {
    content: none;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-content {
    padding: 0 16px 12px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text) !important;
    overflow-wrap: anywhere;
}

/* the left column: label + value at 1, with the column rule; the right column at 2; a lone pair spans both */
:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > :nth-child(-n + 2) {
    grid-column: 1;
    border-right: 1px solid var(--line) !important;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > :nth-child(n + 3) {
    grid-column: 2;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > :nth-child(-n + 2):nth-last-child(-n + 2) {
    grid-column: 1 / -1;
    border-right: 0 !important;
}

:is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row:first-child > .ant-descriptions-item-label {
    border-top: 0 !important;
}

/* Prototype @media (max-width: 640px) { .desc { grid-template-columns: 1fr } .desc__i:nth-child(odd) { border-right: 0 }
   .desc__i:nth-child(2) { border-top: 1px solid var(--line) } .case-hd__party { border-left: 0; padding-left: 0 } } */
@media (max-width: 640px) {
    :is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered > .ant-descriptions-view > table > tbody {
        grid-template-columns: minmax(0, 1fr);
    }

    :is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-label,
    :is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row > .ant-descriptions-item-content {
        grid-column: 1 / -1;
        border-right: 0 !important;
    }

    :is(.detail-page-grid__main, .step1-welcome__card) .ant-descriptions-bordered .ant-descriptions-row:first-child > .ant-descriptions-item-label:nth-child(3) {
        border-top: 1px solid var(--line) !important;
    }

    .record-header__party {
        border-left: 0;
        padding-left: 0;
    }
}

/* The detail page's tab bar = the prototype's .tabs / .tab, verbatim — .tabs { gap: 2px; border-bottom: 1px solid
   var(--border); margin-bottom: 18px }, .tab { padding: 10px 12px 11px; font: 600 14px/1.2 var(--head) } (AntD Tabs
   restyled to that box, LP13 c; the ink bar is the selected tab's 2px --pri underline). */
.detail-page-grid__main .ant-tabs-top > .ant-tabs-nav {
    margin: 0 0 18px;
}

.detail-page-grid__main .ant-tabs-top > .ant-tabs-nav::before {
    border-bottom-color: var(--border);
}

.detail-page-grid__main .ant-tabs-top > .ant-tabs-nav .ant-tabs-tab {
    padding: 10px 12px 11px;
    font: 600 14px/1.2 var(--head);
}

.detail-page-grid__main .ant-tabs-top > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab {
    margin: 0 0 0 2px;
}

@media (max-width: 999.98px) {
    .record-header > .page-header__actions,
    .predmet-header > .page-header__actions {
        padding-top: 0;
        margin-top: 14px;
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* ≤ 768px a record header keeps the prototype's .case-hd__act — inline 34px buttons that wrap, left-aligned (≤ 999.98px
   rules above). Since I-049 TASK_33 no shared rule stretches header buttons any more; these stay as the record
   header's explicit statement of that recipe. */
@media (max-width: 768px) {
    .record-header > .page-header__actions,
    .predmet-header > .page-header__actions {
        flex-direction: row;
        align-items: center;
    }

    /* buttons at their own width (the retired B-009 stack used these selectors) */
    .page-header.record-header > .page-header__actions > .ant-btn,
    .page-header.record-header > .page-header__actions > a,
    .page-header.record-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button),
    .page-header.record-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button) > .ant-btn,
    .page-header.predmet-header > .page-header__actions > .ant-btn,
    .page-header.predmet-header > .page-header__actions > a,
    .page-header.predmet-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button),
    .page-header.predmet-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button) > .ant-btn {
        width: auto;
    }

    .page-header.record-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button),
    .page-header.predmet-header > .page-header__actions > :has(> .ant-btn):not(.ant-btn-group):not(.ant-space-compact):not(.ant-dropdown-button) {
        justify-content: flex-start;
    }
}

/* The failure / not-found / forbidden / loading faces sit under the breadcrumb at the page's own rhythm. */
.record-state {
    min-width: 0;
}

/* ≤ 1100 the aside stacks under the main column (the case page moves it above its tabs; a record page keeps its order). */
@media (max-width: 1100px) {
    .detail-page-grid--stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-page-grid--stack > .detail-page-grid__side {
        position: static;
    }
}

/* An aside card: icon + label, then its facts (the case page's Рокови / Странка / Распоред cards, laid out here once). */
.aside-card__title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.aside-card__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.aside-card__facts {
    margin-top: var(--space-md);
}

/* I-049 TASK_26 (PLAN LP13): the aside cards = the prototype's .case-aside .card, verbatim — .card { padding: 16px 16px
   6px }, its head .card__h { gap: 8px; font: 700 11px/1 var(--head); letter-spacing: .085em; text-transform: uppercase;
   color: var(--text-2); margin-bottom: 12px } with a --muted icon, and the facts as .kv rows: .kv { margin: 10px -16px
   0 }, .kv__i { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-top: 1px solid
   var(--line); font-size: 14px }, dt --muted 13px, dd right-aligned (AntD Descriptions restyled to that box, LP13 c). */
.detail-page-grid__side > .glass-card {
    padding: 16px 16px 6px;
}

.detail-page-grid__side .aside-card__title,
.detail-page-grid__side .case-aside-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font: 700 11px/1 var(--head);
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--text-2);
}

.detail-page-grid__side .aside-card__title .anticon,
.detail-page-grid__side .case-aside-card__title .anticon {
    color: var(--muted);
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) {
    margin: 10px -16px 0;
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-view table {
    table-layout: fixed;
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-row > td.ant-descriptions-item {
    padding: 10px 16px;
    border-top: 1px solid var(--line);
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-item-container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}

/* I-062 TASK_11: !important — overrides.css's bare `.ant-descriptions-item-label { color: --text-secondary !important }`
   kept the aside's labels at --text-2, not the prototype's --muted dt. */
.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-item-label {
    flex: none;
    font-size: 13px;
    line-height: inherit;
    color: var(--muted) !important;
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-item-label::after {
    content: none;
}

.detail-page-grid__side > .glass-card .ant-descriptions:not(.ant-descriptions-bordered) .ant-descriptions-item-content {
    display: block;
    min-width: 0;
    text-align: right;
    font-size: 14px;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* The record's document beside its content: the split-form grid and pane (`.record-split` / `.record-split__pane` are
   selector-list members of the split-form rules above — 4fr sticky pane, 6fr content, one column below 1000px). The pane
   itself is the document component's own surface. */
.record-split__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}


/* The current phase's actions under a LifecycleBar (a proceeding's tracker): what the user can do now, one primary. */
.phase-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* The rubrike / key facts of a record: the value column keeps long text inside the card. */
.record-facts .ant-descriptions-item-content {
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .phase-actions > .ant-btn {
        flex: 1 1 100%;
    }

    .record-header__party {
        padding-left: 0;
        border-left: 0;
    }
}

/* The submission detail's document pane: the documents list over the selected document's preview, one column — the main
   column beside the party aside is too narrow for a row (icon, size, two badges, „Преузми“) in half of it (was the page's
   scoped .document-grid, two columns). */
.document-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
    align-items: start;
}

/* The outgoing act's body sections and dispozitiv items (were the page's scoped sheet). */
.act-section {
    margin-bottom: var(--space-md);
}

.act-section:last-child {
    margin-bottom: 0;
}

.act-section__body {
    color: var(--text);
    line-height: 1.6;
}

.act-section__body :first-child {
    margin-top: 0;
}

.act-section__body :last-child {
    margin-bottom: 0;
}

.dispozitiv-items {
    padding-left: var(--space-md);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dispozitiv-items li {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

/* The print center (was the page's scoped sheet): the form column beside the PDF document pane. Since I-056 TASK_07 the
   column is ONE form panel (the prototype's .ik-form > .panel, the App's .glass-card.split-form__sections) of two
   .split-form__section (.fsec): the form types as option cards (.optg / .optc) and the picker — the label strip, the
   search with the pick list (.pick), or the range / year field. */
.print-center-preview {
    min-width: 0;
}

/* The entity picker: the label strip and the period / year fields stack their labels and controls; the search block is
   the prototype's search box with the .pick list 14px below it. App-only: the picker blocks 16px apart, the document
   checklist's list taking the strip's gap instead of its own top margin. */
.print-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.print-picker + .print-picker,
.print-picker + .print-pick,
.print-pick + .print-picker {
    margin-top: var(--space-md);
}

.print-picker > .pick {
    margin-top: 0;
}

/* I-056 TASK_13 (review L3 / L8): a broad dispatch or submission search keeps the form panel in bounds — the result list
   is capped at 460px with its own scroll, as the retired .print-result-list was. */
.print-pick > .pick {
    max-height: 460px;
    overflow-y: auto;
}

/* The search block: the search box at the section's full width (the prototype's .pc .fsec .search { max-width: none };
   the global search group is auto-width !important, so it is widened as .filter-card's is), the .pick list 14px under it
   (its own margin), a face or the spinner 16px. */
.print-pick {
    display: flex;
    flex-direction: column;
}

.print-pick > :not(:first-child):not(.pick) {
    margin-top: var(--space-md);
}

.print-pick > .ant-input-group-wrapper.ant-input-search,
.print-pick > .ant-input-search .ant-input-wrapper.ant-input-group {
    width: 100% !important;
}

/* I-062 TASK_10: the search box is the prototype's .search — a plain .ctl (36px, radius 8px, 14.5px) with the 16px
   magnifier 11px inside its left edge and the text at 34px (DebouncedSearchInput LeadingIcon: no search button). The
   global affix radius (overrides.css) is !important, so this one is too. */
.print-pick > .ant-input-affix-wrapper {
    box-sizing: border-box;
    height: 36px;
    padding: 0 12px 0 10px; /* + the 1px border: the icon 11px in */
    border-radius: 8px !important;
    font: 400 14.5px/1.3 var(--font);
}

.print-pick > .ant-input-affix-wrapper > .ant-input {
    font: inherit;
}

.print-pick > .ant-input-affix-wrapper > .ant-input-prefix {
    margin-right: 8px;
    color: var(--muted);
    font-size: 16px;
}

/* I-062 TASK_10 / TASK_11: the compact document pane — the prototype's .ik-docs panel (pcPane), drawn by the print
   center's PdfPreview Compact and the act detail's PdfPreviewPanel Compact from this one block: the head (title 700 15.5px,
   the file name in mono --muted pushed right — before the act's „Освежи преглед“; 14px 16px 12px, not sticky, so the PDF
   frame cannot slide over it), then the figure under a --line rule (18px 16px, gap 10px) holding the PDF, its loading face
   or its empty / error face, and the centred one-line caption. The prototype's --panel-2 well behind the figure is not
   painted: on the detail archetype the layout gate (surface.radius / surface.border) reads it as an unbordered card. Out-ranks
   both components' scoped layout (one class more). */
:is(.print-center-preview .pdf-preview.pdf-preview--compact, .act-document .pdf-preview-panel.pdf-preview-panel--compact) {
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__header, .act-document .pdf-preview-panel--compact .pdf-preview-panel__header) {
    position: static;
    align-items: baseline;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 0;
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__title, .act-document .pdf-preview-panel--compact .pdf-preview-panel__title) {
    font: 700 15.5px/1.3 var(--head);
    color: var(--text);
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__file, .act-document .pdf-preview-panel--compact .pdf-preview-panel__file) {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    font-size: 13px;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__figure, .act-document .pdf-preview-panel--compact .pdf-preview-panel__figure) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 18px 16px;
    border-top: 1px solid var(--line);
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__figure, .act-document .pdf-preview-panel--compact .pdf-preview-panel__figure) > .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

:is(.print-center-preview .pdf-preview--compact .pdf-preview__caption, .act-document .pdf-preview-panel--compact .pdf-preview-panel__caption) {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-2);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The print pane only: the PDF, its loading face and its empty / error face all take the sheet's height — the prototype's
   A4 sheet is 250px wide (.pc .sheet) at 1 / 1.414, so ≈ 352px high. The act's document keeps the panel's 560px frame. */
.print-center-preview .pdf-preview--compact .pdf-preview__figure > :not(figcaption) {
    box-sizing: border-box;
    width: 100%;
    height: 352px;
    min-height: 0;
    flex: none;
}

.print-picker__label {
    font-size: 0.875rem;
    color: var(--text-2);
}

.print-picker__loading {
    display: flex;
    justify-content: center;
    padding: var(--space-lg);
}

/* === Omot format (CF-115) === */
/* The prototype v8's omot-format pieces under its own class names (/design-system#omot-format). Settings → Штампа: the
   segmented „Формат омота“ choice, its hint and two decorative A4 / A3 thumbnails stacked in .om-set (.om-th: an A4
   sheet of one ruled leaf, an A3 sheet of two; .is-on on the chosen one). The print centre: „Увећај преглед“ adds
   .record-split--pane-wide to its record split — one column, the pane not sticky, the PDF frame at the A3 landscape
   aspect instead of the fixed 352px (it out-ranks that rule by the modifier class). */
.om-set {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.om-th {
    display: flex;
    gap: 14px;
}

.om-th__f {
    margin: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.om-th__s {
    display: flex;
    gap: 2px;
    padding: 4px;
    border: 1.5px solid var(--border-2);
    border-radius: 4px;
    background: var(--panel-2);
}

.om-th__s i {
    display: block;
    width: 30px;
    height: 42px;
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, var(--border) 0 1px, transparent 1px 6px);
}

.om-th__f.is-on {
    color: var(--pri-ink);
    font-weight: 600;
}

.om-th__f.is-on .om-th__s {
    border-color: var(--pri);
}

/* The static A3 placeholder sheet of the showcase's wide-pane demo (the showcase has no Api, so no PdfPreview). */
.om-sheet {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 420 / 297;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--sheet);
}

.record-split.record-split--pane-wide {
    grid-template-columns: minmax(0, 1fr);
}

.record-split.record-split--pane-wide > .record-split__pane {
    position: static;
}

.record-split--pane-wide .print-center-preview .pdf-preview--compact .pdf-preview__figure > :not(figcaption) {
    height: auto;
    aspect-ratio: 420 / 297;
}

/* The zoom button in the compact pane's head: after the file name (which carries margin-left: auto), spaced by the head's
   own 10px gap, never shrunk. */
.pdf-preview__action {
    flex: none;
}

/* The sticky action bar = the prototype's .ik-bar of #print-center (I-049 TASK_28, LP13 verbatim): sticky to the bottom,
   --hdr-bg + saturate(1.3) blur(14px), top rule --line, no surface of its own; it bleeds to the content box's edges —
   margin: 24px -24px -56px -28px; padding: 12px 24px 12px 28px (<= 999.98px margin: 24px -24px -48px; padding: 12px
   24px; <= 640px margin: 20px -16px -40px; padding: 10px 16px). */
.print-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 7;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 12px 28px;
    margin: 24px -24px -56px -28px;
    background: var(--hdr-bg);
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
    border-top: 1px solid var(--line);
    justify-content: flex-end;
}

@media (max-width: 999.98px) {
    .print-action-bar {
        margin: 24px -24px -48px;
        padding: 12px 24px;
    }
}

@media (max-width: 640px) {
    .print-action-bar {
        margin: 20px -16px -40px;
        padding: 10px 16px;
    }

    .print-action-bar .ant-btn {
        flex: 1 1 auto;
    }
}

.print-action-bar__counter {
    margin-right: auto;
    color: var(--text-2);
    font-size: 0.875rem;
}

.print-action-bar__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-2);
    font-size: 0.875rem;
}

/* === Delovodni broj (CF-114) === */
/* The prototype v9's numbering-tab pieces (/design-system#pattern-builder, #scheduled-change-panel; prototype .dv-chips /
   .dv-chip / .dv-add and .dv-pend). The pattern builder: div.pattern-builder[role=list] of chips — a token (accent
   tint) or a literal (mono, in „ “ quotes) — each with three small icon-only text buttons (move left, move right,
   remove); .is-error borders it --err; with no chip it holds p.pattern-builder__empty. The add row
   .pattern-builder__add follows the list (a list holds only list items): a token select + „Додај“ and a literal input
   (mono, max 12) + „Додај текст“. The scheduled-change panel: a calendar icon, a bold title, the pending value in mono
   (optional — the scheduled-OFF variant has none), a muted line and a small default button. Both boxes are painted
   panels, so they take the panel's radius and fill (--radius-md 12px, --panel; the layout gate's surface.radius /
   surface.surface) rather than the prototype's 10px on --panel-2 (CF-114 TASK_13); the border sets them apart. */
.pattern-builder {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    padding: 8px;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.pattern-builder.is-error {
    border-color: var(--err);
}

.pattern-builder__chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 2px 2px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-3);
    color: var(--text);
    font-size: 13px;
}

/* The tint sits on an opaque --panel base (the builder's own fill since TASK_13): over --panel-2 the light theme's
   --pri-ink would read 4.46 : 1, over --panel ≈ 4.7 : 1. */
.pattern-builder__chip--token {
    border-color: transparent;
    background-color: var(--panel);
    background-image: linear-gradient(var(--pri-bg), var(--pri-bg));
    color: var(--pri-ink);
    font-weight: 600;
}

.pattern-builder__label {
    min-width: 0;
    margin-right: 4px;
    overflow-wrap: anywhere;
}

.pattern-builder__chip--literal .pattern-builder__label {
    font-family: var(--mono);
}

.pattern-builder__chip .ant-btn.ant-btn-icon-only {
    width: 26px;
    min-width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
}

/* The prototype's .btn:disabled — the end chips' move buttons read as unavailable (the global text-button colour is
   !important, so the state is drawn with opacity, not colour). */
.pattern-builder__chip .ant-btn.ant-btn-icon-only:disabled {
    opacity: .55;
}

.pattern-builder__empty {
    margin: 4px;
    color: var(--err-ink);
    font-size: 13px;
}

.pattern-builder__add {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 14px 0 6px;
}

.pattern-builder__field {
    flex: 1 1 260px;
    min-width: 0;
}

.pattern-builder__row {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.pattern-builder__row > .ant-select,
.pattern-builder__row > .ant-input {
    flex: 1 1 auto;
    min-width: 0;
}

.pattern-builder__literal {
    font-family: var(--mono);
}

.scheduled-change {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.scheduled-change__icon {
    flex: none;
    padding-top: 2px;
    color: var(--pri-ink);
    font-size: 18px;
    line-height: 1;
}

.scheduled-change__body {
    display: grid;
    flex: 1 1 240px;
    gap: 4px;
    min-width: 0;
    font-size: 13.5px;
}

.scheduled-change__title {
    color: var(--text);
    font-weight: 600;
}

.scheduled-change__value {
    font-family: var(--mono);
    color: var(--text);
    overflow-wrap: anywhere;
}

.scheduled-change__meta {
    color: var(--text-2);
    font-size: 12.5px;
}

.scheduled-change__meta .scheduled-change__value {
    color: inherit;
}

.scheduled-change > .ant-btn {
    flex: none;
}

@media (max-width: 640px) {
    .scheduled-change {
        flex-wrap: wrap;
    }

    .scheduled-change > .ant-btn {
        margin-left: 30px;
    }
}

/* ===== I-049 TASK_11 — security, support and classification detail pages on the detail-page archetype (rules the deleted page CSS carried) ===== */
/* The Рокови card of a record with a statutory deadline (citizen export): the date with the band text, the elapsed share of
   the window and its caption — the case page's Рокови card (PredmetDetail's scoped sheet), laid out here once. */
.deadline-card__label {
    margin-bottom: var(--space-xs);
    color: var(--muted);
    font-size: 0.8125rem;
}

.deadline-card__due {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
}

.deadline-card__date {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.2;
}

.deadline-card__progress {
    margin-top: var(--space-md);
}

.deadline-card__caption {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    color: var(--text-2);
    font-size: 0.8125rem;
}

/* A feed entry's free text (a breach note, a ticket message): line breaks kept, long words wrapped. */
.event-feed__note {
    margin-top: 2px;
    color: var(--text);
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.event-feed__delta {
    color: var(--text-2);
    font-size: 0.8125rem;
}

/* A file attached to a message (a link in the conversation feed): a bordered row, icon + name + size. The files a reply is about
   to send are the catalog's .upload-file-row. */
.file-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.file-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--neu-bg);
    color: var(--text);
    font-size: 0.8125rem;
    text-decoration: none;
}

a.file-row:hover {
    border-color: var(--border-2);
    color: var(--pri-ink);
}

.file-row__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--text-2);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row__size {
    color: var(--text-2);
}

/* The reply form's file picker is the catalog's .upload-choose-label (the native input is visually hidden); keyboard focus on the
   input — never a mouse click — shows on the label. A file's size reads --text-2 (the muted meta measured 4.49:1 in dark), a failed file's message as an error. */
.reply-upload:has(:focus-visible) .upload-choose-label {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.upload-file-row__meta {
    color: var(--text-2);
}

.upload-file-row[data-state="error"] .upload-file-row__meta {
    color: var(--err-ink);
}

/* The ticket this one refers to, and the closed-ticket notice. */
.reference-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    color: inherit;
    text-decoration: none;
}

.reference-link:hover .ref-subject {
    color: var(--pri-ink);
}

.ref-number {
    font-family: var(--mono);
    color: var(--text-2);
}

.ref-subject {
    flex: 1 1 200px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ticket-closed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
}

.ticket-closed__text {
    flex: 1 1 240px;
    min-width: 0;
}

.ticket-closed__text strong {
    display: block;
    margin-bottom: var(--space-xs);
}

.ticket-closed__text p {
    margin: 0;
    color: var(--text-2);
}

.ticket-closed > .anticon {
    color: var(--ok-ink);
    font-size: 24px;
}

/* ===== I-049 TASK_12 — forms on the split-form archetype (rules the deleted page CSS carried, and the pane-less / summary / static-row variants of I-043's split form) ===== */

/* A split form inside an AntD <Form> (the four validated forms): the form's own text colour must not leak into the layout. */
.split-form {
    color: var(--text);
}

/* A split form without a document pane (PostupakEdit, CitizenExportCreate, CreateTicket, the batch tab): the empty pane
   column goes and the form takes the whole content width (I-062 D6), its fields on the two-column .form-grid--2. */
.split-form__pane:empty {
    display: none;
}

.split-form__grid:has(> .split-form__pane:empty) {
    grid-template-columns: minmax(0, 1fr);
}

/* Their stacked fields keep no empty message line: AntD reserves 24px under every validated item (an inline
   `height: 24px` spacer beside .ant-form-item-explain), which the stack's zeroed offset would add to its 16px gap; a
   hint or an error still takes its own line (prototype .fi__err). !important answers the inline style. */
.split-form__grid:has(> .split-form__pane:empty) .form-stack .ant-form-item-explain + div:empty {
    height: 0 !important;
}

/* The failed-submit summary closing the sections surface — the section padding, directly above the action bar. */
.split-form__summary {
    padding: 0 24px 24px;
}

@media (max-width: 640px) {
    .split-form__summary {
        padding: 0 16px 20px;
    }
}

/* A file row of a pane-less form (the batch tab): the pane's row look without the select button. */
.split-form__file-info {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 8px 8px 16px;
    font-size: 14px;
}

/* The template form's placeholder help: a pane at >= 1000 px, the drawer below (the open button shows instead). */
.placeholder-helper-pane__body {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 0 16px 16px;
}

.placeholder-helper-pane .placeholder-helper-drawer__hint {
    margin: 0 0 var(--space-sm);
    color: var(--text-2);
    font-size: 13px;
}

.placeholder-helper-pane .placeholder-helper-drawer__list,
.placeholder-helper-pane .placeholder-helper-drawer__items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.placeholder-helper-pane .placeholder-helper-drawer__group + .placeholder-helper-drawer__group {
    margin-top: var(--space-md);
}

.placeholder-helper-pane .placeholder-helper-drawer__group-title {
    margin: 0 0 var(--space-xs);
    color: var(--muted);
    font: 700 11.5px/1 var(--font);
    text-transform: uppercase;
}

.placeholder-helper-pane .placeholder-helper-drawer__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: var(--space-xs) 0;
    border-top: 1px solid var(--line);
}

.placeholder-helper-pane .placeholder-helper-drawer__copy {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pri-ink);
    font: inherit;
    cursor: pointer;
}

.placeholder-helper-pane .placeholder-helper-drawer__description {
    color: var(--text-2);
    font-size: 13px;
}

.placeholder-open {
    display: none;
    margin-bottom: var(--space-sm);
}

@media (max-width: 999.98px) {
    .placeholder-helper-pane {
        display: none;
    }

    .placeholder-open {
        display: block;
    }
}

/* CitizenExportCreate: the per-source counts as one line in the citizen section. */
.citizen-export-count {
    white-space: nowrap;
}

.citizen-export-count + .citizen-export-count::before {
    content: " · ";
}

[data-testid="citizen-export-counts"] > span {
    margin-right: var(--space-xs);
}

/* PostupakEdit: the procedure code badge, the field error text and the composite-code preview of its sections (the
   fields sit on .form-stack + .form-grid--2). */
.postupak-edit__badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    font-family: var(--mono);
    font-weight: 600;
}

.procedure-form__error {
    color: var(--err-ink);
    font-size: 13px;
}

.composite-id-preview {
    color: var(--text-2);
}

/* The upload drop zone shows the keyboard focus its transparent file input takes — and so does a button-look picker over
   one (CF-111 TASK_10: „Замени ПДФ“ in the attach modal). */
.upload-dropzone:has(input[type="file"]:focus-visible),
.ant-btn:has(> input[type="file"]:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* ===== I-049 TASK_13 — in-app wizards on the step rail (WizardShell inside MainLayout; steps walked in order) ===== */

/* A step whose fields failed validation: an error node and status line. */
.wizard-shell__step--error .wizard-shell__node {
    border-color: var(--err-bd);
    background: var(--err-bg);
    color: var(--err-ink);
}

.wizard-shell__step--error .wizard-shell__step-status {
    color: var(--err-ink);
}

/* A step the user may not open yet (the previous step is not valid): muted, no pointer, no hover fill. */
.wizard-shell__step--locked .wizard-shell__step-button {
    cursor: not-allowed;
}

.wizard-shell .wizard-shell__step--locked .wizard-shell__step-button:hover {
    background: none;
}

.wizard-shell__step--locked .wizard-shell__step-name {
    color: var(--muted);
}

/* The wizard body hosts the AntD <Form> of a step; its own spacing replaces the legacy .wizard-step card. */
.wizard-shell__body .ant-form {
    color: var(--text);
}

.wizard-shell__body .wizard-step__group:last-child {
    margin-bottom: 0;
}

/* ===== I-049 TASK_15 — feed-page (the notifications as I-043's event feed; F-263 L6) ===== */

/* An unread entry is AttentionBadge's teal dot before its title, on the panel like a read one (I-062 TASK_11: the
   prototype's .fe.is-unread draws no tint — the I-049 TASK_15 --attn-bg row tint and its --text-2 meta are gone); teal
   marks "new", orange is never the unread colour. A read entry's title steps down to 500 / --text-2
   (prototype .fe.is-read .fe__l). */
.feed-page .event-feed__entry:not(:has(.attn-dot)) .event-feed__title {
    font-weight: 500;
    color: var(--text-2);
}

/* The title is the entry's primary click (the v1 card's whole-card click): a bare button that reads as the title. */
.feed-entry__open {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.feed-entry__open:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* The open action and the mark-as-read control under the message = the prototype's .fe__act of small text buttons
   (.btn--text.btn--sm, AntD Text + Small — the colours, hover and focus are the global .ant-btn-text's): 4px under the
   meta, pulled 11px left so the labels line up with the title, 4px apart; 28px high, 0 11px, radius 7, 500 13px/1, the
   14px icon 6px before the label (I-062 TASK_11). The header bell's „Означи све као прочитано“ (its .pop__ft row) and a
   Popconfirm's two buttons (.confirm__ft) are the same .btn--sm box (I-062 TASK_12). */
.feed-entry__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    margin: 1px 0 0 -11px;
}

.feed-entry__actions .ant-btn,
.notification-dropdown-actions .ant-btn,
.ant-popover-buttons .ant-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    border-radius: 7px !important; /* over the global `.ant-btn-sm { 6px !important }` */
    font: 500 13px/1 var(--font);
}

.feed-entry__actions .ant-btn > .anticon + span,
.notification-dropdown-actions .ant-btn > .anticon + span {
    margin-left: 0;
}

.feed-entry__actions .anticon,
.notification-dropdown-actions .anticon {
    font-size: 14px;
}

/* ===== I-049 TASK_15 — overview-page (archival dashboard, security hub) ===== */

/* The figures row directly under the page head (overview, data-view and analytics pages) = the prototype's .figs--top
   (Part 60), verbatim (I-049 TASK_28, LP13; replaces TASK_15's equal-column grid): 22px above, 26px below (the home
   grid under it takes none of its own), the figures shrink with their labels wrapping, the icon --muted (--text-2 on
   the selected figure) 3px down; <= 640px 18px / 20px and the figures keep their width (the row scrolls). */
.figures-tabs--top {
    margin: 22px 0 26px;
}

.figures-tabs--top + .home-grid {
    margin-top: 0;
}

/* I-049 TASK_33: whatever follows the figures row takes none of its own either — the row's 26px (20px <= 640px) is the
   gap (prototype .figs--top margin), not the 24px rhythm. (0,4,0) after the owls. */
.page-container > .figures-tabs--top + :not(style, .dev-path-badge),
.page-container .ant-tabs-tabpane > .figures-tabs--top + :not(style, .dev-path-badge),
.page-container > :where(.page-tab-body) > .figures-tabs--top + :not(style, .dev-path-badge) {
    margin-top: 0;
}

.figures-tabs__label .anticon {
    flex: none;
    color: var(--muted);
}

.figures-tabs__tab[aria-selected="true"] .figures-tabs__label .anticon {
    color: var(--text-2);
}

.figures-tabs--top .figures-tabs__tab {
    flex: 0 1 auto;
    justify-content: space-between;
}

.figures-tabs--top .figures-tabs__label {
    white-space: normal;
    align-items: flex-start;
}

.figures-tabs--top .figures-tabs__label .anticon,
.figures-tabs--top .figures-tabs__label .attn-dot {
    margin-top: 3px;
}

@media (max-width: 640px) {
    .figures-tabs--top {
        margin: 18px 0 20px;
    }

    .figures-tabs--top .figures-tabs__tab {
        flex: 0 0 auto;
    }

    .figures-tabs--top .figures-tabs__label {
        white-space: nowrap;
    }
}

/* A panel's action buttons wrap inside the panel (the DPO panel holds two beside the 320px aside's text) */
.aside-panel .settings-section__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ===== I-049 TASK_16 — data views on the data-view-page and search-page archetypes (rules the deleted page CSS carried) ===== */

/* A heading over a table frame: the frame is the table's one card, so its title sits outside it (a panel's own heading is
   .section-title-sm inside the panel). With actions (the compliance log's export) the heading and the action share a row. */
.data-view__head {
    display: flex;
    flex-direction: column;
}

.data-view__head--actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.data-view__head .section-title-sm {
    margin: 0;
}

/* The hint under a frame's heading sits on the heading, not pulled over it (its panel margin is for a panel's title). */
.data-view__head .heavy-data-section__hint {
    margin: var(--space-xs) 0 0;
}

/* The lede of a toolbar with no filter (the schedules tab): a label over one muted line. */
.data-view__lede {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.875rem;
    color: var(--text-2);
}

.data-view__lede .filter-label {
    margin: 0;
}

/* I-056 TASK_04: the table listing a chart block's values sits 16px under the block (prototype #search-analytics: the
   top-terms table's margin-top: 16px under its .blk), not the token gap. (0,3,0) after the page owl. */
.page-container > .blk + .data-view__chart-table {
    margin-top: 16px;
}

/* The main column of a page that has an aside: its blocks stacked on the page rhythm. */
.data-view__stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr); /* a wide table scrolls inside its frame, it never widens the column */
    align-content: start;
    gap: var(--space-lg);
    min-width: 0;
}

/* The first-load face of a panel page: the figures skeleton over two blocks of shimmer. */
.data-view__loading {
    display: grid;
    gap: var(--space-md);
}

.data-view__skel {
    display: block;
    height: 120px;
    border-radius: var(--radius-sm);
}

/* Toolbar controls that are wider than a 158px filter: the report type, the schedules lede, the history switch. */
.data-table-toolbar__filters > .report-type-filter {
    flex: 0 1 320px;
    min-width: 200px;
}

/* I-056 TASK_03: the prototype's .toolbar .sel--xl (the /reports OJ scope select) — 260px instead of a filter's 158px. */
.data-table-toolbar__filters > .sel--xl {
    flex-basis: 260px;
}

.data-table-toolbar__filters > .data-view__lede {
    flex: 1 1 auto;
    min-width: 0;
}

.history-scheduled-only {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 0 0 auto;
}

.history-scheduled-only .filter-label {
    margin: 0;
}

@media (max-width: 640px) {
    .data-table-toolbar__filters > .report-type-filter,
    .data-table-toolbar__filters > .data-view__lede,
    .data-table-toolbar__filters > .history-scheduled-only {
        flex: 1 1 100%;
    }
}

/* A configuration panel's action row (Прикажи, the exports) sits under its fields and wraps in a narrow column. */
.heavy-data-section > .filter-row + .filter-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: var(--space-md);
}

/* /reports: the Извештаји tab is the main column beside the 320px saved-configurations aside (the desk's grid). */
[data-pattern="data-view-page"] .home-grid {
    margin-top: 0;
}

/* I-049 TASK_28 (PLAN LP13 c): a data view's page tab set (/reports) = the prototype's <div style="margin-top:22px">
   + .tabs / .tab — 22px below the page head, the bar .tabs { gap: 2px; border-bottom: 1px solid var(--border);
   margin-bottom: 18px }, each .tab { padding: 10px 12px 11px; font: 600 14px/1.2 var(--head) } (AntD Tabs restyled to
   that box, as the detail page's); the tab panel's first toolbar takes no top margin (.tp > .toolbar:first-child). */
[data-pattern="data-view-page"] > .page-container > .ant-tabs {
    margin-top: 22px;
}

[data-pattern="data-view-page"] > .page-container > .ant-tabs-top > .ant-tabs-nav {
    margin: 0 0 18px;
}

[data-pattern="data-view-page"] > .page-container > .ant-tabs-top > .ant-tabs-nav::before {
    border-bottom-color: var(--border);
}

/* .tab { border-bottom: 2px solid transparent; margin-bottom: -1px } over the bar's 1px rule: the bar is the tab's 39.8px
   box. AntD's rule is the nav's absolutely placed ::before line, so the tab keeps its 2px border and the line covers its
   last pixel (the prototype's -1px overlap) — a negative margin would only be stretched back by the flex list. */
[data-pattern="data-view-page"] > .page-container > .ant-tabs-top > .ant-tabs-nav .ant-tabs-tab {
    padding: 10px 12px 11px;
    border-bottom: 2px solid transparent;
    font: 600 14px/1.2 var(--head);
}

[data-pattern="data-view-page"] > .page-container > .ant-tabs-top > .ant-tabs-nav .ant-tabs-tab + .ant-tabs-tab {
    margin: 0 0 0 2px;
}

/* /search: skeleton results — three result rows of shimmer in the results card (the figures are FiguresTabs' own). */
.search-results-skeleton__title {
    display: block;
    width: 40%;
    height: 16px;
}

.search-results-skeleton__meta {
    display: block;
    width: 25%;
    height: 12px;
}

.search-results-skeleton__snippet {
    display: block;
    width: 80%;
    height: 12px;
}

/* ── Charts (prototype .chgrid / .blk / .chp / .stk / .lgl / .vb / .hb / .lc2 — I-056 TASK_03) ──
   The prototype's chart family, verbatim (PLAN AD1 / AD3; prototype CSS 628–629, 657–659, 687–689, 6242–6243, 6260–6319,
   6392–6409): a block is section.blk > .blk__bar > h2.blk__h (+ actions) [+ p.blk__sub] + the panel — the App's .glass-card
   is the prototype's .panel, so the chart panel is div.glass-card.chp. Colours through the App tokens of the same name.
   Components: App/Components/Patterns/Charts (ChartGrid, ChartBlock, ShareBar, VerticalBars, HorizontalBars, LineChart).
   The App's list / heading / paragraph resets differ from the prototype's, so .lgl / .blk__h / .blk__sub set their
   margins, padding and list style whole. */
.blk + .blk {
    margin-top: 24px;
}

.blk__h {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 2px;
    font: 700 11.5px/1 var(--head);
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--text-2);
}

.blk__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.blk__bar .blk__h {
    margin: 0 0 0 2px;
}

/* .seg / .btn are the prototype's; the App's segmented control is .saved-views and its button .ant-btn. */
.blk__bar :is(.seg, .saved-views) {
    margin-left: auto;
}

.blk__bar :is(.btn, .ant-btn) {
    margin-left: auto;
}

.blk__sub {
    margin: -4px 0 10px 2px;
    font-size: 13px;
    color: var(--muted);
}

.prog {
    height: 6px;
    border-radius: 3px;
    background: var(--panel-3);
    overflow: hidden;
    margin-top: 14px;
}

.prog > span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--text-2);
}

.prog.t-warn > span {
    background: var(--warn);
}

.prog.t-err > span {
    background: var(--err);
}

.prog.t-muted > span {
    background: var(--muted);
}

/* Horizontal bars (top marks, top terms) */
.hb {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 56px;
    align-items: center;
    gap: 4px 14px;
    min-height: 30px;
    font-size: 13.5px;
}

.hb + .hb {
    margin-top: 2px;
}

.hb__l {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.hb__l .mono {
    color: var(--text-2);
    margin-right: 6px;
}

.hb__n {
    text-align: right;
    font-weight: 600;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.hb .prog {
    margin: 0;
    height: 8px;
    border-radius: 4px;
}

.hb .prog > span {
    border-radius: 4px;
}

/* A year per row (the AK-by-year chart on /archival/dashboard): the year in mono, a narrow count. */
.hb--year {
    grid-template-columns: 44px minmax(0, 1fr) 40px;
    min-height: 28px;
}

.hb--year .hb__l {
    font: 13px/1 var(--font-mono);
    color: var(--text-2);
}

/* Vertical bars (cases per unit, resolution time) */
.vb {
    display: grid;
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    gap: 0 12px;
}

.vb__c {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    height: 196px;
    padding-top: 4px;
    border-bottom: 1px solid var(--border-2);
}

.vb__v {
    font: 600 12.5px/1 var(--font);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.vb__b {
    width: min(56px, 100%);
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: var(--text-2);
}

.vb--hist .vb__b {
    width: 100%;
    background: var(--info);
}

.vb--hist {
    gap: 0 4px;
}

.vb__x {
    padding-top: 8px;
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--muted);
    text-align: center;
    overflow-wrap: anywhere;
}

/* Share bar + legend (statuses, entity types) */
.stk {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--panel-3);
    gap: 2px;
}

.stk > span {
    display: block;
    min-width: 3px;
}

.lgl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2px 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.lgl__i {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    font-size: 13.5px;
    border-top: 1px solid var(--line);
}

.lgl__sw {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

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

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

.lgl__p {
    width: 44px;
    text-align: right;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
}

.sw-info {
    background: var(--info);
}

.sw-ok {
    background: var(--ok);
}

.sw-warn {
    background: var(--warn);
}

.sw-err {
    background: var(--err);
}

.sw-muted {
    background: var(--muted);
}

.sw-neutral {
    background: var(--text-2);
}

.sw-line {
    background: var(--border-2);
}

/* Line chart: the plot is SVG (non-scaling strokes), the labels are HTML */
.lc2 {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0 10px;
}

.lc2__y {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
    font: 12px/1 var(--mono);
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.lc2__p {
    position: relative;
    height: 180px;
    border-bottom: 1px solid var(--border-2);
}

.lc2__p svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.lc2__g {
    stroke: var(--line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.lc2__ln {
    fill: none;
    stroke: var(--text-2);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.lc2__ln--2 {
    stroke: var(--info);
}

.lc2__x {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    font: 12px/1 var(--mono);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.lc2__lg {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-2);
}

.lc2__lg span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lc2__lg i {
    width: 14px;
    height: 3px;
    border-radius: 2px;
}

.lc2__lg b {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* Chart panels in a two-column grid */
.chgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    align-items: stretch;
}

.chgrid > .blk {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chgrid > .blk > .glass-card {
    flex: 1 1 auto;
}

.chgrid > .blk + .blk {
    margin-top: 0;
}

.chgrid > .is-wide {
    grid-column: 1 / -1;
}

.glass-card.chp {
    padding: 18px 18px 16px;
    min-width: 0;
}

.glass-card.chp--empty {
    padding: 0;
}

/* The loading face's two panels (prototype X.skPanel: .panel, padding 18px, grid gap 14px, a 30% × 10px head line and
   four 12px lines of 100 / 76 / 88 / 60 %; min-height 236px on the reports dashboard). */
.glass-card.chp--skel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    min-height: 236px;
}

.chp--skel > .pattern-skel {
    display: block;
    height: 12px;
}

.chp--skel > .pattern-skel:nth-child(1) {
    width: 30%;
    height: 10px;
}

.chp--skel > .pattern-skel:nth-child(2) {
    width: 100%;
}

.chp--skel > .pattern-skel:nth-child(3) {
    width: 76%;
}

.chp--skel > .pattern-skel:nth-child(4) {
    width: 88%;
}

.chp--skel > .pattern-skel:nth-child(5) {
    width: 60%;
}

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

@media (max-width: 640px) {
    .hb {
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 4px 12px;
        padding: 4px 0;
    }

    .hb .prog {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .vb {
        gap: 0 6px;
    }

    .vb__c {
        height: 150px;
    }

    .vb__x {
        font-size: 11.5px;
    }

    .glass-card.chp {
        padding: 16px 14px 14px;
    }

    .lc2__p, .lc2__y {
        height: 150px;
    }
}

/* /reports Контролна табла: the error and empty faces sit 22px under the toolbar (prototype X.mt(22, …)), not on the
   toolbar's 14px. (0,4,0) after the after-toolbar rule. */
.page-container .ant-tabs-tabpane > .data-table-toolbar + .dashboard-face {
    margin-top: 22px;
}

/* ── Month calendar (prototype .cal__* — I-056 TASK_05) ──
   The prototype's month grid (hoCalendar), verbatim (PLAN AD1 / AD9; prototype CSS 6321–6335, the ≤ 640 rules of
   6397–6438, the legend .lgd of 6253 with the head's padding 0): section.glass-card.cal (the prototype's section.panel —
   no padding of its own) > .cal__hd + .cal__dw + .cal__g. Component: App/Components/Patterns/Calendar/MonthCalendar.
   The App's days sit in six div[role=row] of display: contents, so the grid geometry is the prototype's and its
   nth-child border rules are repeated per row. App-only: the selected day (.is-sel, the prototype's selection token
   --row-sel — the prototype has no selection state), the head's AntD buttons in the prototype's 28px icon box
   (.btn--icon.btn--sm), a button tag's width / font / alignment reset (the prototype's tags are spans: block-level
   in .cal__b, a button shrinks to fit) and the pointer cursor on the clickable (button) tag only — the prototype puts it on
   every tag, the App's national tags are inert. The tags take the
   App's tone recipe (.ant-tag.tone-tag--<tone>, overrides.css), so .cal__b's rule is (0,3,0) to win over it. */
.glass-card.cal {
    padding: 0;
}

.cal__hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border);
}

.cal__m {
    min-width: 168px;
    text-align: center;
    font: 700 15.5px/1.3 var(--head);
}

/* I-056 TASK_13 (PR !778 thread 12466): the label is a button that opens the month picker — the prototype's span box
   and type (the head still measures 49px), a hover tint and the focus ring; the picker's own input is invisible under it
   (the label is the trigger), only its portaled panel shows. */
.cal__mw {
    position: relative;
    display: inline-flex;
}

button.cal__m {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    cursor: pointer;
}

button.cal__m:hover {
    background: var(--panel-3);
}

button.cal__m:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.cal__mp {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
}

.cal__mp .ant-picker {
    width: 100%;
}

.cal__hd .sp {
    flex: 1;
}

.cal__hd .ant-btn {
    width: 28px;
    height: 28px;
    padding: 0;
}

.lgd {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
}

.cal__hd .lgd {
    padding: 0;
}

.cal__dw,
.cal__g {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal__g > [role="row"] {
    display: contents;
}

.cal__dw span {
    padding: 9px 10px;
    font: 600 12.5px/1 var(--font);
    color: var(--text-2);
    background: var(--th-bg);
    border-bottom: 1px solid var(--border);
}

.cal__d {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 88px;
    padding: 8px 8px 8px 10px;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.cal__g > .cal__d:nth-child(7n + 1),
.cal__g > [role="row"] > .cal__d:first-child {
    border-left: 0;
}

.cal__g > .cal__d:nth-child(-n + 7),
.cal__g > [role="row"]:first-child > .cal__d,
.cal__g > .cal__hr + [role="row"] > .cal__d {
    border-top: 0;
}

.cal__n {
    font: 600 13px/20px var(--mono);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cal__d.is-out .cal__n {
    color: var(--muted);
    font-weight: 500;
}

.cal__d.is-wk .cal__n {
    color: var(--text-2);
}

.cal__d.is-today .cal__n {
    display: inline-grid;
    place-items: center;
    align-self: flex-start;
    min-width: 26px;
    height: 22px;
    margin: -1px 0 -1px -5px;
    border-radius: 11px;
    box-shadow: inset 0 0 0 1.5px var(--text-2);
}

.cal__d.is-sel {
    background: var(--row-sel);
}

.cal__b {
    max-width: 100%;
}

.cal__b > .tag.tone-tag {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    overflow: hidden;
    white-space: normal;
    height: auto;
    min-height: 22px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1.25;
}

.cal__b > button.tag {
    width: 100%;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 640px) {
    .cal__dw span {
        padding: 8px 4px;
        text-align: center;
        font-size: 11.5px;
    }

    .cal__d {
        min-height: 54px;
        padding: 6px 4px;
        align-items: center;
        gap: 4px;
    }

    .cal__d.is-today .cal__n {
        margin: -1px 0;
        align-self: center;
    }

    .cal__b > .tag.tone-tag {
        width: 8px;
        height: 8px;
        min-height: 0;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    .cal__m {
        min-width: 0;
    }
}

/* /admin/praznici (prototype hoRegion): the next-year alert, the month calendar 14px under it, the list block 24px under
   the calendar (X.blk margin-top 24px). */
.holiday-calendar > :not(style) + .cal {
    margin-top: 14px;
}

.holiday-calendar > .cal + .blk {
    margin-top: 24px;
}

/* ── Unit tree (prototype .otree / .ot — I-056 TASK_06) ──
   The prototype's tree rows (otRow), verbatim (PLAN AD1 / AD8; prototype CSS 6337–6356, the ≤ 640 rules of 6397–6438):
   ul.otree[role=tree] > li.ot[role=treeitem] — min-height 46px, indented 26px per level (--lvl), ruled with --line (not
   the first row), the toggle .ot__tg (24px, its chevron turned -90deg when collapsed) or the dot spacer .ot__sp, the code
   .ot__c (mono 600 13px), the name .ot__n (500 14.5px, one line), the head .ot__h, the spacer .sp and the actions.
   Component: App/Components/Patterns/Tree/TreeRows (OJTreeView renders it). .ot--sm and .ot.is-gone are ported with the
   family for a later tree-diff adoption (unused for now). The App's icon element is AntD's .anticon (the prototype's .ic).
   App-only: the selected row (.ot[aria-selected=true], the selection token --row-sel — the prototype has no selection
   state), the keyboard focus inset in the row (rows inside a panel take the inset focus variant), the drop targets during a
   drag (.is-drop-in an inset 1.5px --text-2 ring = move under, .is-drop-above / .is-drop-below a 2px --text-2 top / bottom
   line = reorder before / after — I-056 TASK_13),
   the rows' children ignoring the pointer while dragging (the drop zone is read from the row's own offset), the actions
   wrapper .ot__act (display: contents — the AntD Dropdown's trigger is the row's flex item), the ⋯ AntD text button in the
   prototype's .btn--icon.btn--sm box (28px) and the chevron / head icon sizes (15px / 13px, the prototype's ic sizes).
   The panel holding the tree is flush (the prototype's section.panel has no padding): .glass-card > .oj-tree-wrapper >
   .otree and the loading rows. The loading face: the prototype's skeleton rows (.ot with --lvl, a 24 × 14 bar and a
   42 / 30 / 36% bar). */
.otree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 4px 10px 4px calc(10px + var(--lvl, 0) * 26px);
    border-top: 1px solid var(--line);
}

.otree > .ot:first-child {
    border-top: 0;
}

.ot:hover {
    background: var(--row-h);
}

.ot__tg {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.ot__tg:hover {
    background: var(--panel-3);
    color: var(--text);
}

.ot__tg .anticon {
    font-size: 15px;
}

.ot__tg[aria-expanded="false"] .anticon {
    transform: rotate(-90deg);
}

.ot__sp {
    flex: none;
    width: 24px;
    display: grid;
    place-items: center;
    color: var(--border-2);
}

.ot__c {
    flex: none;
    font: 600 13px/1.3 var(--mono);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.ot__n {
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 500;
    font-size: 14.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ot__h {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    color: var(--muted);
    font-size: 13px;
}

.ot__h .anticon {
    font-size: 13px;
}

.ot__d {
    color: var(--muted);
    font-size: 12.5px;
    white-space: nowrap;
}

/* CF-114 (prototype .ot__dv): the unit's oznaka in the delovodni broj („ДБ 09“) — a small mono pill after the name,
   with a title naming it. */
.ot__tag {
    flex: none;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--panel-3);
    color: var(--text-2);
    font-family: var(--mono);
    font-size: 11.5px;
    white-space: nowrap;
}

.ot .sp {
    flex: 1 1 0;
}

.ot.is-off .ot__n,
.ot.is-off .ot__c {
    color: var(--muted);
}

.ot.is-gone .ot__n {
    text-decoration: line-through;
    text-decoration-color: var(--border-2);
    color: var(--text-2);
}

.ot--sm {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 3px 8px;
    min-height: 38px;
    padding: 9px 12px 9px calc(12px + var(--lvl, 0) * 18px);
    font-size: 13.5px;
}

.ot--sm .ot__n {
    grid-column: 2;
    font-size: 13.5px;
    white-space: normal;
}

.ot--sm .ot__c {
    grid-column: 1;
    font-size: 12px;
}

.ot--sm .ot__d,
.ot--sm .tag {
    grid-column: 2;
    justify-self: start;
}

.ot[aria-selected="true"] {
    background: var(--row-sel);
}

.ot:focus-visible {
    outline-offset: -2px;
}

.ot.is-drop-in {
    box-shadow: inset 0 0 0 1.5px var(--text-2);
}

.ot.is-drop-above {
    box-shadow: inset 0 2px 0 var(--text-2);
}

.ot.is-drop-below {
    box-shadow: inset 0 -2px 0 var(--text-2);
}

.otree.is-dragging .ot > * {
    pointer-events: none;
}

.ot__act {
    display: contents;
}

.ot__act .ant-btn {
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
}

.glass-card:has(> .oj-tree-wrapper > .otree),
.glass-card:has(> .ot-skel),
.glass-card:has(> .oj-tree-wrapper > .ot-skel) {
    padding: 0;
}

.ot-skel .ot > .pattern-skel {
    flex: none;
}

.ot-skel .ot > .pattern-skel:first-child {
    width: 24px;
    height: 14px;
}

.ot-skel .ot:nth-child(3n + 1) > .pattern-skel + .pattern-skel {
    width: 42%;
}

.ot-skel .ot:nth-child(3n + 2) > .pattern-skel + .pattern-skel {
    width: 30%;
}

.ot-skel .ot:nth-child(3n) > .pattern-skel + .pattern-skel {
    width: 36%;
}

@media (max-width: 640px) {
    .ot {
        padding-left: calc(8px + var(--lvl, 0) * 16px);
    }

    .ot:not(.ot--sm) {
        display: grid;
        grid-template-columns: 24px auto minmax(0, 1fr) 28px;
        align-items: start;
        gap: 2px 6px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .ot:not(.ot--sm) > .ot__tg,
    .ot:not(.ot--sm) > .ot__sp {
        grid-column: 1;
        grid-row: 1;
    }

    .ot:not(.ot--sm) > .ot__c {
        grid-column: 2;
        grid-row: 1;
        line-height: 24px;
    }

    .ot:not(.ot--sm) > .ot__sp {
        height: 24px;
    }

    .ot:not(.ot--sm) > .ot__n {
        grid-column: 3;
        grid-row: 1;
        white-space: normal;
        line-height: 1.4;
        padding-top: 2px;
    }

    .ot:not(.ot--sm) > .btn,
    .ot:not(.ot--sm) > .ot__act > .ant-btn {
        grid-column: 4;
        grid-row: 1;
        align-self: start;
    }

    .ot:not(.ot--sm) > .tag,
    .ot:not(.ot--sm) > .ot__h {
        grid-column: 3;
        justify-self: start;
    }

    .ot:not(.ot--sm) > .sp {
        display: none;
    }

    /* CF-114: the delovodni-broj tag sits under the name with the other tags */
    .ot:not(.ot--sm) > .ot__tag {
        grid-column: 3;
        justify-self: start;
    }
}

/* ── Option cards and pick list (prototype .optg / .optc / .pick — I-056 TASK_07) ──
   The prototype's print-center form types and picker rows (pcRender / pcPicker), verbatim (PLAN AD1 / AD4; prototype CSS
   6371–6387 and the ≤ 999.98 rule of 6392–6396): .optg[role=radiogroup] — two equal tracks, gap 8px, one track
   ≤ 999.98 — of button.optc[role=radio] (icon, bold label, muted description; padding 10 / 12 / 11, radius 10, --panel-2;
   the checked card ringed --text-2 on --row-sel); ul.pick[role=listbox] of li.pick__r[role=option] (min-height 52px, ruled
   with --line except the first, hover --row-h, selected .is-sel --row-sel): the checkbox .chk (multi) or the check mark
   (single), .pick__p (the case identifier, a muted second line) and .pick__s (the party, right). Components:
   App/Components/Patterns/Options/OptionCards and PickList (/print renders them). The App's case identifier is .case-id
   (the prototype's .cid) and its icon element AntD's .anticon (the prototype's .ic).
   App-only: the card icon's size (18px, the prototype's ic size; line-height 0 against .optc span), the single row's check
   mark size (15px) and the keyboard focus of a row (inset, inside the list's clipped border). */
.optg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.optc {
    all: unset;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 2px 10px;
    min-width: 0;
    padding: 10px 12px 11px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    cursor: pointer;
}

.optc:hover {
    border-color: var(--ctl-bd-h);
}

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

.optc[aria-checked="true"] {
    border-color: var(--text-2);
    background: var(--row-sel);
    box-shadow: inset 0 0 0 1px var(--text-2);
}

.optc > .ic {
    grid-row: 1 / span 2;
    margin-top: 2px;
    color: var(--text-2);
}

.optc > .ic.anticon {
    font-size: 18px;
    line-height: 0;
}

.optc b {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}

.optc span {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--muted);
}

.chk {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--text-2);
    cursor: pointer;
}

.pick {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.pick__r {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) minmax(0, 200px);
    align-items: center;
    gap: 4px 14px;
    min-height: 52px;
    padding: 8px 14px;
    border-top: 1px solid var(--line);
    cursor: pointer;
}

.pick > .pick__r:first-child {
    border-top: 0;
}

.pick__r:hover {
    background: var(--row-h);
}

.pick__r.is-sel {
    background: var(--row-sel);
}

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

.pick__r > [aria-hidden="true"] .anticon {
    font-size: 15px;
}

.pick__p .cid,
.pick__p .case-id {
    font-size: 12.5px;
    white-space: normal;
}

.pick__p small {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pick__s {
    min-width: 0;
    color: var(--text-2);
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* ── Intake choices (prototype .fstack / .segr / .subbox / .note — I-062 TASK_07) ──
   /submissions/new's Канал, Странка and Разврставање (owner decision D5): each section is a 14px stack (.fstack) of the
   prototype's segmented choice — a SavedViewSwitch Size=Large (.segr) that keeps its own width — over the fields of the
   selected option; a hint right under the switch sits 4px closer (.fstack > .fi__hint). Нова странка's inline form is
   in a quiet sub-box (.subbox: --panel-2, --line border, radius 10, padding 14); Остави неразврстано says where the
   submission goes in a muted note (.note: --panel-2, radius 8, 13.5px --text-2, a 16px muted info icon 2px down).
   App-only: every .form-field in a choice stack — its own, the channel's fields, the sub-box's — drops its bottom
   margin (the stack's and the field grids' gaps space them). */
.intake-choice,
.signed-act-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.intake-choice > .saved-views {
    align-self: flex-start;
}

.intake-choice > .form-field__hint {
    margin: -4px 0 0;
}

.intake-choice .form-field,
.signed-act-stack .form-field {
    margin-bottom: 0;
}

.intake-choice__box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
}

.intake-choice__note {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--panel-2);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.intake-choice__note-icon {
    display: inline-flex;
    flex: none;
    margin-top: 2px;
    font-size: 16px;
    color: var(--muted);
}

/* ===== CF-111 TASK_08 — the signed letter („Нови одлазни допис“, prototype letter-new S4) and its shared parts =====
   The prototype's .tc-* rules as App globals, tokens only, un-nested so TASK_10's „Приложи потписан акт“ modal uses them
   outside the split form. The PDF pane composes I-043's split-form pane (.split-form__docs / __docs-head / __preview /
   __sheet / __caption — the prototype's .tc-pdf is .split-form__preview verbatim); new here: the kept note and the drop
   slot under it, the case-pick radio rows (.tc-picks / .tc-pick), the recipient chips (.tc-recips / .tc-recip), the
   picker row (.tc-row), a section's stack (.tc-stack), the assign hint (.tc-hint) and the deadline line (.tc-dl). */

/* .tc-hint — an info-ink hint under a field („Предмет ће бити додељен Вама.“): no margin — the .form-field's 6px gap
   puts it 6px under its control, as .form-error (the prototype's .fi has no gap, so .tc-hint carries margin-top 6px). */
.assign-hint {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--info-ink);
}

.assign-hint .anticon {
    flex: none;
    margin-top: 1px;
}

/* .tc-dl — the deadline line under the procedure („Без рока — …“ / „Рок за решавање: 30 радних дана“). */
.deadline-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    font-size: 13.5px;
    color: var(--text-2);
}

.deadline-line .anticon {
    color: var(--muted);
}

/* .tc-stack — a section's parts 14px apart, its fields without their own bottom margin: .signed-act-stack shares the
   .intake-choice base rule and .form-field reset above. A reused part spaced only by those margins gets the gap back:
   the act editor's ActAppealSection (switch, deadline / not-applicable hint) under 02 Акт (L3 review). */
.signed-act-stack .appeal-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* .tc-kept — under the sheet once a PDF is chosen: the unchanged-PDF note with the ok-ink safety icon. */
.signed-pdf__kept {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 10px 14px 14px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--muted);
}

.signed-pdf__kept .anticon {
    flex: none;
    margin-top: 1px;
    color: var(--ok-ink);
}

/* The drop zone and its field error under the pane: the prototype's .fi (padding 0 14px 14px) around its
   .ik-docs .drop (margin 12px 14px 14px) — the drop 28px in from the sides and 12px under the sheet or the note. */
.signed-pdf__drop {
    padding: 0 14px 14px;
}

.signed-pdf__drop .split-form__drop {
    width: calc(100% - 28px);
    margin: 12px 14px 14px;
}

.signed-pdf__drop .form-error {
    margin: 0;
}

/* .tc-picks / .tc-pick — the existing-case radio rows: dot, case number over „party · subject“, status tag. */
.case-picks {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.case-pick {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.case-pick:first-child {
    border-top: 0;
}

.case-pick:hover {
    background: var(--row-h);
}

.case-pick[aria-checked="true"] {
    background: var(--row-sel);
}

.case-pick:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.case-pick__dot {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--border-2);
}

.case-pick[aria-checked="true"] .case-pick__dot {
    box-shadow: inset 0 0 0 5px var(--text-2);
}

.case-pick__main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.case-pick__main > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prototype .tc-pick .cell2__s { white-space: normal } — „party · subject“ wraps. */
.case-pick__main > .case-pick__sub {
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--muted);
    white-space: normal;
}

.case-picks__none {
    margin: 0;
    padding: 12px;
    font-size: 13.5px;
    color: var(--muted);
}

/* .tc-recips / .tc-recip — a chip per recipient: name, type tag, remove. */
.recipient-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px 4px 4px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-2);
    font-size: 13.5px;
}

.recipient-chip__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-chip .ant-tag.tone-tag {
    flex: none;
    margin: 0;
}

/* The chip's remove — the prototype's .btn--icon.btn--sm.btn--ghost (28px square, radius 7px, --text-2 ink, --panel-3
   on hover) as a native button, like the split form's file-row remove (.split-form__file-rm). */
.recipient-chip__rm {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
}

.recipient-chip__rm:hover {
    background: var(--panel-3);
    color: var(--text);
}

.recipient-chip__rm:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

/* .tc-row — the Adresar picker beside „Нова странка“, bottoms aligned; the field takes the free width. */
.recipient-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.recipient-add-row > .form-field {
    flex: 1 1 220px;
    min-width: 0;
    margin-bottom: 0;
}
