/*
 * Flux · the calm look (17 Nov 2026, docs/DESIGN.md section 1). Loaded LAST on every screen, after the other fx-*.css.
 *
 * What it does, and nothing else:
 *   1. Re-sets the tokens of fx-tokens.css: flat white surfaces, hairlines instead of shadows, small corners, no
 *      glass, no wing, the type at its normal width. Every component already reads these tokens.
 *   2. Turns the office's floating header into a quiet side menu on a computer and a tablet on its side
 *      (>= 1024px), a plain top bar with a bottom dock below that.
 *   3. A few component rules where a token is not enough (page titles, buttons, tables, pills).
 *
 * Rules: the factory's colour stays for the one main button of a screen and for errors. The current place is
 * marked in grey, not in the factory's colour. Status colours keep their meaning (fx-tokens.css).
 */

:root {
    /* Surfaces and lines */
    --fx-canvas: #f7f7f8;
    --fx-canvas-deep: #eeeff1;
    --fx-sunk: #fafafb;
    --fx-hover: #f5f5f6;
    --fx-line: #e6e7ea;
    --fx-line-2: #d4d6db;
    --fx-side-bg: #fbfbfc;

    /* Ink: a touch cooler and darker; the hint grey keeps 5.3:1 on white */
    --fx-ink: #17181c;
    --fx-ink-2: #4d525c;
    --fx-ink-3: #666b77;
    --fx-graphite: #17181c;
    --fx-graphite-2: #26272c;
    --fx-graphite-3: #3a3c43;

    /* Type: normal width, quieter weights and sizes */
    --fx-wdth-head: 100%;
    --fx-wdth-num: 100%;
    --fx-track-head: -0.017em;
    --fx-track-num: -0.012em;
    --fx-fw-strong: 600;

    /* Corners: small and the same everywhere */
    --fx-r-xs: 4px;
    --fx-r-ctl: 7px;
    --fx-r-card: 8px;
    --fx-r-panel: 10px;
    --fx-r-float: 10px;
    --fx-r-sheet: 14px;

    /* Depth: a hairline on the page; a real shadow only for what opens above it */
    --fx-shadow-1: 0 0 0 1px var(--fx-line);
    --fx-shadow-2: 0 0 0 1px var(--fx-line-2);
    --fx-shadow-3: 0 0 0 1px var(--fx-line), 0 10px 28px -10px rgb(23 24 28 / 0.18);
    --fx-shadow-4: 0 0 0 1px var(--fx-line), 0 24px 64px -18px rgb(23 24 28 / 0.30);
    --fx-shadow-dark: none;
    --fx-shadow-brand: none;

    /* No glass */
    --fx-glass: var(--fx-surface);
    --fx-glass-strong: var(--fx-surface);
    --fx-glass-solid: var(--fx-surface);
    --fx-glass-filter: none;
    --fx-glass-edge: 0 0 0 0 transparent;

    /* No wing behind the page */
    --fx-wing-light: transparent;
    --fx-wing-ink: transparent;

    /* Frame */
    --fx-side-w: 228px;
    --fx-content-max: 78rem;
    --fx-gutter: 32px;
    --fx-gap: 16px;
    --fx-pad-panel: 20px;
    --fx-hdr-gap: 0px;
    --fx-hdr-h: 52px;
    --fx-dock-gap: 0px;
    --fx-focus-color: #2457c5;
}
/* Six text sizes in the office only (fx-tokens.css, "Office text"; DESIGN 3): the numbered names point at the sizes
   named by purpose, so 13 reads as 14 and 15 as 16. The factory screens keep their sizes, made for gloves. */
html:not(.fx-factory) {
    --fx-fs-12: var(--fx-text-micro);
    --fx-fs-13: var(--fx-text-small);
    --fx-fs-14: var(--fx-text-small);
    --fx-fs-15: var(--fx-text-body);
    --fx-fs-16: var(--fx-text-body);
    --fx-fs-18: var(--fx-text-body);
    --fx-fs-20: var(--fx-text-body);
    --fx-fs-24: var(--fx-text-title-phone);
    --fx-fs-30: var(--fx-text-title);
    --fx-fs-38: var(--fx-text-title);
    --fx-fs-48: var(--fx-text-total);
    --fx-fs-hero: var(--fx-text-title);
    /* gaps that group (fx-tokens.css): panels are groups, the title and the page are sections */
    --fx-gap: var(--fx-gap-group);
}
@media (max-width: 639.98px) { html:not(.fx-factory) { --fx-gap-group: 16px; --fx-gap-section: 24px; } }
@media (max-width: 1023.98px) { :root { --fx-gutter: 20px; --fx-pad-panel: 16px; } }
@media (max-width: 767.98px) { :root { --fx-gutter: 16px; --fx-gap: 12px; } }
@media (min-width: 1024px) { :root { --fx-hdr-h: 0px; } }

/* ============================== The office menu ============================== */

.fx-nav {
    --fx-nav-link-h: 32px;
    --fx-dock-pill-bg: var(--fx-canvas-deep);
    --fx-tile-hover: var(--fx-hover);
}
@media (pointer: coarse) { .fx-nav { --fx-nav-link-h: 40px; } }

/* The logo for light surfaces everywhere */
.fx-nav .fx-hdr .fx-logo-light { display: block !important; }
.fx-nav .fx-hdr .fx-logo-dark { display: none !important; }
.fx-nav .fx-hdr .fx-brand img { height: 1.5rem; }
.fx-nav .fx-hdr .fx-brand-name { color: var(--fx-ink); font-size: var(--fx-fs-16); }

.fx-shell::before { display: none; }
.fx-hdr::before, .fx-hdr::after { display: none; }
.fx-hdr { color: var(--fx-ink); background: var(--fx-surface); box-shadow: none; }
.fx-hdr-logo { color: var(--fx-ink); }
.fx-hdr-logo:focus-visible, .fx-hdr-link:focus-visible { outline-color: var(--fx-focus-color); }

/* The account button on a light surface (html in front: fx-account.css can load after this file) */
html .fx-account-btn { color: var(--fx-ink); border-radius: var(--fx-r-ctl); }
html .fx-account-btn[aria-expanded="true"] { background-color: var(--fx-canvas-deep); }
@media (hover: hover) and (pointer: fine) { html .fx-account-btn:hover { background-color: var(--fx-hover); } }
html .fx-account-btn:focus-visible { outline-color: var(--fx-focus-color); }
html .fx-account-avatar { width: 28px; height: 28px; background: var(--fx-canvas-deep); color: var(--fx-ink-2); font-size: var(--fx-text-micro); font-weight: var(--fx-fw-semibold); box-shadow: inset 0 0 0 1px var(--fx-line); }
html .fx-account-btn.is-on .fx-account-avatar { box-shadow: 0 0 0 2px var(--fx-ink-3); }
html .fx-account-panel .fx-account-avatar { width: 36px; height: 36px; font-size: var(--fx-fs-13); }

/* ---------- Computer, tablet on its side: a side menu ---------- */
@media (min-width: 1024px) {
    body:has(.fx-shell) { padding-left: var(--fx-side-w); }
    .fx-shell {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--fx-side-w);
        padding: 0;
        pointer-events: auto;
    }
    .fx-hdr {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: 100%;
        max-width: none;
        margin: 0;
        padding: calc(var(--fx-safe-t) + 14px) 10px 10px max(10px, var(--fx-safe-l));
        border-radius: 0;
        background: var(--fx-side-bg);
        box-shadow: inset -1px 0 0 var(--fx-line);
    }
    .fx-hdr-logo { min-height: 36px; margin: 0 0 12px; padding: 0 8px; }
    .fx-hdr-nav {
        flex: 1 1 auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 1px;
        min-height: 0;
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .fx-hdr-link {
        justify-content: flex-start;
        gap: 10px;
        height: var(--fx-nav-link-h);
        flex: none;
        padding: 0 8px;
        border-radius: 6px;
        color: var(--fx-ink-2);
        font-size: var(--fx-fs-14);
        font-weight: var(--fx-fw-medium);
    }
    .fx-hdr-link .fx-ico { width: 1.0625rem; height: 1.0625rem; color: var(--fx-ink-3); opacity: 1; }
    .fx-hdr-link.is-on { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
    /* The marker of the current place: a grey pill with a short bar in the factory's colour; it slides between places. */
    .fx-nav-pill { border-radius: 6px; background: var(--fx-canvas-deep); box-shadow: none; }
    .fx-nav-pill::after { left: 0; bottom: 7px; top: 7px; width: 3px; height: auto; margin: 0; border-radius: 3px; background: var(--fx-brand); }
    .fx-hdr-link.is-on .fx-ico { color: var(--fx-ink); }
    .fx-hdr-starts { margin-top: 12px; }
    .fx-hdr-account { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--fx-line); }
    .fx-hdr-account .fx-account { flex: 1; min-width: 0; }
    .fx-hdr-account .fx-account-btn { width: 100%; height: 40px; padding: 0 8px 0 6px; }
    .fx-hdr-account .fx-account-name { display: block; flex: 1; min-width: 0; text-align: left; font-size: var(--fx-fs-13); color: var(--fx-ink-2); }
    .fx-hdr-account .fx-account-chev { transform: rotate(180deg); color: var(--fx-ink-3); }
    .fx-account-office .fx-account-panel { top: auto; right: auto; left: 0; bottom: calc(100% + 6px); min-width: calc(var(--fx-side-w) + 40px); transform-origin: 20px 100%; }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .fx-hdr-link:hover { background-color: var(--fx-hover); color: var(--fx-ink); }
    .fx-hdr-link.is-on:hover { background-color: transparent; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
    :root { --fx-side-w: 208px; }
    .fx-hdr-link > .fx-ico:not(.fx-chev) { display: block; }
}

/* ---------- Phone, upright tablet: a plain top bar and a dock fixed to the bottom ---------- */
@media (max-width: 1023.98px) {
    .fx-shell { padding: var(--fx-safe-t) 0 0; background: var(--fx-surface); pointer-events: auto; }
    .fx-hdr {
        max-width: none;
        height: var(--fx-hdr-h);
        padding: 0 max(8px, var(--fx-safe-r)) 0 max(12px, var(--fx-safe-l));
        border-radius: 0;
        box-shadow: inset 0 -1px 0 var(--fx-line);
    }
    .fx-dock {
        bottom: 0;
        width: 100%;
        max-width: none;
        height: calc(var(--fx-dock-h) + var(--fx-safe-b));
        padding: 5px max(8px, var(--fx-safe-r)) calc(5px + var(--fx-safe-b)) max(8px, var(--fx-safe-l));
        border-radius: 0;
        background: var(--fx-surface);
        box-shadow: inset 0 1px 0 var(--fx-line);
    }
    .fx-dock.is-fx-nav-slab,
    html:has(.fi-sc-actions.fi-sticky) .fx-dock { width: 100%; }
    .fx-dock-item { border-radius: var(--fx-r-card); max-width: 120px; margin: 0 auto; font-weight: var(--fx-fw-medium); color: var(--fx-ink-3); }
    .fx-dock-item.is-on { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
    .fx-dock-item.is-on .fx-dock-ico { color: var(--fx-ink); }
    .fx-dock-ico .fx-ico { width: 22px; height: 22px; }
    .fx-dock-label { font-stretch: 100%; letter-spacing: 0; }
}

/* "Mai mult" on a phone: plain tiles */
.fx-sheet-tiles .fx-tile { box-shadow: var(--fx-shadow-1); }
.fx-tile.is-on, .fx-sheet-tiles .fx-tile.is-on, .fx-sheet .fx-tile-row.is-on { background: var(--fx-canvas-deep); box-shadow: var(--fx-shadow-2); }
.fx-tile.is-on .fx-tile-ico { color: var(--fx-ink); box-shadow: inset 0 0 0 1px var(--fx-line-2); }

/* ============================== The office page ============================== */

body, .fi-body { background: var(--fx-canvas); }
.fi-header-heading { font-weight: var(--fx-fw-strong); letter-spacing: var(--fx-track-head); }
.fi-section-header-heading, .fi-ta-ctn .fi-ta-header .fi-ta-header-heading { font-size: var(--fx-fs-16); font-weight: var(--fx-fw-semibold); letter-spacing: -0.01em; }

/* Buttons: flat; the main one is the only coloured thing */
.fi-btn { box-shadow: none; }
.fi-btn:not(.fi-color-primary):not(.fi-color-danger):not(.fi-btn-outlined) { box-shadow: inset 0 0 0 1px var(--fx-line-2); }

/* ============================== The factory screens ============================== */

/* A plain white bar across the top instead of a floating graphite one; its size stays (56px, made for gloves). */
body.fx-app { --fx-hdr-h: 56px; --fx-top-stack: calc(var(--fx-safe-t) + var(--fx-hdr-h) + 8px); }
.fx-app-shell { padding: var(--fx-safe-t) 0 0; background: var(--fx-surface); pointer-events: auto; box-shadow: inset 0 -1px 0 var(--fx-line); }
.fx-app-shell::before { display: none; }
.fx-app-hdr {
    max-width: none;
    padding: 0 max(8px, var(--fx-safe-r)) 0 max(12px, var(--fx-safe-l));
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--fx-ink);
}
.fx-app-hdr::after { display: none; }
.fx-app-hdr :focus-visible { outline-color: var(--fx-focus-color); }
.fx-app-logo { color: var(--fx-ink); }
.fx-app-logo img { height: 26px; }
.fx-app-hdr-link, .fx-app-hdr-btn { color: var(--fx-ink-2); border-radius: var(--fx-r-ctl); }
.fx-app-hdr-btn { background: var(--fx-canvas-deep); color: var(--fx-ink); }
.fx-app-hdr-link:active, .fx-app-hdr-btn:active { background: var(--fx-canvas-deep); }
.fx-app-hdr-link[aria-current="page"] { background: var(--fx-canvas-deep); color: var(--fx-ink); }
.fx-app-hdr-link[aria-current="page"]::after { display: none; }
html .fx-account-floor .fx-account-avatar { width: 36px; height: 36px; font-size: var(--fx-fs-13); }

/* ============================== Presence (18 Nov 2026) ==============================
   Andrei, after the first calm pass: "give the app a bit of spice, some buttons are too small, make most of the
   stuff symmetric, make the logo bigger". Still few things per screen; what is there has more body:
   a bigger logo, bigger buttons, a soft depth under panels, a main button that glows in the factory's colour,
   four equal figures on the home page. */
:root {
    --fx-r-ctl: 9px;
    --fx-r-card: 12px;
    --fx-r-panel: 14px;
    --fx-r-float: 14px;
    --fx-shadow-1: 0 0 0 1px var(--fx-line), 0 1px 2px rgb(23 24 28 / 0.04), 0 14px 30px -22px rgb(23 24 28 / 0.22);
    --fx-shadow-2: 0 0 0 1px var(--fx-line-2), 0 2px 4px rgb(23 24 28 / 0.05), 0 20px 36px -22px rgb(23 24 28 / 0.30);
    --fx-shadow-brand: 0 1px 2px color-mix(in oklab, var(--fx-brand) 35%, transparent),
                       0 10px 22px -10px color-mix(in oklab, var(--fx-brand) 60%, transparent);
    --fx-side-w: 244px;
}

/* ---------- The logo: bigger, and centred in the side menu ---------- */
@media (min-width: 1024px) {
    .fx-nav { --fx-nav-link-h: 38px; }
    .fx-hdr { padding-top: calc(var(--fx-safe-t) + 18px); }
    .fx-hdr-logo { justify-content: center; min-height: 56px; margin: 0 0 18px; }
    .fx-nav .fx-hdr .fx-brand img { height: 2.5rem; }
    .fx-nav .fx-hdr .fx-brand-name { font-size: var(--fx-fs-20); }
    .fx-hdr-link { padding: 0 12px; font-size: var(--fx-text-body); }
    .fx-hdr-link .fx-ico { width: 1.1875rem; height: 1.1875rem; }
    .fx-hdr-link.is-on .fx-ico { color: var(--fx-brand-text); }
    .fx-hdr-account .fx-account-btn { height: 48px; }
    html .fx-hdr-account .fx-account-avatar { width: 32px; height: 32px; font-size: 12px; }
    .fx-hdr-account .fx-account-name { font-size: var(--fx-fs-14); }
}
@media (min-width: 1024px) and (max-width: 1279.98px) { :root { --fx-side-w: 220px; } }
@media (max-width: 1023.98px) {
    :root { --fx-hdr-h: 60px; }
    .fx-nav .fx-hdr .fx-brand img { height: 2.125rem; }
    html .fx-hdr-account .fx-account-avatar { width: 34px; height: 34px; font-size: 12px; }
}
/* The login card */
.fi-simple-layout .fx-brand img, .fi-simple-main .fx-brand img { height: 3.25rem; }
/* The factory screens */
body.fx-app { --fx-hdr-h: 64px; }
.fx-app-logo img { height: 36px; }

/* ---------- Buttons: bigger, and the main one has presence ---------- */
.fi-btn { min-height: 2.625rem; padding-inline: 1.125rem; font-size: var(--fx-text-body); }
.fi-btn.fi-size-sm { min-height: 2.375rem; padding-inline: 0.875rem; font-size: var(--fx-fs-14); }
.fi-btn.fi-size-xs { min-height: 2.125rem; padding-inline: 0.75rem; font-size: var(--fx-fs-13); }
.fi-icon-btn { min-width: 2.375rem; min-height: 2.375rem; }
@media (pointer: coarse) {
    .fi-btn, .fi-btn.fi-size-sm { min-height: var(--fx-tap-lg); }
    .fi-btn.fi-size-xs { min-height: var(--fx-tap); }
    .fi-icon-btn { min-width: var(--fx-tap); min-height: var(--fx-tap); }
}
.fi-btn.fi-color-primary:not(.fi-outlined):not(label):not([aria-pressed]) {
    background-image: linear-gradient(180deg, color-mix(in oklab, var(--fx-brand) 88%, white), var(--fx-brand));
    box-shadow: var(--fx-shadow-brand);
}
.fi-btn:not(.fi-color-primary):not(.fi-color-danger):not(.fi-btn-outlined) { box-shadow: inset 0 0 0 1px var(--fx-line-2), 0 1px 2px rgb(23 24 28 / 0.05); }
@media (hover: hover) and (pointer: fine) {
    .fi-btn:hover:not(.fi-disabled):not([disabled]) { transform: translateY(-1px); }
    .fi-btn.fi-color-primary:not(.fi-outlined):not(label):not([aria-pressed]):hover { box-shadow: 0 2px 4px color-mix(in oklab, var(--fx-brand) 35%, transparent), 0 14px 26px -10px color-mix(in oklab, var(--fx-brand) 70%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .fi-btn:hover:not(.fi-disabled):not([disabled]) { transform: none; } }
/* The small row buttons on Azi */
.fx-home-act { height: 38px; padding: 0 var(--fx-s-4); font-size: var(--fx-fs-14); }
@media (pointer: coarse) { .fx-home-act { height: var(--fx-tap); } }

/* ---------- Azi: four equal figures, each under a line in its stage's colour ---------- */
.fx-home-strip { gap: var(--fx-gap); }
.fx-home-stage {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 2px;
    padding: 14px var(--fx-s-3) 12px;
    overflow: hidden;
    border-radius: var(--fx-r-panel);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-1);
    text-align: center;
}
.fx-home-stage::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--fx-home-c, var(--fx-line-2)); }
.fx-home-stage.is-zero::before { background: var(--fx-line-2); }
.fx-home-stage .fx-home-dot { display: none; }
.fx-home-stage-n { grid-column: 1; grid-row: 1; font-size: var(--fx-text-title); }
.fx-home-stage-label { grid-row: 2; }
@media (hover: hover) and (pointer: fine) {
    .fx-home-stage { transition: transform var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out); }
    .fx-home-stage:hover { background: var(--fx-surface); transform: translateY(-2px); box-shadow: var(--fx-shadow-2); }
}
@media (max-width: 639.98px) { .fx-home-strip { gap: var(--fx-s-2); } .fx-home-stage { padding: 12px 4px 10px; } .fx-home-stage-n { font-size: var(--fx-text-title-phone); } }
/* On wider screens too: a grid of four equal figures (fx-home.css lays them out as a loose row there). */
@media (min-width: 640px) {
    .fx-home-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--fx-gap); margin-inline: 0; }
    .fx-home-stage { display: grid; align-items: center; gap: 0; row-gap: 2px; min-height: 0; padding: 14px var(--fx-s-3) 12px; }
    .fx-home-stage-n { font-size: var(--fx-text-title); }
    .fx-home-stage + .fx-home-stage::before { left: 0; top: 0; width: auto; height: 3px; border: 0; transform: none; }
}
/* The row buttons of Azi stand in one column: the same width, whatever the word. */
.fx-home-act { justify-content: center; min-width: 8.25rem; }

/* ---------- Touch screens: nothing that is pressed is smaller than a fingertip ---------- */
@media (pointer: coarse) {
    .fx-home-more { min-height: var(--fx-tap); padding-inline: var(--fx-s-3); }
    .fi-link { min-height: var(--fx-tap); display: inline-flex; align-items: center; }
    .fi-ac .fi-link { padding-inline: var(--fx-s-2); }
    /* the "x" that empties a choice: a 16 px mark with a 44 px place to press */
    .fi-select-input-ctn-clearable button[type='button']:not(.fi-select-input-btn),
    .fi-select-input-value-remove-btn { position: relative; }
    .fi-select-input-ctn-clearable button[type='button']:not(.fi-select-input-btn)::after,
    .fi-select-input-value-remove-btn::after { content: ''; position: absolute; inset: -14px; }
    /* a switch: the same mark, a taller place to press */
    .fi-fo-toggle, .fi-toggle { position: relative; }
    .fi-fo-toggle::after, .fi-toggle::after { content: ''; position: absolute; inset: -10px -4px; }
}
@media (pointer: coarse) {
    .fi-checkbox-input { width: 1.5rem; height: 1.5rem; }
    .fi-ta-header-cell-sort-btn { min-height: var(--fx-tap); }
}
/* The start page's tiles: plain, like every other panel (no slat lines in the corner). */
.fx-home-tile::after { display: none; }

/* ============================== Lists: one look (20 Nov 2026) ==============================
   Every office list reads the same (DESIGN 6.4): one line per record, 44 tall with a mouse and 48 on touch, the
   second fact in grey on the same line, the search box (and "Filtre") beside the title, the whole row opens the
   record, and what is left at the end of a row is a quiet square icon or the "⋯" menu. Only the list pages of the
   office: a table inside a record page, a dialog or a factory screen keeps its own look. */
:root { --fx-row-h: 44px; }
@media (pointer: coarse) { :root { --fx-row-h: var(--fx-tap-lg); } }
@media (min-width: 640px) {
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-table > tbody > tr.fi-ta-row > .fi-ta-cell { height: var(--fx-row-h); padding-block: 0; }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-table > tbody > tr.fi-ta-row > .fi-ta-cell :is(.fi-ta-text, .fi-ta-text-item, .fi-ta-icon, .fi-ta-color) { padding-block: 0; }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-table > tbody > tr.fi-ta-row > .fi-ta-cell .fi-ta-text-has-badges { padding-block: 6px; }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-cell .fi-ta-actions { padding-block: 0; }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-header-cell { padding-block: var(--fx-s-2); font-weight: var(--fx-fw-medium); color: var(--fx-ink-3); }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-pagination { padding-block: var(--fx-s-1); }
    /* the second fact in grey on the same line as the name ("Tulcea · 0700000101"); it wraps under only when the
       column has no room */
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-text.fi-ta-text-has-descriptions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: var(--fx-s-2);
        row-gap: 0;
    }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-text-has-descriptions > .fi-ta-text-description { color: var(--fx-ink-3); }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-text-has-descriptions.fi-ta-text-has-badges { align-items: center; }
    /* "și alte 2" after the last chip, not on a line of its own */
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-text.fi-ta-text-list-limited { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--fx-s-2); }
}
/* What is left at the end of a row: one form, a quiet square icon like "⋯" (never a bare 16 px pencil). The icon that
   only repeats what a press on the row already does (open, modify) is not shown: the whole row does it. */
.fi-ta-actions > .fi-ac-link-action:not(:has(.fi-link-label)) {
    justify-content: center;
    min-width: 2.375rem;
    min-height: 2.375rem;
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-3);
}
.fi-ta-actions > .fi-ac-link-action:not(:has(.fi-link-label)) > .fi-icon { width: 1.25rem; height: 1.25rem; }
@media (hover: hover) and (pointer: fine) {
    .fi-ta-actions > .fi-ac-link-action:not(:has(.fi-link-label)):hover { background: var(--fx-hover); color: var(--fx-ink); }
}
@media (pointer: coarse) {
    .fi-ta-actions > .fi-ac-link-action:not(:has(.fi-link-label)) { min-width: var(--fx-tap); min-height: var(--fx-tap); }
}
.fi-ta-row:has(.fi-ta-col[wire\:click\.prevent\.stop^="mountAction('edit'"]) .fi-ta-actions > [wire\:click^="mountAction('edit'"],
.fi-ta-row:has(.fi-ta-col[wire\:click\.prevent\.stop^="mountAction('view'"]) .fi-ta-actions > [wire\:click^="mountAction('view'"],
.fi-ta-row:has(.fi-ta-col[wire\:click\.prevent\.stop^="mountAction('details'"]) .fi-ta-actions > [wire\:click^="mountAction('details'"],
.fi-ta-row:has(a.fi-ta-col[href$="/edit"]) .fi-ta-actions > a[href$="/edit"] { display: none; }

/* The search box and "Filtre" sit beside the page's title on a computer and a tablet on its side, so the list starts
   with its rows (no strip that holds only a search). Placed against the title itself (anchor positioning), so a long
   title or a settings page with its "Setări ›" link changes nothing. A browser without it keeps the search in a
   plain row on top of the list. */
@supports (anchor-name: --fx-a) {
    @media (min-width: 768px) {
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) { position: relative; }
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-header-heading { anchor-name: --fx-title; width: fit-content; }
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-page-content > .fi-sc > .fi-grid-col > .fi-sc-component > .fi-ta > .fi-ta-ctn,
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-page-content > .fi-ta > .fi-ta-ctn { position: static; animation: none; }
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-ctn:not(.fi-ta-ctn .fi-ta-ctn) > .fi-ta-main > .fi-ta-header-ctn:not(:has(> .fi-ta-header)) > .fi-ta-header-toolbar {
            position: absolute;
            position-anchor: --fx-title;
            top: anchor(center);
            left: calc(anchor(right) + var(--fx-s-6));
            translate: 0 -50%;
            z-index: var(--fx-z-raised);
            flex-wrap: nowrap;
            padding: 0;
            border: 0;
            background: transparent;
        }
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-header-toolbar > :nth-child(2) { margin: 0; flex-wrap: nowrap; }
        :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-header-toolbar .fi-ta-search-field { width: clamp(11rem, 24vw, 17rem); }
    }
}

/* ============================== The page title: one height everywhere (20 Nov 2026) ==============================
   The title stands at the same place on every page, with or without a main button and with or without the small
   "Setări ›" way back above it: the way back sits in the space over the title instead of pushing it down, and the
   main button is centred on the title's line. Create and modify pages do not repeat "Adaugă" / "Modifică" as a last
   crumb under a title that already says it. */
@media (min-width: 640px) {
    .fi-page-header-main-ctn { padding-top: 2.5rem; }
    .fi-page-header-main-ctn:has(> .fi-header .fi-breadcrumbs) { position: relative; }
    .fi-header .fi-breadcrumbs { position: absolute; top: 0.75rem; margin: 0; }
    .fi-header:not(:has(.fx-seg)):not(.fx-order-page .fi-header, .fx-offer-page .fi-header) { align-items: flex-start; }
    .fi-header:not(:has(.fx-seg)):not(.fx-order-page .fi-header, .fx-offer-page .fi-header) > .fi-header-actions-ctn {
        align-self: flex-start;
        margin-top: calc(var(--fx-fs-30) * 0.625 - 1.3125rem);
    }
}
@media (min-width: 640px) and (pointer: coarse) {
    .fi-header:not(:has(.fx-seg)):not(.fx-order-page .fi-header, .fx-offer-page .fi-header) > .fi-header-actions-ctn {
        margin-top: calc(var(--fx-fs-30) * 0.625 - var(--fx-tap-lg) / 2);
    }
}
/* The last crumb is the page itself, which the title already names ("Setări › Conturi" over "Conturi"): only the way
   back stays. */
.fi-breadcrumbs-item:last-child:not(:first-child) { display: none; }

/* A list's tabs start at the left, under the title, as on Comenzi (not centred over the rows). */
:is(.fi-resource-list-records-page, .fi-resource-manage-records-page) .fi-tabs:not(.fi-contained):not(.fi-ta-ctn *) { margin-inline: 0 auto; }

/* On a phone the search is a plain box over the cards, not a card of its own. */
@media (max-width: 639.98px) {
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page, .fx-list-tight) .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:not(:has(> .fi-ta-header)) > .fi-ta-header-toolbar {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
}
@media (max-width: 639.98px) {
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page) .fi-header:not(:has(.fx-set-nav)) { align-items: center; }
}

/* ============================== Touch: 48 to press, never under 44 (20 Nov 2026) ==============================
   DESIGN 4 and 12. In the office on a touch screen the smallest place to press is 48 (--fx-tap; the factory screens
   keep their own 56). It reaches every control that reads the token; what had its own number follows here. */
@media (pointer: coarse) {
    html:not(.fx-factory):not(.fx-tv) { --fx-tap: 48px; }
    /* the side menu on a tablet on its side: rows 44 (with a mouse 38) */
    .fx-nav { --fx-nav-link-h: 44px; }
    .fx-hdr-starts { margin-top: 6px; }
    /* the pair switch of the settings pages, the access-set chips, the See / Do ticks */
    .fx-setseg-item, .fx-chips .fi-fo-checkbox-list-option, .fx-bx-tick { min-height: var(--fx-tap); }
    .fx-bx-tick { min-width: var(--fx-tap); }
    /* a phone card's row actions */
    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-actions .fi-link { min-height: var(--fx-tap); }
    /* a switch: the mark stays its size, the switch itself is a fingertip tall (clear borders above and below it) */
    html:not(.fx-factory) .fi-toggle { height: var(--fx-tap); border-width: calc((var(--fx-tap) - 1.5rem) / 2) 0; padding: 2px; background-clip: padding-box; }
    .fi-fo-toggle::after, .fi-toggle::after { inset: -2px -6px; }
    /* a phone number, an address: a link the finger can hit */
    html:not(.fx-factory) :is(a[href^="tel:"], a[href^="mailto:"]) { display: inline-flex; align-items: center; min-height: var(--fx-tap); }
    .fi-sc-actions.fi-sticky .fi-ac > .fi-btn { min-height: var(--fx-tap); }
}
@media (min-width: 1024px) and (pointer: coarse) {
    /* the owner's whole menu still fits a tablet on its side (820 high) without scrolling */
    .fx-hdr { padding-top: calc(var(--fx-safe-t) + 12px); }
    .fx-hdr-logo { margin-bottom: 10px; }
    .fx-hdr-nav { gap: 0; }
}

/* The title and the page are two sections; long titles and lines break evenly (DESIGN 3). */
.fi-page-header-main-ctn { row-gap: var(--fx-gap-section); }
.fi-page-content, .fi-page-main { row-gap: var(--fx-gap); }
:is(h1, h2, h3, .fx-next-text) { text-wrap: balance; }
.fi-page p { text-wrap: pretty; }

/* ============================== The button answers (20 Nov 2026) ==============================
   DESIGN 10. After a plain save the pressed button shows a tick and "Salvat" for a little over a second, at its own
   width, instead of a toast at the other end of the screen (resources/views/filament/body-end.blade.php). The tick
   draws itself; with less motion it is simply there. */
.fi-btn[data-fx-done] { position: relative; overflow: hidden; pointer-events: none; }
.fx-done-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--fx-s-2);
    border-radius: inherit;
    background: var(--fx-surface);
    color: var(--fx-ok);
    font-weight: var(--fx-fw-semibold);
    white-space: nowrap;
}
.fi-btn.fi-color-primary > .fx-done-face { background: var(--fx-ok-fill); color: #fff; }
.fx-done-face svg { width: 1.125rem; height: 1.125rem; flex: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html.fx-motion .fx-done-face { animation: fx-fade-in var(--fx-dur-2) var(--fx-ease-out) both; }
html.fx-motion .fx-done-face .fx-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fx-done-draw var(--fx-dur-4) var(--fx-ease-out) var(--fx-dur-1) forwards; }
@keyframes fx-done-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .fx-done-face, .fx-done-face .fx-draw { animation: none !important; stroke-dashoffset: 0; } }

/* A list's tab answers at once: the pressed one is marked, the old one lets go, the rows dim until the new ones come. */
.fi-tabs.is-fx-switching .fi-tabs-item.fi-active:not(.is-fx-pending) { background: transparent; box-shadow: none; color: var(--fx-ink-2); }
.fi-tabs .fi-tabs-item.is-fx-pending { background: var(--fx-surface); color: var(--fx-graphite); box-shadow: 0 1px 2px rgb(31 35 40 / 0.1), 0 0 0 1px rgb(31 35 40 / 0.05); }
.fi-page:has(.fi-tabs.is-fx-switching) .fi-ta-content-ctn { opacity: 0.55; transition: opacity var(--fx-dur-2) var(--fx-ease-out) 120ms; }
.fi-btn.fi-color-primary[data-fx-done] { box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--fx-ok-fill) 70%, transparent); }

/* ============================== Boxes that held one thing (20 Nov 2026) ==============================
   A box groups several things (DESIGN 1 and 15). A strip that only repeats the search ("Filtre active: Căutare: x",
   the word is already in the box) is not shown; on a phone a list's heading inside a record page ("Produse") is a
   plain heading over its cards, not a card of its own. */
.fi-ta-filter-indicators:has(.fi-badge-delete-btn[wire\:click="resetTableSearch"]):not(:has(.fi-badge-delete-btn:not([wire\:click="resetTableSearch"]))) { display: none; }
@media (max-width: 639.98px) {
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header):not(:has(.fi-ta-search-field)) {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        margin-bottom: var(--fx-s-2);
    }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header):not(:has(.fi-ta-search-field)) > .fi-ta-header { padding-inline: var(--fx-s-1); padding-block: var(--fx-s-2) 0; border: 0; }
}
/* Statistici: the period chips are not a panel of their own: they sit beside the title on a computer (like a list's
   search) and as a plain row under it below that. */
.fi-section:has(> .fi-section-content-ctn .fx-dash-seg):not(:has(.fi-section-header)) { background: transparent; box-shadow: none; border: 0; }
.fi-section:has(> .fi-section-content-ctn .fx-dash-seg):not(:has(.fi-section-header)) .fi-section-content { padding: 0; }
@supports (anchor-name: --fx-a) {
    @media (min-width: 1280px) {
        .fi-page:has(.fx-dash-seg) { position: relative; }
        .fi-page:has(.fx-dash-seg) .fi-header-heading { anchor-name: --fx-title; width: fit-content; }
        /* the chips' place in the page's column moves with them (out of the flow), so no empty row is left */
        .fi-grid-col:has(> .fi-sc-component > .fx-dash-period .fx-dash-seg) {
            position: absolute;
            position-anchor: --fx-title;
            top: anchor(center);
            left: calc(anchor(right) + var(--fx-s-6));
            translate: 0 -50%;
            z-index: var(--fx-z-raised);
        }
    }
}
/* A fold inside a panel ("Mai multe date") is a plain row that opens, not a box inside the box. */
.fi-section-content .fi-section.fi-collapsible:not(.fi-section-not-contained) {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid var(--fx-line);
}
.fi-section-content .fi-section.fi-collapsible:not(.fi-section-not-contained) > .fi-section-header { padding-inline: 0; border-bottom: 0; box-shadow: none; }
.fi-section-content .fi-section.fi-collapsible:not(.fi-section-not-contained):not(.fi-aside).fi-section-has-header > .fi-section-content-ctn { border-top: 0; }
.fi-section-content .fi-section.fi-collapsible:not(.fi-section-not-contained):not(.fi-divided) > .fi-section-content-ctn > .fi-section-content { padding-inline: 0; padding-top: 0; }
