/*
 * Flux office: everything Filament draws (pages, panels, tables, forms, buttons, menus, dialogs, toasts, the
 * login) and the shared pieces other parts use (.fx-panel, .fx-list, .fx-bars, .fx-table, .fx-reason, .fx-num).
 * Built only on the tokens in fx-tokens.css; docs/DESIGN.md says what each look means.
 *
 * Filament's own rules live in @layer components; this file is not layered, so it always wins. Where Filament
 * changes a property per state (focus, invalid, selected, colour), we set Filament's own variables (--bg, --text,
 * --tw-ring-color…) instead of the property, so the states keep working.
 *
 * The factory's colour (--fx-brand) appears only on the main button of a page, the current place and errors.
 * Every other link, chip, toggle, icon and menu here is graphite or grey.
 */

/* ======================================================================================= Canvas */
.fi-body {
    background-color: var(--fx-canvas);
    color: var(--fx-ink);
    font-family: var(--fx-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
/* The page itself is plain: the factory's wing (fx-tokens.css) is the motif, used only behind the login card, the
   dashboard's greeting and in empty states. */
.fi-layout { position: relative; }
.fi-main-ctn { min-width: 0; }

/* ======================================================================================= Page heading */
.fi-header { gap: var(--fx-s-3) var(--fx-s-4); align-items: flex-end; }
.fi-header-heading {
    color: var(--fx-graphite);
    font-size: var(--fx-fs-30);
    line-height: var(--fx-lh-snug);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-head);
    letter-spacing: var(--fx-track-head);
    text-wrap: balance;
}
.fi-header-subheading { color: var(--fx-ink-2); font-size: var(--fx-fs-14); max-width: 62ch; }
.fi-breadcrumbs { margin-bottom: var(--fx-s-1); }
.fi-breadcrumbs-item-label { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
a.fi-breadcrumbs-item-label { transition: color var(--fx-dur-2) var(--fx-ease-out); text-decoration: none; }
.fi-breadcrumbs-item:last-child .fi-breadcrumbs-item-label { color: var(--fx-ink-2); }
.fi-breadcrumbs-item svg { color: var(--fx-ink-disabled); }
@media (hover: hover) and (pointer: fine) {
    a.fi-breadcrumbs-item-label:hover { color: var(--fx-ink); }
}
.fi-header-actions-ctn .fi-ac { gap: var(--fx-s-2); flex-wrap: wrap; }
.fi-page-header-main-ctn { row-gap: var(--fx-s-6); }
.fi-page-content, .fi-page-main { row-gap: var(--fx-gap); }
.fi-sc-has-gap { gap: var(--fx-gap); }

@media (max-width: 639.98px) {
    .fi-header { align-items: flex-start; }
    .fi-header-heading { font-size: var(--fx-fs-24); }
    .fi-page-header-main-ctn { row-gap: var(--fx-s-4); }
    /* Breadcrumbs repeat the title on a phone: keep only the way back. */
    .fi-breadcrumbs-item:not(:first-child) { display: none; }
}

/* Segments in the page header (the line board's lines): a segmented control; on a phone it wraps, never scrolls sideways. */
.fi-header-actions-ctn:has(.fx-seg) { min-width: 0; max-width: 100%; }
.fi-header-actions-ctn .fi-ac:has(> .fx-seg) {
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px;
    max-width: 100%;
    border-radius: var(--fx-r-ctl);
    background: var(--fx-canvas-deep);
    box-shadow: var(--fx-shadow-inset);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.fi-header-actions-ctn .fi-ac:has(> .fx-seg)::-webkit-scrollbar { display: none; }
.fi-ac > .fi-btn.fx-seg, .fi-ac > .fi-btn.fx-seg:not(.fi-outlined)[aria-pressed] {
    flex-shrink: 0;
    white-space: nowrap;
    background: transparent;
    color: var(--fx-ink-2);
    box-shadow: none;
    border-radius: calc(var(--fx-r-ctl) - 4px);
}
.fi-ac > .fi-btn.fx-seg:not(.fi-outlined)[aria-pressed=true] { 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); }
@media (hover: hover) and (pointer: fine) {
    .fi-ac > .fi-btn.fx-seg:not(.fi-outlined)[aria-pressed=false]:hover { background: rgb(255 255 255 / 0.55); color: var(--fx-ink); }
}
@media (max-width: 1023.98px) {
    .fi-header:has(.fx-seg) { flex-direction: column; align-items: stretch; }
    .fi-header-actions-ctn:has(.fx-seg), .fi-header-actions-ctn .fi-ac:has(> .fx-seg) { width: 100%; }
}

/* A list's one main action ("Comandă nouă") sits in the page header beside the title, never floating over the rows
   (it used to cover the last row and the pages on an upright tablet). On a phone the title and the button share
   one row while they fit. */
@media (max-width: 639.98px) {
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page) .fi-header { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
    :is(.fi-resource-list-records-page, .fi-resource-manage-records-page) .fi-header .fi-header-actions-ctn { margin-left: auto; }
}

/* ======================================================================================= Entrance
   When a page opens its panels rise in turn, and a list's rows follow as a soft wave from top to bottom. These
   elements stay in place through Livewire updates, so a sort, a search, a new page or a poll replays nothing;
   a panel that appears later (a section shown by a choice, a dialog's form) simply arrives. Reduced motion:
   fx-motion.css makes every animation 1ms. */
html.fx-motion .fi-header:not([data-fx-reveal], [data-fx-scene]) { animation: fx-fade-in var(--fx-dur-4) var(--fx-ease-out) backwards; }
/* (Not where the shared motion already runs the show: a [data-fx-scene] such as the dashboard, or an element
   with its own data-fx-reveal / data-fx-stagger.) */
html.fx-motion .fi-page-content :is(.fi-section, .fi-ta-ctn, .fx-panel, .fx-rise):not([data-fx-scene] *, [data-fx-scene], [data-fx-reveal], [data-fx-stagger] > *) {
    animation: fx-rise var(--fx-dur-4) var(--fx-ease-enter) backwards;
    animation-delay: calc(var(--fx-stagger) + min(var(--fx-n, 0), 8) * var(--fx-stagger));
}
html.fx-motion .fi-page-content .fi-section .fi-section { animation: none; }
/* The rows' wave: a soft-edged mask grows down the list once, only while the entrance plays (the mask lives in the
   keyframes, so nothing stays masked afterwards and menus inside the rows are never clipped). */
@keyframes fx-rows-wave {
    from {
        -webkit-mask-image: linear-gradient(180deg, #000 0 70%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 0 70%, transparent 100%);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: 100% 0%;
        mask-size: 100% 0%;
        translate: 0 6px;
    }
    to {
        -webkit-mask-image: linear-gradient(180deg, #000 0 70%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 0 70%, transparent 100%);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: 100% 143%;
        mask-size: 100% 143%;
        translate: 0 0;
    }
}
html.fx-motion .fi-page-content .fi-ta-content-ctn:not([data-fx-scene] *) { animation: fx-rows-wave calc(2 * var(--fx-dur-4)) var(--fx-ease-move) var(--fx-dur-2) backwards; }
/* The order of the panels: their column in each grid (nested grids count again from their own start). */
.fi-sc > .fi-grid-col:nth-child(2 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 1; }
.fi-sc > .fi-grid-col:nth-child(3 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 2; }
.fi-sc > .fi-grid-col:nth-child(4 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 3; }
.fi-sc > .fi-grid-col:nth-child(5 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 4; }
.fi-sc > .fi-grid-col:nth-child(6 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 5; }
.fi-sc > .fi-grid-col:nth-child(n + 7 of :not(.fi-hidden, .fi-sc-liberated)) { --fx-n: 6; }
.fi-page-content > .fi-page-sub-navigation-tabs ~ *, .fi-resource-relation-manager { --fx-n: 3; }

/* ======================================================================================= Panels (sections) */
.fi-section:not(.fi-section-not-contained):not(.fi-aside),
.fi-section:not(.fi-section-not-contained).fi-aside > .fi-section-content-ctn {
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
}
.fi-section:not(.fi-section-not-contained):not(.fi-aside) > .fi-section-header { padding: var(--fx-s-4) var(--fx-pad-panel); }
.fi-section:not(.fi-section-not-contained):not(.fi-divided) > .fi-section-content-ctn > .fi-section-content,
.fi-section:not(.fi-section-not-contained).fi-divided > .fi-section-content-ctn > .fi-section-content > * { padding: var(--fx-pad-panel); }
.fi-section:not(.fi-section-not-contained):not(.fi-aside).fi-section-has-header:not(.fi-collapsed) > .fi-section-content-ctn { border-top: 1px solid var(--fx-line); }
.fi-section:not(.fi-section-not-contained) > .fi-section-content-ctn > .fi-section-footer { border-top: 1px solid var(--fx-line); padding: var(--fx-s-3) var(--fx-pad-panel); }
.fi-section-header-heading {
    color: var(--fx-graphite);
    font-size: var(--fx-fs-18);
    line-height: var(--fx-lh-snug);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-head);
    letter-spacing: var(--fx-track-head);
}
.fi-section-header-description { color: var(--fx-ink-3); font-size: var(--fx-fs-13); line-height: var(--fx-lh-body); }
.fi-section > .fi-section-header > .fi-icon:not(.fi-color) { color: var(--fx-ink-3); }
.fi-section > .fi-section-header > .fi-icon.fi-color-danger { color: var(--fx-st-urgent); }
/* A panel that reports a problem (Observație): an amber edge, a faint amber wash and its note icon in amber. */
.fx-section-remark > .fi-section:not(.fi-section-not-contained) { background: linear-gradient(var(--fx-st-remark-bg), var(--fx-surface) 70%); box-shadow: inset 3px 0 0 var(--fx-st-remark), var(--fx-shadow-1); }
.fx-section-remark > .fi-section > .fi-section-header > .fi-icon.fi-color-danger { color: var(--fx-st-remark); }
.fx-section-remark .fi-section-header-heading { color: var(--fx-st-remark-text); }
/* A collapsible panel: the header is the button, the chevron turns, the content fades in. */
.fi-section.fi-collapsible > .fi-section-header { border-radius: var(--fx-r-panel); transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
.fi-section.fi-collapsible.fi-collapsed > .fi-section-header { border-radius: var(--fx-r-panel); }
.fi-section-collapse-btn { transition: rotate var(--fx-dur-3) var(--fx-ease-move); color: var(--fx-ink-3); }
@media (hover: hover) and (pointer: fine) {
    .fi-section.fi-collapsible > .fi-section-header:hover { background: var(--fx-hover); }
}
html.fx-motion .fi-section.fi-collapsible:not(.fi-collapsed) > .fi-section-content-ctn { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter); }
/* A form with no panels of its own (cars, leave, profile) gets one: fields never sit on the bare canvas.
   It only fades in: a sliding parent would carry its floating save bar along. */
.fi-page-content form.fi-sc-form:not(:has(.fi-section)):not(.fi-modal *) {
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
    padding: var(--fx-pad-panel);
}
html.fx-motion .fi-page-content form.fi-sc-form:not(:has(.fi-section)):not(.fi-modal *) { animation: fx-fade-in var(--fx-dur-4) var(--fx-ease-out) var(--fx-stagger) backwards; }
/* An access set's short name panel stays in view beside its long list of boxes. */
@media (min-width: 1024px) {
    .fi-resource-access-sets .fi-grid-col > .fi-sc-component > .fi-sc-section:only-child:has(> .fi-section:not(.fi-section-has-header)) {
        position: sticky;
        top: var(--fx-top-stack);
    }
}
/* A quiet panel inside a panel (Filament's "secondary"). */
.fi-section.fi-secondary:not(.fi-section-not-contained) { background: var(--fx-sunk); box-shadow: var(--fx-shadow-inset); }

/* ======================================================================================= Tables */
.fi-ta-ctn {
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
}
.fi-ta-ctn.fi-loading { animation: none; }
.fi-ta-ctn .fi-ta-header { border-bottom: 1px solid var(--fx-line); padding: var(--fx-s-4) var(--fx-pad-panel); }
.fi-ta-ctn .fi-ta-header .fi-ta-header-heading { color: var(--fx-graphite); font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); }
.fi-ta-ctn .fi-ta-header .fi-ta-header-description { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fi-ta-ctn .fi-ta-header-toolbar { border-bottom: 1px solid var(--fx-line); padding: var(--fx-s-3) var(--fx-pad-panel); gap: var(--fx-s-3); }
.fi-ta-ctn .fi-ta-header-toolbar > * { column-gap: var(--fx-s-2); }
.fi-ta-ctn .fi-ta-header-toolbar > .fi-ta-actions:not(:has(*)) { display: none; }
.fi-ta-filter-indicators { border-bottom: 1px solid var(--fx-line); background: var(--fx-sunk); padding: var(--fx-s-2) var(--fx-pad-panel); }
.fi-ta-filter-indicators-label { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
.fi-ta-filter-indicators .fi-badge { background: var(--fx-surface); color: var(--fx-ink-2); box-shadow: inset 0 0 0 1px var(--fx-line-2); }
.fi-ta-filter-indicators .fi-badge .fi-icon, .fi-ta-filter-indicators .fi-badge-delete-btn,
.fi-ta-filter-indicators .fi-badge-delete-btn .fi-icon { color: var(--fx-ink-3); }
/* A chip's "×" (filters, picked options) is grey, never the factory's colour. */
.fi-badge .fi-badge-delete-btn-icon { color: var(--fx-ink-3); }
@media (hover: hover) and (pointer: fine) {
    .fi-ta-filter-indicators .fi-badge-delete-btn:hover .fi-icon,
    .fi-badge .fi-badge-delete-btn:hover .fi-badge-delete-btn-icon { color: var(--fx-ink); }
}
.fi-ta-filter-indicators > .fi-icon-btn { color: var(--fx-ink-3); }
/* The funnel's count says "0" when nothing is filtered; the chips row already lists active filters, so the funnel
   only gets a small graphite dot while any is on. */
.fi-ta-filters-dropdown .fi-icon-btn-badge-ctn, .fi-ta-filters-trigger-action-ctn .fi-icon-btn-badge-ctn { display: none; }
.fi-ta-filters-dropdown .fi-icon-btn { position: relative; }
.fi-ta-ctn:has(.fi-ta-filter-indicators) .fi-ta-filters-dropdown .fi-icon-btn::before {
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fx-graphite);
    box-shadow: 0 0 0 2px var(--fx-surface);
}

.fi-ta-table { font-variant-numeric: tabular-nums; }
.fi-ta-table > thead > tr, .fi-ta-header-cell, .fi-ta-empty-header-cell, .fi-ta-table > thead .fi-ta-selection-cell { background-color: var(--fx-sunk); }
.fi-ta-table > thead > tr { box-shadow: inset 0 -1px 0 var(--fx-line); }
.fi-ta-header-cell {
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    padding-block: var(--fx-s-3);
    white-space: nowrap;
}
.fi-ta-header-cell-sort-btn { color: inherit; border-radius: var(--fx-r-xs); transition: color var(--fx-dur-2) var(--fx-ease-out); }
.fi-ta-header-cell-sort-btn .fi-icon { color: var(--fx-ink-disabled); transition: color var(--fx-dur-2) var(--fx-ease-out), rotate var(--fx-dur-3) var(--fx-ease-move); }
.fi-ta-header-cell-sorted .fi-ta-header-cell-sort-btn, .fi-ta-header-cell-sorted .fi-ta-header-cell-sort-btn .fi-icon { color: var(--fx-ink); }
.fi-ta-table > tbody { border-color: var(--fx-line); }
.fi-ta-row { transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
.fi-ta-row > td { border-color: var(--fx-line); }
:where(.fi-ta-table > tbody > tr:not(:last-child)) { border-color: var(--fx-line); }
.fi-ta-row.fi-clickable { cursor: pointer; }
.fi-ta-row.fi-clickable:active { background-color: var(--fx-sunk); }
@media (hover: hover) and (pointer: fine) {
    .fi-ta-row:hover { background-color: var(--fx-hover); }
    .fi-ta-row.fi-clickable:hover .fi-ta-cell:first-of-type { box-shadow: inset 2px 0 0 var(--fx-graphite); }
}
.fi-ta-row.fi-selected > :first-child { box-shadow: inset 2px 0 0 var(--fx-graphite); }
.fi-ta-row.fi-selected { background-color: var(--fx-sunk); }
.fi-ta-text-item, .fi-in-text-item { font-variant-numeric: tabular-nums; }
.fi-ta-text-item { color: var(--fx-ink); }
.fi-ta-text-description, .fi-ta-text .fi-ta-text-description { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fi-ta-cell .fi-ta-text-item .fi-icon.fi-color-danger { color: var(--fx-st-urgent); }
.fi-ta-placeholder { color: var(--fx-ink-3); }
/* Yes/no columns: a green tick for yes, a quiet grey mark for no (red is kept for trouble). */
.fi-ta-icon .fi-icon.fi-color-danger, .fi-in-icon .fi-icon.fi-color-danger { color: var(--fx-ink-disabled); }
.fi-ta-icon .fi-icon.fi-color-success, .fi-in-icon .fi-icon.fi-color-success { color: var(--fx-ok-fill); }
/* Row actions: grey, quiet; the row itself is the way in. */
.fi-ta-actions .fi-link { color: var(--fx-ink-2); font-weight: var(--fx-fw-medium); }
.fi-ta-actions .fi-link > .fi-icon, .fi-ta-actions .fi-icon-btn { color: var(--fx-ink-3); }
@media (hover: hover) and (pointer: fine) {
    .fi-ta-actions .fi-link:hover, .fi-ta-actions .fi-link:hover > .fi-icon, .fi-ta-actions .fi-icon-btn:hover { color: var(--fx-ink); }
    .fi-ta-actions .fi-link.fi-color-danger:hover, .fi-ta-actions .fi-link.fi-color-danger:hover > .fi-icon,
    .fi-ta-actions .fi-icon-btn.fi-color-danger:hover { color: var(--fx-bad); }
}
.fi-ta-selection-indicator { background: var(--fx-sunk); border-color: var(--fx-line); }
.fi-ta-selection-indicator .fi-link { color: var(--fx-ink-2); }
/* Quiet rows: cancelled orders, done items. */
.fx-row-cancelled .fi-ta-text-item, .fx-row-cancelled .fi-badge { color: var(--fx-st-cancel-text); text-decoration: line-through; text-decoration-color: color-mix(in oklab, currentColor 60%, transparent); }
/* A row with an open problem (Observație) turns amber, with an amber edge and its note icon in amber; an urgent one
   gets a red edge beside its red bolt. */
.fi-ta-row.fx-row-remark { background-color: var(--fx-st-remark-bg); }
.fi-ta-row.fx-row-remark > .fi-ta-cell:first-of-type { box-shadow: inset 3px 0 0 var(--fx-st-remark); }
.fi-ta-row.fx-row-urgent > .fi-ta-cell:first-of-type { box-shadow: inset 3px 0 0 var(--fx-st-urgent); }
.fi-ta-row.fx-row-remark .fi-ta-text-item .fi-icon.fi-color-danger { color: var(--fx-st-remark); }
@media (hover: hover) and (pointer: fine) {
    .fi-ta-row.fx-row-remark:hover { background-color: color-mix(in srgb, var(--fx-st-remark-bg) 95%, var(--fx-st-remark) 5%); }   /* grey hints keep 4.6:1 */
}

/* Footer and pagination */
.fi-ta-ctn .fi-ta-footer, .fi-ta-ctn > .fi-ta-main > .fi-pagination, .fi-ta-ctn .fi-pagination { border-color: var(--fx-line); }
.fi-pagination { padding: var(--fx-s-3) var(--fx-pad-panel); }
.fi-pagination .fi-pagination-overview { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fi-pagination .fi-pagination-items { border-radius: var(--fx-r-ctl); box-shadow: 0 0 0 1px var(--fx-line-2); overflow: hidden; }
.fi-pagination .fi-pagination-item { border-color: var(--fx-line); }
.fi-pagination .fi-pagination-item-btn { min-width: 2.25rem; transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
.fi-pagination .fi-pagination-item-label { color: var(--fx-ink-2); font-weight: var(--fx-fw-semibold); }
.fi-pagination .fi-pagination-item.fi-active .fi-pagination-item-btn { background: var(--fx-graphite); }
.fi-pagination .fi-pagination-item.fi-active .fi-pagination-item-label { color: var(--fx-on-dark); }
.fi-pagination .fi-pagination-records-per-page-select .fi-input-wrp { box-shadow: 0 0 0 1px var(--fx-line-2); }
/* One page only: "per page" has nothing to change, so only the count stays. */
.fi-pagination:not(:has(.fi-pagination-items)):not(:has(.fi-pagination-next-btn)) .fi-pagination-records-per-page-select-ctn { display: none; }

/* Empty: a sentence and the one next action, over the factory's wing (faint, behind the words). */
.fi-ta-empty-state {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: var(--fx-s-9) var(--fx-pad-panel) var(--fx-s-10);
    --fx-wing-size: 17rem;
    --fx-wing-y: 46%;
}
.fi-ta-empty-state:not(.fi-ta-ctn-with-content-layout .fi-ta-empty-state) { border-color: var(--fx-line); }
.fi-ta-empty-state .fi-ta-empty-state-icon-bg {
    position: relative;
    padding: var(--fx-s-4);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-1);
}
.fi-ta-empty-state .fi-ta-empty-state-icon-bg .fi-icon { color: var(--fx-ink-3); }
.fi-ta-empty-state .fi-ta-empty-state-heading { color: var(--fx-graphite); font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); }
.fi-ta-empty-state .fi-ta-empty-state-description { color: var(--fx-ink-3); font-size: var(--fx-fs-14); max-width: 40ch; }
html.fx-motion .fi-ta-empty-state-content { animation: fx-fade-up var(--fx-dur-4) var(--fx-ease-enter) backwards; }
.fi-empty-state .fi-empty-state-heading { color: var(--fx-graphite); }
.fi-empty-state .fi-empty-state-description { color: var(--fx-ink-3); }

/* Loading: Filament's placeholders in the canvas grey, with the house shimmer instead of a pulse. */
.fi-ta-content-loading :is(.fi-ta-text, .fi-ta-icon, .fi-ta-image, .fi-ta-checkbox, .fi-ta-toggle, .fi-ta-select, .fi-ta-color, .fi-ta-text-input)::after {
    background: var(--fx-canvas-deep) !important;
    border-radius: var(--fx-r-pill) !important;
}
.fi-ta-content-ctn.fi-loading, .fi-ta-ctn.fi-loading .fi-ta-content-ctn { opacity: 0.6; transition: opacity var(--fx-dur-2) var(--fx-ease-out); }
.fi-sc-loading, .fi-ta-table-loading-ctn { color: var(--fx-ink-3); }

/* A list whose columns fit (checked at 1024, 1180 and 1440) keeps its head under the header while it scrolls.
   Only these lists: a wider one would lose columns under the clip. */
@media (min-width: 1024px) {
    :is(.fi-resource-orders, .fi-resource-customers, .fi-resource-users, .fi-resource-access-sets, .fi-resource-lines,
        .fi-resource-vehicles, .fi-resource-employees, .fi-resource-audit-logs, .fi-resource-email-logs, .fi-resource-car-trips,
        .fi-resource-routes, .fi-resource-counties, .fi-resource-option-lists, .fi-resource-ready-made-products):is(.fi-resource-list-records-page, .fi-resource-manage-records-page) {
        & .fi-ta-ctn:not(.fi-ta-ctn-with-header), & .fi-ta-content-ctn { overflow: clip; }
        & .fi-ta-table > thead {
            position: sticky;
            top: var(--fx-top-stack);
            z-index: var(--fx-z-sticky);
            container-type: scroll-state;
        }
    }
    @container scroll-state(stuck: top) {
        .fi-ta-header-cell, .fi-ta-empty-header-cell, .fi-ta-selection-cell { box-shadow: 0 10px 14px -12px rgb(31 35 40 / 0.35); }
    }
}

/* ---- Phones: every row is its own floating card (Filament's stacked layout, set per list) ---- */
@media (max-width: 639.98px) {
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-main { gap: 0; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header,
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-toolbar {
        background: var(--fx-surface);
        border: 0;
        border-radius: var(--fx-r-panel);
        box-shadow: var(--fx-shadow-1);
        padding: var(--fx-s-2) var(--fx-s-2) var(--fx-s-2) var(--fx-s-3);
        margin-bottom: var(--fx-s-3);
    }
    /* A list with its own heading (a relation manager): the heading and its tools are one card; tools without a
       search (the column picker) sit beside the heading. */
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header) {
        background: var(--fx-surface);
        border-radius: var(--fx-r-panel);
        box-shadow: var(--fx-shadow-1);
        margin-bottom: var(--fx-s-3);
    }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header) > :is(.fi-ta-header, .fi-ta-header-toolbar) {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
    }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header) > .fi-ta-header-toolbar:has(.fi-ta-search-field) { border-top: 1px solid var(--fx-line); }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-ctn:has(> .fi-ta-header):not(:has(.fi-ta-search-field)) { display: flex; align-items: center; }
    .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 { flex: 1; min-width: 0; }
    .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-toolbar { flex: none; padding-left: 0; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-header-toolbar > :nth-child(2) { flex: 1; justify-content: flex-end; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-search-field { flex: 1; min-width: 0; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-filter-indicators {
        background: transparent;
        border: 0;
        padding: 0 var(--fx-s-1) var(--fx-s-3);
    }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-content-ctn { overflow: visible; border: 0; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-content { border: 0; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile { background: transparent; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > thead .fi-ta-table-stacked-header-cell {
        background: transparent;
        padding: 0 var(--fx-s-1) var(--fx-s-3);
        color: var(--fx-ink-3);
        font-size: var(--fx-fs-13);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > thead .fi-ta-table-stacked-header-cell .fi-input-wrp { background: var(--fx-glass-strong); }
    /* Columns shown only from a tablet or a computer up (visibleFrom lg/xl) are details: the card leaves them out. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row > .fi-ta-cell:not(.fi-ta-selection-cell):is(.lg\:fi-visible, .xl\:fi-visible, .\32xl\:fi-visible) { display: none; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody { display: grid; gap: var(--fx-s-3); border: 0; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: var(--fx-s-3);
        padding: var(--fx-s-3) var(--fx-s-4) var(--fx-s-2);
        background: var(--fx-surface);
        border: 0;
        border-radius: var(--fx-r-card);
        box-shadow: var(--fx-shadow-1);
        transition: transform var(--fx-dur-1) var(--fx-ease-out), background-color var(--fx-dur-2) var(--fx-ease-out);
        touch-action: manipulation;
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row.fi-clickable:active { transform: scale(0.985); background: var(--fx-surface); }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row.fx-row-remark { background: var(--fx-st-remark-bg); }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row.fx-row-remark { box-shadow: inset 3px 0 0 var(--fx-st-remark), var(--fx-shadow-1); }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row.fx-row-urgent { box-shadow: inset 3px 0 0 var(--fx-st-urgent), var(--fx-shadow-1); }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row > .fi-ta-cell:first-of-type { box-shadow: none; }
    /* Every cell: label on the left, value on the right, one line each. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell) {
        grid-column: 1 / -1;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: var(--fx-s-3);
        padding: var(--fx-s-1) 0;
        border-top: 1px solid var(--fx-line-soft);
        min-width: 0;
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell) > .fi-ta-cell-label {
        flex-shrink: 0;
        padding: 0;
        color: var(--fx-ink-3);
        font-size: var(--fx-fs-13);
        font-weight: var(--fx-fw-medium);
        line-height: var(--fx-lh-body);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell > .fi-ta-cell-content { min-width: 0; text-align: right; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell .fi-ta-col,
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell .fi-ta-text { padding: 0; justify-content: flex-end; text-align: right; }
    /* The first cell is the card's title: bigger, no label, no line above. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell):first-of-type {
        grid-column: 1;
        border-top: 0;
        padding: var(--fx-s-1) 0 var(--fx-s-2);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:first-of-type > .fi-ta-cell-label { display: none; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:first-of-type > .fi-ta-cell-content { text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:first-of-type :is(.fi-ta-col, .fi-ta-text) { justify-content: flex-start; text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:first-of-type .fi-ta-text-item {
        font-size: var(--fx-fs-16);
        font-weight: var(--fx-fw-strong);
        color: var(--fx-graphite);
    }
    /* A list led by a picture (Produse de vânzare): the thumbnail sits left of the name, which is the title. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row:has(> .fi-ta-cell:first-of-type .fi-ta-image) { grid-template-columns: auto minmax(0, 1fr) auto; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:first-of-type { grid-row: 1; padding: var(--fx-s-1) 0 var(--fx-s-2); }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:nth-of-type(2) {
        grid-column: 2 / -1;
        grid-row: 1;
        border-top: 0;
        padding: var(--fx-s-1) 0 var(--fx-s-2);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:nth-of-type(2) > .fi-ta-cell-label { display: none; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:nth-of-type(2) > .fi-ta-cell-content { text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:nth-of-type(2) :is(.fi-ta-col, .fi-ta-text) { justify-content: flex-start; text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(> .fi-ta-cell:first-of-type .fi-ta-image) > .fi-ta-cell:nth-of-type(2) .fi-ta-text-item { font-size: var(--fx-fs-16); font-weight: var(--fx-fw-strong); color: var(--fx-graphite); }
    /* A status cell (marked fx-lead in the resource) sits at the title's right. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-lead) {
        grid-column: 2;
        grid-row: 1;
        border-top: 0;
        padding: var(--fx-s-1) 0 var(--fx-s-2);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-lead) > .fi-ta-cell-label { display: none; }
    /* A plain cell (fx-cell-plain) is a second line of the card without its label: the customer on the left, the
       sum on the right (fx-cell-end). */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-plain) { grid-column: auto; border-top: 0; padding: 0 0 var(--fx-s-1); align-items: flex-start; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-plain) > .fi-ta-cell-label { display: none; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-plain:not(.fx-cell-end)) > .fi-ta-cell-content { text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-plain:not(.fx-cell-end)) :is(.fi-ta-col, .fi-ta-text) { justify-content: flex-start; text-align: left; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-end) .fi-ta-text-item { font-weight: var(--fx-fw-semibold); color: var(--fx-graphite); white-space: nowrap; }
    /* A plain cell marked fx-cell-wide (the order's products: the summary, the step chain) takes the card's whole
       width on its own line, so a wide neighbour can never squeeze it to nothing. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-wide) { grid-column: 1 / -1; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-cell-wide) > .fi-ta-cell-content { width: 100%; }
    /* A cell marked fx-not-on-phone is a detail the card leaves out (the CUI, a count). */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(.fx-not-on-phone) { display: none; }
    /* The orders' card: the row's menu stays on the order page on a phone (the card opens it), not as a third line. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(.fx-order-no) > .fi-ta-actions-cell,
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:has(.fx-order-no) > .fi-ta-cell:has(> .fi-ta-actions) { display: none; }
    /* Actions: a row of real buttons under the card. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:has(> .fi-ta-actions),
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-actions-cell {
        justify-content: flex-end;
        padding-top: var(--fx-s-2);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-actions { justify-content: flex-end; gap: var(--fx-s-1); flex-wrap: wrap; }
    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-actions .fi-link {
        min-height: 40px;
        padding-inline: var(--fx-s-3);
        border-radius: var(--fx-r-ctl);
        background: var(--fx-sunk);
        align-items: center;
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-actions .fi-link .fi-link-label { align-self: center; }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-pagination,
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-footer {
        margin-top: var(--fx-s-3);
        background: var(--fx-surface);
        border: 0;
        border-radius: var(--fx-r-panel);
        box-shadow: var(--fx-shadow-1);
    }
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-ta-empty-state {
        background: var(--fx-surface);
        border: 0;
        border-radius: var(--fx-r-panel);
        box-shadow: var(--fx-shadow-1);
    }
    html.fx-motion .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) { animation: none; }
    /* One page only: the count is hidden on phones, so the pagination card would be an empty sliver. */
    .fi-ta-ctn:has(.fi-ta-table-stacked-on-mobile) .fi-pagination:not(:has(.fi-pagination-items, .fi-pagination-next-btn, .fi-pagination-previous-btn)) { display: none; }
}

/* ======================================================================================= Status and badges
   Filament's badge colours map to the fixed status colours (never the factory's colour). A badge column marked
   fx-status in its resource also gets the status dot. */
.fi-badge {
    --fx-b: var(--fx-st-added);
    border-radius: var(--fx-r-pill);
    font-weight: var(--fx-fw-semibold);
    font-size: var(--fx-fs-12);
    line-height: 1.35;
    letter-spacing: 0.005em;
    background-color: var(--fx-st-added-bg);
    color: var(--fx-st-added-text);
    box-shadow: none;
    gap: var(--fx-s-1);
}
.fi-badge.fi-size-md, .fi-badge.fi-size-lg { font-size: var(--fx-fs-13); }
.fi-badge .fi-icon { color: currentColor; }
.fi-badge.fi-color-warning { --fx-b: var(--fx-st-work); background-color: var(--fx-st-work-bg); color: var(--fx-st-work-text); }
.fi-badge.fi-color-teal { --fx-b: var(--fx-st-ready); background-color: var(--fx-st-ready-bg); color: var(--fx-st-ready-text); }
.fi-badge.fi-color-info { --fx-b: var(--fx-st-road); background-color: var(--fx-st-road-bg); color: var(--fx-st-road-text); }
.fi-badge.fi-color-lime { --fx-b: var(--fx-st-partly); background-color: var(--fx-st-partly-bg); color: var(--fx-st-partly-text); }
.fi-badge.fi-color-success { --fx-b: var(--fx-st-done); background-color: var(--fx-st-done-bg); color: var(--fx-st-done-text); }
.fi-badge.fi-color-danger { --fx-b: var(--fx-st-urgent); background-color: var(--fx-st-urgent-bg); color: var(--fx-st-urgent-text); }
.fi-badge.fi-color-primary, .fi-badge.fi-color-gray {
    --fx-b: var(--fx-st-added);
    background-color: var(--fx-sunk);
    color: var(--fx-ink-2);
    box-shadow: inset 0 0 0 1px var(--fx-line);
}
.fx-status .fi-badge::before {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fx-b);
}
/* An open problem (Observație): the amber pill with its note icon. */
.fx-remark .fi-badge.fi-color-danger { --fx-b: var(--fx-st-remark); background: var(--fx-st-remark-bg); color: var(--fx-st-remark-text); }
.fx-remark .fi-badge.fi-color-danger .fi-icon { color: var(--fx-st-remark); }
/* Counts on buttons and tabs: small graphite discs, never the factory's colour. */
.fi-btn-badge-ctn .fi-badge, .fi-icon-btn-badge-ctn .fi-badge, .fi-tabs-item .fi-badge {
    background: var(--fx-graphite);
    color: var(--fx-on-dark);
    box-shadow: 0 0 0 2px var(--fx-surface);
    font-size: var(--fx-fs-12);
    min-width: 1.25rem;
    justify-content: center;
}
.fi-tabs-item .fi-badge { box-shadow: none; background: var(--fx-canvas-deep); color: var(--fx-ink-2); }
.fi-tabs-item.fi-active .fi-badge { background: var(--fx-graphite); color: var(--fx-on-dark); }

/* ======================================================================================= Buttons */
.fi-btn {
    border-radius: var(--fx-r-ctl);
    font-weight: var(--fx-fw-semibold);
    letter-spacing: 0.005em;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), color var(--fx-dur-2) var(--fx-ease-out),
        box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
    touch-action: manipulation;
}
.fi-btn:active:not(.fi-disabled):not([disabled]) { transform: scale(0.97); }
/* The main action: the factory's colour, the only coloured shadow on the screen. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(label):not([aria-pressed]) {
    --bg: var(--fx-brand);
    --hover-bg: var(--fx-brand-hover);
    --text: var(--fx-on-brand);
    --hover-text: var(--fx-on-brand);
    box-shadow: var(--fx-shadow-brand);
}
.fi-btn.fi-color-primary:not(.fi-outlined):not(label):not([aria-pressed]) > .fi-icon { color: var(--fx-on-brand); }
.fi-btn.fi-color-primary:not(.fi-outlined):not(label):not([aria-pressed]):active:not(.fi-disabled):not([disabled]) { background-color: var(--fx-brand-press); }
/* Secondary: white, a hairline and a soft lift. */
.fi-btn:not(.fi-color):not(.fi-outlined), .fi-btn.fi-color-gray:not(.fi-outlined) {
    background-color: var(--fx-surface);
    color: var(--fx-ink);
    box-shadow: inset 0 0 0 1px var(--fx-line-2), 0 1px 2px rgb(31 35 40 / 0.06);
}
.fi-btn:not(.fi-color):not(.fi-outlined) > .fi-icon { color: var(--fx-ink-3); }
@media (hover: hover) and (pointer: fine) {
    .fi-btn:not(.fi-color):not(.fi-outlined):not(.fi-disabled):not([disabled]):hover { background-color: var(--fx-hover); box-shadow: inset 0 0 0 1px var(--fx-ink-disabled), 0 2px 6px rgb(31 35 40 / 0.08); }
}
.fi-btn.fi-outlined { box-shadow: inset 0 0 0 1px var(--fx-line-2); color: var(--fx-ink); }
.fi-btn.fi-outlined.fi-color-primary { --text: var(--fx-ink); }
.fi-btn.fi-outlined.fi-color > .fi-icon { color: var(--fx-ink-3); }
/* Destructive: red only where it is confirmed (the dialog's button); elsewhere grey until hovered. */
.fi-btn.fi-color-danger:not(.fi-outlined):not(label):not([aria-pressed]) {
    --bg: var(--fx-st-urgent);
    --hover-bg: color-mix(in oklab, var(--fx-st-urgent) 86%, black);
    --text: var(--fx-on-dark);
    --hover-text: var(--fx-on-dark);
}
/* A positive action (Remediere, Gata): the readable green, white words. */
.fi-btn.fi-color-success:not(.fi-outlined):not(label):not([aria-pressed]) {
    --bg: var(--fx-st-done-text);
    --hover-bg: color-mix(in oklab, var(--fx-st-done-text) 86%, black);
    --text: var(--fx-on-dark);
    --hover-text: var(--fx-on-dark);
}
.fi-btn.fi-color-success:not(.fi-outlined):not(label):not([aria-pressed]) > .fi-icon { color: var(--fx-on-dark); }
/* A main action with nothing to act on: grey, not a faded factory colour. */
.fi-btn.fi-color-primary.fi-disabled:not(.fi-outlined), .fi-btn.fi-color-primary[disabled]:not(.fi-outlined) {
    --bg: var(--fx-canvas-deep);
    --text: var(--fx-ink-3);
    opacity: 1;
    box-shadow: inset 0 0 0 1px var(--fx-line);
}
.fi-btn.fi-color-primary.fi-disabled:not(.fi-outlined) > .fi-icon { color: var(--fx-ink-3); }
.fi-btn-group { border-radius: var(--fx-r-ctl); box-shadow: inset 0 0 0 1px var(--fx-line-2); }

/* Links and icon buttons: graphite and grey. */
.fi-link { font-weight: var(--fx-fw-medium); text-underline-offset: 3px; transition: color var(--fx-dur-2) var(--fx-ease-out); }
.fi-link.fi-color-primary, .fi-link.fi-color-primary > .fi-icon { color: var(--fx-ink-2); }
.fi-link.fi-color-danger, .fi-link.fi-color-danger > .fi-icon { color: var(--fx-ink-2); }
.fi-link > .fi-icon { color: var(--fx-ink-3); }
@media (hover: hover) and (pointer: fine) {
    .fi-link.fi-color-primary:hover, .fi-link.fi-color-primary:hover > .fi-icon { color: var(--fx-ink); }
    .fi-link.fi-color-danger:hover, .fi-link.fi-color-danger:hover > .fi-icon { color: var(--fx-bad); }
}
.fi-icon-btn { border-radius: var(--fx-r-ctl); color: var(--fx-ink-3); transition: background-color var(--fx-dur-2) var(--fx-ease-out), color var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out); touch-action: manipulation; }
.fi-icon-btn.fi-color, .fi-icon-btn.fi-color-primary, .fi-icon-btn.fi-color-danger { color: var(--fx-ink-3); }
.fi-icon-btn:active:not(.fi-disabled):not([disabled]) { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
    .fi-icon-btn:not(.fi-disabled):not([disabled]):hover { background-color: var(--fx-hover); color: var(--fx-ink); }
    .fi-icon-btn.fi-color-danger:not(.fi-disabled):not([disabled]):hover { background-color: var(--fx-bad-bg); color: var(--fx-bad); }
}

/* ======================================================================================= Keyboard focus
   A graphite ring wherever a control is reached with the keyboard; it never depends on a box-shadow. */
:is(.fi-btn, .fi-icon-btn, .fi-link, .fi-tabs-item, .fi-sc-tabs-tab, .fi-pagination-item-btn, .fi-ta-header-cell-sort-btn,
    .fi-toggle, .fi-dropdown-list-item, .fi-breadcrumbs a, .fi-section-header, .fi-ta-cell a, .fi-badge-delete-btn,
    .fi-fo-repeater-item-header button, .fx-panel a, .fx-list a, .fx-table a, .fx-chip-link,
    .fi-modal-close-btn, .fi-checkbox-input, .fi-radio-input, .fi-select-input-btn, .fi-select-input-value-remove-btn):focus-visible {
    outline: var(--fx-focus-width) solid var(--fx-focus-color);
    outline-offset: var(--fx-focus-offset);
    --tw-ring-color: transparent;   /* Filament's own ring is in the factory's colour: the graphite outline replaces it */
}
.fi-dropdown-list-item:focus-visible { outline-offset: -2px; }
.fi-ta-cell a:focus-visible { outline-offset: -2px; border-radius: var(--fx-r-xs); }
.fi-input-wrp:focus-within { outline: none; }

/* ======================================================================================= Forms */
.fi-fo-field-label-content { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); font-size: var(--fx-fs-14); }
.fi-fo-field-label-required-mark { color: var(--fx-ink-3); font-weight: var(--fx-fw-medium); }
.fi-fo-field-wrp-helper-text, .fi-sc-text, .fi-fo-field-wrp-hint { color: var(--fx-ink-3); }
.fi-fo-field-wrp-hint .fi-icon, .fi-fo-field-label .fi-icon, .fi-sc-icon.fi-color-primary, .fi-sc-icon:not(.fi-color) { color: var(--fx-ink-3); }
.fi-fo-field-wrp-hint .fi-link, .fi-fo-field-wrp-hint .fi-link > .fi-icon { color: var(--fx-ink-2); }

.fi-input-wrp {
    border-radius: var(--fx-r-ctl);
    background-color: var(--fx-surface);
    --tw-ring-color: var(--fx-line-2);
    --tw-shadow: 0 1px 2px rgb(31 35 40 / 0.04);
    transition: box-shadow var(--fx-dur-2) var(--fx-ease-out), background-color var(--fx-dur-2) var(--fx-ease-out);
}
.fi-input-wrp:not(.fi-disabled):not(:has(.fi-input-wrp-actions :focus)):focus-within { --tw-ring-color: var(--fx-graphite); }
/* A row of equal fields (marked fx-fields-even in its resource, e.g. the counts per line): when one label wraps to
   two lines, the boxes still line up, each label sitting on its box. */
.fx-fields-even .fi-grid-col > .fi-sc-component:has(> .fi-fo-field) { height: 100%; }
.fx-fields-even .fi-grid-col > .fi-sc-component > .fi-fo-field:not(.fi-fo-field-has-inline-label) { height: 100%; grid-template-rows: 1fr auto; }
.fx-fields-even .fi-grid-col > .fi-sc-component > .fi-fo-field:not(.fi-fo-field-has-inline-label) > .fi-fo-field-label-col { align-content: end; }
/* When a field is made taller for thumbs, its text stays in the middle. */
.fi-input-wrp > .fi-input-wrp-content-ctn:has(> input.fi-input) { display: flex; align-items: center; }
.fi-input-wrp > .fi-input-wrp-content-ctn > input.fi-input { flex: 1; min-width: 0; }
.fi-input-wrp.fi-disabled { background-color: var(--fx-sunk); --tw-ring-color: var(--fx-line); }
.fi-input-wrp .fi-input-wrp-prefix:not(.fi-inline), .fi-input-wrp .fi-input-wrp-suffix:not(.fi-inline) { border-color: var(--fx-line); }
.fi-input-wrp-label { color: var(--fx-ink-3); }
.fi-input-wrp .fi-input-wrp-actions .fi-icon-btn, .fi-input-wrp-suffix .fi-icon-btn, .fi-input-wrp-suffix .fi-icon-btn .fi-icon { color: var(--fx-ink-3); }
.fi-input, .fi-select-input, .fi-fo-textarea textarea, .fi-input-wrp input, .fi-input-wrp select, .fi-input-wrp textarea { color: var(--fx-ink); }
.fi-input::placeholder, .fi-input-wrp input::placeholder, .fi-input-wrp textarea::placeholder, .fi-select-input-placeholder { color: var(--fx-ink-3); }
/* Filament's own skip link: the header already has one ("Sari la conținut"), first in the page. */
html:has(.fx-skip) .fi-skip-link { display: none; }
/* File uploads: the file's size and the remove word readable on the dark file bar. */
.fi-fo-file-upload .filepond--file-info-sub { font-size: var(--fx-fs-12); opacity: 0.85; }
.fi-fo-file-upload .filepond--item-panel { background-color: var(--fx-graphite-2); }
/* Errors: the factory's colour, as agreed: a coloured edge and the words in its readable shade. */
.fi-input-wrp.fi-invalid { --tw-ring-color: var(--fx-brand-line); background-color: color-mix(in oklab, var(--fx-brand-tint) 45%, var(--fx-surface)); }
.fi-input-wrp:not(.fi-disabled):not(:has(.fi-input-wrp-actions :focus)).fi-invalid:focus-within { --tw-ring-color: var(--fx-brand); }
.fi-fo-field .fi-fo-field-wrp-error-message, .fi-fo-file-upload .fi-fo-file-upload-error-message {
    color: var(--fx-brand-text);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-medium);
}
html.fx-motion .fi-fo-field-wrp-error-message { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter); }
/* Checkboxes, radios and toggles: graphite when on. */
input[type=checkbox].fi-checkbox-input, input[type=radio].fi-radio-input { --tw-ring-color: var(--fx-line-2); transition: background-color var(--fx-dur-1) var(--fx-ease-out); }
input[type=checkbox].fi-checkbox-input:checked, input[type=checkbox].fi-checkbox-input:indeterminate,
input[type=radio].fi-radio-input:checked { background-color: var(--fx-graphite); color: var(--fx-graphite); --tw-ring-color: var(--fx-graphite); }
input[type=checkbox].fi-checkbox-input, input[type=radio].fi-radio-input { color: var(--fx-graphite); }
input[type=checkbox].fi-checkbox-input:focus, input[type=radio].fi-radio-input:focus,
input[type=checkbox].fi-checkbox-input:checked:focus, input[type=radio].fi-radio-input:checked:focus { --tw-ring-color: var(--fx-graphite); }
.fi-toggle { position: relative; background-color: var(--fx-line-2); touch-action: manipulation; }
.fi-toggle.fi-toggle-on, .fi-toggle.fi-toggle-on.fi-color { background-color: var(--fx-graphite); }
.fi-toggle.fi-toggle-on .fi-icon, .fi-toggle.fi-toggle-on.fi-color .fi-icon { color: var(--fx-graphite); }
.fi-toggle > :first-child { transition: translate var(--fx-dur-3) var(--fx-ease-move); box-shadow: 0 1px 3px rgb(31 35 40 / 0.25); }
/* Choice buttons (ToggleButtons, "Acest pas este"): graphite when chosen. */
input:checked + label.fi-btn:not(.fi-outlined), .fi-btn:not(.fi-outlined)[aria-pressed=true],
input:checked + .fi-btn:not(.fi-outlined).fi-color:is(label, [aria-pressed]),
.fi-btn:not(.fi-outlined).fi-color:is(label, [aria-pressed])[aria-pressed=true] {
    --bg: var(--fx-graphite);
    --hover-bg: var(--fx-graphite-2);
    --text: var(--fx-on-dark);
    --hover-text: var(--fx-on-dark);
    background-color: var(--fx-graphite);
    color: var(--fx-on-dark);
}
input:checked + label.fi-btn > .fi-icon, .fi-btn[aria-pressed=true] > .fi-icon { color: var(--fx-on-dark); }
.fi-fo-toggle-buttons .fi-btn:is(label) { box-shadow: inset 0 0 0 1px var(--fx-line-2); }
.fi-fo-checkbox-list-option-label, .fi-fo-radio-label { color: var(--fx-ink); }
.fi-fo-checkbox-list-option-description, .fi-fo-radio-description { color: var(--fx-ink-3); }
.fi-fo-checkbox-list .fi-link, .fi-fo-checkbox-list-actions .fi-link { color: var(--fx-ink-2); }
/* Repeaters: each item a small card inside its panel. */
.fi-fo-repeater-item {
    border-radius: var(--fx-r-card);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-0), 0 2px 6px -2px rgb(31 35 40 / 0.06);
}
.fi-fo-repeater-item-header { border-color: var(--fx-line); background: var(--fx-sunk); border-radius: var(--fx-r-card) var(--fx-r-card) 0 0; }
.fi-fo-repeater-item.fi-collapsed .fi-fo-repeater-item-header { border-radius: var(--fx-r-card); }
.fi-fo-repeater-item-header-label { color: var(--fx-graphite); font-weight: var(--fx-fw-semibold); }
.fi-fo-repeater-item-content { border-color: var(--fx-line); }
:is(.fi-fo-repeater-add, .fi-fo-simple-repeater-add, .fi-fo-table-repeater-add) .fi-btn:not(.fi-color-primary) { width: 100%; min-height: var(--fx-tap); background: transparent; box-shadow: none; border: 1px dashed var(--fx-line-2); color: var(--fx-ink-2); }
@media (hover: hover) and (pointer: fine) {
    :is(.fi-fo-repeater-add, .fi-fo-simple-repeater-add, .fi-fo-table-repeater-add) .fi-btn:not(.fi-color-primary):hover { background: var(--fx-surface); border-color: var(--fx-ink-disabled); color: var(--fx-ink); }
}
html.fx-motion :is(.fi-fo-repeater-items > .fi-fo-repeater-item, .fi-fo-simple-repeater-item) { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter) backwards; }
/* File uploads: a quiet well; the action words grey. */
.fi-fo-file-upload .filepond--panel-root { background: var(--fx-sunk); border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-inset); }
.fi-fo-file-upload .filepond--drop-label { color: var(--fx-ink-2); }
.fi-fo-file-upload .filepond--label-action { color: var(--fx-ink); text-decoration-color: var(--fx-line-2); }
.fi-fo-file-upload .filepond--root { max-height: 12rem; font-family: var(--fx-font); }
.fi-fo-file-upload .filepond--image-preview-wrapper { max-height: 9rem; }
.fi-fo-file-upload .filepond--item-panel { border-radius: var(--fx-r-ctl); }
/* Logos are previewed on a light, checked well, not on black: a logo for light backgrounds must show as it will. */
.fi-fo-file-upload .filepond--image-preview { background: repeating-conic-gradient(var(--fx-sunk) 0 25%, var(--fx-surface) 0 50%) 0 0 / 16px 16px; }
.fi-fo-file-upload .filepond--image-preview-overlay-idle { color: rgb(31 35 40 / 0.4); }
/* Fieldsets and dividers inside forms. */
.fi-fo-fieldset, .fi-sc-fieldset { border-color: var(--fx-line); border-radius: var(--fx-r-card); }
.fi-sc-fieldset > legend, .fi-fo-fieldset > legend { color: var(--fx-graphite); font-weight: var(--fx-fw-semibold); }
/* Date picker (Filament's own): the chosen day in graphite. */
.fi-fo-date-time-picker .fi-fo-date-time-picker-calendar .fi-fo-date-time-picker-calendar-day.fi-selected { background-color: var(--fx-graphite); color: var(--fx-on-dark); }
.fi-fo-date-time-picker .fi-fo-date-time-picker-calendar .fi-fo-date-time-picker-calendar-day.fi-fo-date-time-picker-calendar-day-today:not(.fi-selected) { color: var(--fx-ink); font-weight: var(--fx-fw-bold); }

/* Phones: 16px text in every field (no zoom), taller controls. */
@media (max-width: 767.98px) {
    .fi-input, .fi-input-wrp input, .fi-input-wrp select, .fi-input-wrp textarea, .fi-select-input, .fi-fo-textarea textarea { font-size: var(--fx-fs-16); }
}

/* ======================================================================================= Read-only details (infolists)
   The value carries the weight; the label is the quiet line above it. */
.fi-in-entry-label { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fi-in-text-item { color: var(--fx-ink); font-size: var(--fx-fs-16); font-weight: var(--fx-fw-medium); }
.fi-in-placeholder { color: var(--fx-ink-3); }
.fi-in-text-has-badges .fi-badge { font-size: var(--fx-fs-13); }

/* ======================================================================================= Tabs: a segmented control */
.fi-tabs:not(.fi-contained) {
    background: var(--fx-canvas-deep);
    border-radius: var(--fx-r-ctl);
    box-shadow: var(--fx-shadow-inset);
    padding: 4px;
    gap: 2px;
    scrollbar-width: none;
}
.fi-tabs.fi-contained { border-color: var(--fx-line); padding: var(--fx-s-2) var(--fx-s-3); gap: 2px; scrollbar-width: none; }
.fi-tabs::-webkit-scrollbar { display: none; }
.fi-tabs-item {
    border-radius: calc(var(--fx-r-ctl) - 4px);
    white-space: nowrap;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
    touch-action: manipulation;
}
.fi-tabs-item:active { transform: scale(0.97); }
@media (max-width: 639.98px) { .fi-tabs-item { padding-inline: var(--fx-s-2); } }
/* A list's status chips on a phone wrap onto a second row instead of scrolling sideways, so every chip (Observație
   and Urgent included) is in sight at once. */
@media (max-width: 639.98px) {
    .fi-resource-list-records-page .fi-tabs:not(.fi-contained) { flex-wrap: wrap; overflow-x: visible; justify-content: flex-start; }
    .fi-resource-list-records-page .fi-tabs:not(.fi-contained) .fi-tabs-item { flex: 0 0 auto; }
}
.fi-tabs-item .fi-tabs-item-label { color: var(--fx-ink-2); font-weight: var(--fx-fw-semibold); }
.fi-tabs-item > .fi-icon { color: var(--fx-ink-3); }
.fi-tabs-item.fi-active { background: var(--fx-surface); box-shadow: 0 1px 2px rgb(31 35 40 / 0.08), 0 0 0 1px rgb(31 35 40 / 0.05); }
.fi-tabs.fi-contained .fi-tabs-item.fi-active { background: var(--fx-sunk); box-shadow: inset 0 -2px 0 var(--fx-graphite); }
.fi-tabs-item.fi-active .fi-tabs-item-label, .fi-tabs-item.fi-active > .fi-icon { color: var(--fx-graphite); }
@media (hover: hover) and (pointer: fine) {
    .fi-tabs-item:not(.fi-active):hover { background: rgb(255 255 255 / 0.55); }
    .fi-tabs-item:not(.fi-active):hover .fi-tabs-item-label { color: var(--fx-ink); }
}
html.fx-motion .fi-sc-tabs-tab.fi-active { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter); }

/* ======================================================================================= Menus (dropdowns): floating glass */
.fi-dropdown-panel {
    background: var(--fx-glass-strong);
    -webkit-backdrop-filter: var(--fx-glass-filter);
    backdrop-filter: var(--fx-glass-filter);
    border-radius: var(--fx-r-card);
    box-shadow: var(--fx-glass-edge), var(--fx-shadow-3);
    transform-origin: top;
    transition: opacity var(--fx-dur-3) var(--fx-ease-enter), scale var(--fx-dur-3) var(--fx-ease-enter), translate var(--fx-dur-3) var(--fx-ease-enter);
}
.fi-dropdown-panel.fi-opacity-0 { scale: 0.97; translate: 0 -4px; transition-duration: var(--fx-dur-exit-3); transition-timing-function: var(--fx-ease-exit); }
.fi-dropdown-panel > :not(:last-child) { border-color: var(--fx-line); }
.fi-dropdown-list { padding: 6px; }
.fi-dropdown-list-item { border-radius: calc(var(--fx-r-card) - 6px); color: var(--fx-ink); transition: background-color var(--fx-dur-1) var(--fx-ease-out); }
.fi-dropdown-list-item .fi-dropdown-list-item-label { color: var(--fx-ink); }
.fi-dropdown-list-item > .fi-icon, .fi-dropdown-list-item > .fi-icon.fi-color { color: var(--fx-ink-3); }
.fi-dropdown-list-item.fi-color-danger .fi-dropdown-list-item-label, .fi-dropdown-list-item.fi-color-danger > .fi-icon { color: var(--fx-bad); }
/* The action that writes an Observație (in the order's menu): its note icon in amber, the word in ink. */
.fi-dropdown-list-item.fx-remark-action > .fi-icon { color: var(--fx-st-remark); }
@media (hover: hover) and (pointer: fine) {
    .fi-dropdown-list-item:not(.fi-disabled):not([disabled]):hover, .fi-dropdown-list-item.fi-color:not(.fi-disabled):not([disabled]):hover { background-color: var(--fx-hover); }
    .fi-dropdown-list-item.fi-color-danger:not(.fi-disabled):not([disabled]):hover { background-color: var(--fx-bad-bg); }
}
.fi-dropdown-list-item.fi-selected, .fi-dropdown-list-item.fi-color.fi-selected { background-color: var(--fx-sunk); }
.fi-dropdown-header { color: var(--fx-ink-2); }
/* Filters, column manager and other panels inside a menu */
.fi-ta-filters-dropdown .fi-ta-filters, .fi-ta-col-manager { padding: var(--fx-s-4); }
.fi-ta-filters-heading, .fi-ta-col-manager-heading { color: var(--fx-graphite); font-weight: var(--fx-fw-strong); }
.fi-ta-filters-header .fi-link, .fi-ta-col-manager-header .fi-link { color: var(--fx-ink-2); }

/* ======================================================================================= Dialogs (modals) and side panels */
.fi-modal-close-overlay { background-color: var(--fx-scrim); }
.fi-modal > .fi-modal-window-ctn { z-index: var(--fx-z-modal); }
.fi-modal.fi-modal-open ~ .fi-modal.fi-modal-open > .fi-modal-close-overlay, .fi-modal.fi-modal-open ~ .fi-modal.fi-modal-open > .fi-modal-window-ctn { z-index: var(--fx-z-modal-window); }
.fi-modal > .fi-modal-window-ctn > .fi-modal-window {
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-4);
}
.fi-modal:not(.fi-modal-slide-over):not(.fi-width-screen) > .fi-modal-window-ctn > .fi-modal-window { border-radius: var(--fx-r-sheet); }
.fi-modal:not(.fi-modal-slide-over):not(.fi-width-screen).fi-modal-has-sticky-header > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-header { border-radius: var(--fx-r-sheet) var(--fx-r-sheet) 0 0; }
.fi-modal:not(.fi-modal-slide-over):not(.fi-width-screen).fi-modal-has-sticky-footer > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-footer { border-radius: 0 0 var(--fx-r-sheet) var(--fx-r-sheet); }
.fi-modal-heading { color: var(--fx-graphite); font-size: var(--fx-fs-20); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); letter-spacing: var(--fx-track-head); }
.fi-modal-description { color: var(--fx-ink-2); }
.fi-modal-header, .fi-modal-footer { border-color: var(--fx-line); }
.fi-modal-close-btn { color: var(--fx-ink-3); }
.fi-modal-icon-bg { background: var(--fx-sunk); }
.fi-modal-icon-bg .fi-icon { color: var(--fx-ink-2); }
.fi-modal-icon-bg.fi-color-danger { background: var(--fx-bad-bg); }
.fi-modal-icon-bg.fi-color-danger .fi-icon { color: var(--fx-bad); }
/* Arriving: a short rise with a soft landing; leaving: quicker. */
.fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter {
    transition-property: opacity, scale, translate;
    transition-duration: var(--fx-dur-4);
    transition-timing-function: var(--fx-ease-enter);
}
.fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave {
    transition-property: opacity, scale, translate;
    transition-duration: var(--fx-dur-exit-4);
    transition-timing-function: var(--fx-ease-exit);
}
.fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-start,
.fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-end { opacity: 0; scale: 0.96; translate: 0 10px; }
.fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-end,
.fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-start { opacity: 1; scale: 1; translate: 0 0; }
/* Side panels float: inset from the edges, with round corners. */
@media (min-width: 640px) {
    .fi-modal.fi-modal-slide-over > .fi-modal-window-ctn > .fi-modal-window {
        height: calc(100dvh - 2 * var(--fx-s-3));
        margin-block: var(--fx-s-3);
        border-radius: var(--fx-r-sheet);
    }
    .fi-modal.fi-modal-slide-over-from-end > .fi-modal-window-ctn > .fi-modal-window { margin-inline-end: var(--fx-s-3); }
    .fi-modal.fi-modal-slide-over-from-start > .fi-modal-window-ctn > .fi-modal-window { margin-inline-start: var(--fx-s-3); }
    .fi-modal.fi-modal-slide-over > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-start,
    .fi-modal.fi-modal-slide-over > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-end { translate: calc(100% + 2 * var(--fx-s-3)) 0; }
    .fi-modal.fi-modal-slide-over.fi-modal-slide-over-from-start > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-start,
    .fi-modal.fi-modal-slide-over.fi-modal-slide-over-from-start > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-end { translate: calc(-100% - 2 * var(--fx-s-3)) 0; }
}
/* Phones: every dialog and side panel is a bottom sheet with a grab handle. */
@media (max-width: 639.98px) {
    .fi-modal > .fi-modal-window-ctn,
    .fi-modal:not(.fi-modal-slide-over):not(.fi-width-screen) > .fi-modal-window-ctn {
        grid-template-rows: 1fr auto;
        padding: var(--fx-s-6) 0 0;
    }
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window,
    .fi-modal:not(.fi-width-screen) > .fi-modal-window-ctn > .fi-modal-window {
        grid-row-start: 2;
        align-self: end;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: calc(100dvh - var(--fx-s-6) - var(--fx-safe-t));
        margin: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: var(--fx-r-sheet) var(--fx-r-sheet) 0 0;
        padding-bottom: var(--fx-safe-b);
    }
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window::before {
        content: '';
        display: block;
        flex-shrink: 0;
        width: 40px;
        height: 5px;
        margin: var(--fx-s-2) auto 0;
        border-radius: var(--fx-r-pill);
        background: var(--fx-line-2);
    }
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-start,
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-end { opacity: 1; scale: 1; translate: 0 100%; }
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-enter-end,
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window.fi-transition-leave-start { opacity: 1; scale: 1; translate: 0 0; }
    .fi-modal-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--fx-s-2); }
    .fi-modal-footer-actions > :only-child { grid-column: 1 / -1; }
    .fi-modal-footer-actions .fi-btn { min-height: var(--fx-tap-lg); }
}

/* ======================================================================================= Toasts (Filament notifications)
   Light glass cards; under the header on a computer, above the dock and any floating bar on phones and tablets. */
.fi-no { z-index: var(--fx-z-toast); }
/* On a computer too they stack at the bottom right, so they never cover the header's buttons. */
@media (min-width: 1024px) {
    .fi-no { inset: auto max(var(--fx-gutter), var(--fx-safe-r)) calc(var(--fx-bottom-stack) + var(--fx-s-4)) auto; flex-direction: column-reverse; justify-content: flex-start; }
}
@media (max-width: 1023.98px) {
    .fi-no {
        inset: auto max(var(--fx-gutter), var(--fx-safe-l)) calc(var(--fx-bottom-stack) + var(--fx-s-2)) max(var(--fx-gutter), var(--fx-safe-r));
        flex-direction: column-reverse;
        align-items: center;
    }
    .fi-no .fi-no-notification.fi-transition-enter-start { translate: 0 12px; scale: 0.98; }
}
.fi-no-notification:not(.fi-inline), .fi-no-notification.fi-color:not(.fi-inline) {
    background: var(--fx-glass-strong);
    -webkit-backdrop-filter: var(--fx-glass-filter);
    backdrop-filter: var(--fx-glass-filter);
    border-radius: var(--fx-r-float);
    box-shadow: var(--fx-glass-edge), var(--fx-shadow-3);
    padding: var(--fx-s-4);
    transition-property: opacity, scale, translate;
    transition-duration: var(--fx-dur-3);
    transition-timing-function: var(--fx-ease-enter);
}
.fi-no-notification.fi-transition-leave { transition-duration: var(--fx-dur-exit-3); transition-timing-function: var(--fx-ease-exit); }
.fi-no-notification .fi-no-notification-title { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fi-no-notification .fi-no-notification-body, .fi-no-notification.fi-color .fi-no-notification-body { color: var(--fx-ink-2); }
.fi-no-notification .fi-no-notification-date { color: var(--fx-ink-3); }
.fi-no-notification .fi-no-notification-icon { color: var(--fx-ink-3); }
.fi-no-notification .fi-no-notification-icon.fi-color-success { color: var(--fx-ok-fill); }
.fi-no-notification .fi-no-notification-icon.fi-color-warning { color: var(--fx-warn-fill); }
.fi-no-notification .fi-no-notification-icon.fi-color-danger { color: var(--fx-bad-fill); }
.fi-no-notification .fi-no-notification-icon.fi-color-info { color: var(--fx-info-fill); }
html.fx-motion .fi-no-notification .fi-no-notification-icon.fi-color-success { animation: fx-pop var(--fx-dur-4) var(--fx-ease-out) var(--fx-dur-1) backwards; }
.fi-no-notification .fi-icon-btn { color: var(--fx-ink-3); }

/* ======================================================================================= Floating save bar
   Filament's sticky form actions: a glass bar that floats above the dock (8px above it) while the real buttons
   are out of view. */
.fi-sc-actions.fi-sticky .fi-ac {
    isolation: isolate;
    bottom: calc(var(--fx-bottom-gap) + var(--fx-dock-h) * 1.125);
    z-index: var(--fx-z-bar);
    background: transparent;
    border-radius: var(--fx-r-float);
    box-shadow: var(--fx-shadow-3);
    padding: var(--fx-s-3) var(--fx-s-4);
    gap: var(--fx-s-2);
    margin-inline: 0;
}
.fi-sc-actions.fi-sticky .fi-ac::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: var(--fx-glass);
    -webkit-backdrop-filter: var(--fx-glass-filter);
    backdrop-filter: var(--fx-glass-filter);
    box-shadow: var(--fx-glass-edge);
}
html.fx-motion .fi-sc-actions.fi-sticky .fi-ac { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter); }
/* Phones and upright tablets: the bar sits on the dock as one glass slab, exactly the dock's joined width
   (fx-nav.css widens the dock and squares its top while a sticky bar shows), its buttons sharing the width. */
@media (max-width: 1023.98px) {
    .fi-sc-actions.fi-sticky .fi-ac {
        --fx-save-bar-max: 480px;
        left: 0;
        right: 0;
        bottom: calc(var(--fx-bottom-gap) + var(--fx-dock-h));
        width: min(calc(100% - 24px - var(--fx-safe-l) - var(--fx-safe-r)), var(--fx-save-bar-max)) !important;
        margin-inline: auto;
        padding: var(--fx-s-2);
        border-radius: var(--fx-r-float) var(--fx-r-float) 0 0;
        /* the slab's hairline and a soft lift above it, so its top edge shows over a white form */
        box-shadow: inset 0 -1px 0 var(--fx-line-soft), 0 0 0 1px color-mix(in oklab, var(--fx-ink) 7%, transparent),
            0 -10px 24px -14px color-mix(in oklab, var(--fx-ink) 24%, transparent);
    }
    .fi-sc-actions.fi-sticky .fi-ac > .fi-btn { flex: 1 1 0; min-width: 0; min-height: var(--fx-tap); }
    .fi-sc-actions.fi-sticky .fi-ac > .fi-btn.fi-color-primary { flex-grow: 1.6; }
    /* Three actions or more (the Real): only the main one floats; the others wait at the end of the form. */
    .fi-sc-actions.fi-sticky .fi-ac:has(> :nth-child(3)):has(> .fi-color-primary) > :not(.fi-color-primary) { display: none; }
    /* No dock under it: the bar floats on its own. */
    html:not(:has(.fx-dock)) .fi-sc-actions.fi-sticky .fi-ac { border-radius: var(--fx-r-float); box-shadow: var(--fx-shadow-3); }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
    .fi-sc-actions.fi-sticky .fi-ac { --fx-save-bar-max: 560px; }
}

/* ======================================================================================= Touch: 44px targets on phones and tablets */
@media (pointer: coarse) {
    .fi-btn { min-height: var(--fx-tap); }
    .fi-icon-btn { min-width: var(--fx-tap); min-height: var(--fx-tap); }
    /* The field itself is the target, not only its frame. */
    .fi-input-wrp :is(input.fi-input, select.fi-select-input, .fi-select-input-btn) { min-height: var(--fx-tap); }
    /* The login's "Ține-mă minte": the whole label row is the target. */
    .fi-fo-field-label:has(> .fi-checkbox-input) { min-height: var(--fx-tap); align-items: center; }
    /* File uploads: Filament's round buttons (remove, retry) get the same invisible margin as other small marks. */
    .fi-fo-file-upload .filepond--file-action-button { position: relative; }
    .fi-fo-file-upload .filepond--file-action-button::after { content: ''; position: absolute; inset: -9px; }
    .fi-select-input-value-remove-btn { position: relative; }
    .fi-select-input-value-remove-btn::after { content: ''; position: absolute; inset: -12px; }
    .fi-tabs-item, .fi-pagination-item-btn, .fi-dropdown-list-item { min-height: var(--fx-tap); }
    input[type=checkbox].fi-checkbox-input, input[type=radio].fi-radio-input { width: 1.375rem; height: 1.375rem; }
    /* Small text links and marks keep their look; an invisible margin around them takes the thumb. */
    :is(.fi-ac-link-action, .fi-ta-actions .fi-link, .fi-ta-header-cell-sort-btn, .fi-fo-field-wrp-hint .fi-link, .fi-ta-filter-indicators .fi-link,
        .fi-fo-checkbox-list .fi-link, .fi-section-header-after-ctn .fi-link, .fi-breadcrumbs a, .fi-badge-delete-btn, .fi-toggle,
        .fi-input-wrp-actions .fi-icon-btn, .fi-fo-repeater-item-header .fi-icon-btn) { position: relative; }
    :is(.fi-ac-link-action, .fi-ta-actions .fi-link, .fi-ta-header-cell-sort-btn, .fi-fo-field-wrp-hint .fi-link, .fi-ta-filter-indicators .fi-link,
        .fi-fo-checkbox-list .fi-link, .fi-section-header-after-ctn .fi-link, .fi-breadcrumbs a)::after { content: ''; position: absolute; inset: -13px -6px; }
    :is(.fi-badge-delete-btn, .fi-toggle, .fi-input-wrp-actions .fi-icon-btn)::after { content: ''; position: absolute; inset: -12px; }
}
/* Phone cards: the whole card opens the record (the first cell's link is stretched over it); its buttons and
   checkbox stay on top. */
@media (max-width: 639.98px) {
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row > .fi-ta-cell:first-of-type a.fi-ta-col::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: var(--fx-r-card);
    }
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row > :is(.fi-ta-cell:has(.fi-ta-actions, .fi-ta-col-has-column-url), .fi-ta-selection-cell) { position: relative; z-index: 1; }
    /* A cell with its own link (a phone number to call) keeps it, at thumb size. */
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row a.fi-ta-col-has-column-url { display: inline-flex; align-items: center; min-height: var(--fx-tap); }
}
/* In a table (not the phone cards), the links that fill each cell are at least thumb height on touch screens. */
@media (pointer: coarse) {
    .fi-ta-table:not(.fi-ta-table-stacked-on-mobile) .fi-ta-cell > a.fi-ta-col { min-height: var(--fx-tap); }
}
@media (pointer: coarse) and (min-width: 640px) {
    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-cell > a.fi-ta-col { min-height: var(--fx-tap); }
}

/* ======================================================================================= Login: a floating card on the factory's wing
   On arrival a graphite shutter rolls up out of the way, the card already waiting behind it, and the factory's wing
   settles in behind the card (fx-tokens.css): its feathers spread out on both sides. */
.fi-simple-layout {
    position: relative;
    background:
        radial-gradient(70rem 42rem at 50% -8%, rgb(255 255 255 / 0.95), transparent 62%),
        radial-gradient(50rem 30rem at 50% 110%, rgb(35 31 32 / 0.08), transparent 70%),
        var(--fx-canvas);
    overflow: hidden;
}
.fi-simple-layout::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: var(--fx-z-top);
    pointer-events: none;
    background:
        linear-gradient(0deg, var(--fx-graphite-3) 0 10px, transparent 10px),
        repeating-linear-gradient(180deg, rgb(255 255 255 / 0.07) 0 1px, transparent 1px 22px, rgb(0 0 0 / 0.35) 22px 24px),
        var(--fx-graphite);
    box-shadow: 0 12px 40px rgb(20 16 17 / 0.45);
    transform: translateY(calc(-100% - 60px));
}
html.fx-motion .fi-simple-layout::before { animation: fx-shutter-up var(--fx-dur-show) var(--fx-ease-in-out) var(--fx-dur-1) backwards; }
@keyframes fx-shutter-up { from { transform: none; } }
.fi-simple-main-ctn { position: relative; z-index: 1; --fx-wing-size: min(46rem, 160vw); --fx-wing-y: 44%; --fx-wing-tone: rgb(35 31 32 / 0.05); }
/* A phone: the card fills the width, so the wing rises above it instead, its feathers reaching up over the card. */
@media (max-width: 639.98px) {
    .fi-simple-main-ctn { --fx-wing-size: 100vw; --fx-wing-y: 24%; }
}
.fi-simple-main {
    background: var(--fx-surface);
    border-radius: var(--fx-r-sheet);
    box-shadow: var(--fx-shadow-4);
    padding: var(--fx-s-8) var(--fx-s-8) var(--fx-s-7);
}
html.fx-motion .fi-simple-main { animation: fx-rise var(--fx-dur-5) var(--fx-ease-enter) var(--fx-dur-count) backwards; }
.fi-simple-header { gap: var(--fx-s-2); }
.fi-simple-header .fx-brand img { height: 3rem; margin-bottom: var(--fx-s-2); }
.fi-simple-header-heading { color: var(--fx-graphite); font-size: var(--fx-fs-24); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); letter-spacing: var(--fx-track-head); }
.fi-simple-header-subheading { color: var(--fx-ink-3); }
.fi-simple-main .fi-btn.fi-color-primary { min-height: var(--fx-tap-main); font-size: var(--fx-fs-16); }
.fi-simple-main .fi-input-wrp { min-height: var(--fx-tap); }
@media (pointer: coarse), (max-width: 1023.98px) {
    .fi-simple-main .fi-input-wrp, .fi-simple-main .fi-btn { min-height: 3.25rem; }
    .fi-simple-main .fi-input { font-size: var(--fx-fs-16); }
    .fi-simple-main .fi-checkbox-input { width: 1.4rem; height: 1.4rem; }
    .fi-simple-main .fi-input-wrp-actions .fi-icon-btn { min-width: var(--fx-tap); min-height: var(--fx-tap); }
}
@media (max-width: 639.98px) {
    .fi-simple-main { margin-inline: var(--fx-s-4); width: auto; padding: var(--fx-s-7) var(--fx-s-5) var(--fx-s-6); border-radius: var(--fx-r-float); }
}

/* ======================================================================================= Shared pieces (other parts use these) */
/* Numbers that matter: narrower, even figures. */
.fx-num, .fx-count { font-stretch: var(--fx-wdth-num); font-variant-numeric: tabular-nums; letter-spacing: var(--fx-track-num); }
/* A blank filled in later (an e-mail template's "order number"): a quiet marked word, not code. */
.fx-token { display: inline-block; padding: 0 0.375rem; border-radius: var(--fx-r-xs); background: var(--fx-sunk); box-shadow: inset 0 0 0 1px var(--fx-line); color: var(--fx-ink-2); font-size: 0.92em; font-weight: var(--fx-fw-semibold); line-height: 1.5; }

/* A panel outside Filament's sections (dashboard, line board, statistics). */
.fx-panel { background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); overflow: hidden; }
.fx-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fx-s-1) var(--fx-s-4); padding: var(--fx-s-4) var(--fx-pad-panel) var(--fx-s-2); flex-wrap: wrap; }
.fx-panel-head h2 { margin: 0; font-size: var(--fx-fs-18); line-height: var(--fx-lh-snug); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); letter-spacing: var(--fx-track-head); color: var(--fx-graphite); }
.fx-panel-head p { margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-empty { margin: 0; padding: var(--fx-s-6) var(--fx-pad-panel); color: var(--fx-ink-3); font-size: var(--fx-fs-14); }

/* Lists of rows (dashboard) */
.fx-list { list-style: none; margin: 0; padding: 0 0 var(--fx-s-2); }
.fx-list li { border-top: 1px solid var(--fx-line); }
.fx-list li:first-child { border-top: 0; }
.fx-list a, .fx-list .row { display: flex; align-items: center; gap: var(--fx-s-3); padding: var(--fx-s-3) var(--fx-pad-panel); min-height: var(--fx-tap); color: inherit; text-decoration: none; transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
.fx-list a:active { background: var(--fx-sunk); }
@media (hover: hover) and (pointer: fine) {
    .fx-list a:hover { background: var(--fx-hover); }
}
.fx-list .main { flex: 1; min-width: 0; }
.fx-list .main b { color: var(--fx-graphite); font-variant-numeric: tabular-nums; }
.fx-list .main span { display: block; font-size: var(--fx-fs-13); color: var(--fx-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-list .when { font-size: var(--fx-fs-13); color: var(--fx-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Small reason pills: red is trouble (the status red, never the factory's colour), amber is waiting. */
.fx-reason { display: inline-flex; align-items: center; gap: var(--fx-s-1); font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); padding: 0.15rem 0.55rem; border-radius: var(--fx-r-pill); white-space: nowrap; background: var(--fx-sunk); color: var(--fx-ink-2); box-shadow: inset 0 0 0 1px var(--fx-line); }
.fx-reason.red { background: var(--fx-st-urgent-bg); color: var(--fx-st-urgent-text); box-shadow: none; }
.fx-reason.amber { background: var(--fx-st-work-bg); color: var(--fx-st-work-text); box-shadow: none; }
.fx-reason.green { background: var(--fx-st-done-bg); color: var(--fx-st-done-text); box-shadow: none; }

/* Bar lists: one row per step, worker or person; the bar shows the share. New markup puts an
   <i class="fx-grow-x" style="--fx-v: .42; --fx-i: 2"> in the track (it grows in and glides on change);
   the old <i style="width: 42%"> still works. */
.fx-bars { list-style: none; margin: 0; padding: var(--fx-s-1) var(--fx-pad-panel) var(--fx-s-4); display: grid; gap: var(--fx-s-2); }
.fx-bars li { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(3rem, 1fr) minmax(2.5rem, auto); align-items: center; gap: var(--fx-s-3); min-height: 28px; }
.fx-bars .lbl { font-size: var(--fx-fs-14); color: var(--fx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-bars .lbl small { color: var(--fx-ink-3); margin-left: var(--fx-s-1); font-size: var(--fx-fs-13); }
.fx-bars .track { position: relative; height: 10px; border-radius: var(--fx-r-pill); background: var(--fx-canvas-deep); box-shadow: var(--fx-shadow-inset); overflow: hidden; }
.fx-bars .track i { display: block; height: 100%; border-radius: var(--fx-r-pill); background: var(--fx-graphite); }
.fx-bars .track i.fx-grow-x { width: 100%; }
.fx-bars b { text-align: right; font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); color: var(--fx-graphite); font-stretch: var(--fx-wdth-num); font-variant-numeric: tabular-nums; }
.fx-bars li.zero .lbl, .fx-bars li.zero b { color: var(--fx-ink-3); }
.fx-bars li.zero .track i { opacity: 0; }
@media (max-width: 639.98px) {
    .fx-bars li { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--fx-s-1); }
    .fx-bars .track { grid-column: 1 / -1; grid-row: 2; }
}

/* The line board's two live panels. */
.fx-lb { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--fx-gap); }
.fx-lb .fx-panel-head p b { color: var(--fx-graphite); font-size: var(--fx-fs-14); }
.fx-lb-empty { display: flex; align-items: center; gap: var(--fx-s-3); padding: var(--fx-s-4) var(--fx-pad-panel) var(--fx-s-6); color: var(--fx-ink-3); }
.fx-lb-empty p { margin: 0; }
.fx-lb-empty-icon { width: 24px; height: 24px; color: var(--fx-ink-disabled); }
/* Above the products: one quiet row of figures, each a filter of the list (pressed while the list shows it). */
.fx-lb-figs { display: flex; flex-wrap: wrap; gap: var(--fx-s-2); }
.fx-lb-fig { all: unset; box-sizing: border-box; display: inline-flex; align-items: baseline; gap: var(--fx-s-2); min-height: 36px; padding: var(--fx-s-2) var(--fx-s-3); border-radius: var(--fx-r-pill); background: var(--fx-surface); box-shadow: inset 0 0 0 1px var(--fx-line); color: var(--fx-ink-2); font-size: var(--fx-fs-14); cursor: pointer; }
.fx-lb-fig b { color: var(--fx-graphite); font-weight: var(--fx-fw-strong); font-variant-numeric: tabular-nums; }
.fx-lb-fig.is-zero, .fx-lb-fig.is-zero b { color: var(--fx-ink-3); font-weight: var(--fx-fw-regular); }
.fx-lb-fig:hover { background: var(--fx-hover); }
.fx-lb-fig[aria-pressed="true"] { background: var(--fx-graphite); box-shadow: none; color: var(--fx-on-dark); }
.fx-lb-fig[aria-pressed="true"] b { color: var(--fx-on-dark); }
.fx-lb-fig:focus-visible { outline: var(--fx-focus-ring); outline-offset: var(--fx-focus-offset); }
.fx-lb-fig-stuck { align-items: center; color: var(--fx-bad); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fx-bad) 35%, transparent); }
.fx-lb-fig-stuck svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .fx-lb-fig { min-height: 44px; } }
/* Under the products, folded: today per person, thin quiet bars. */
.fx-lb-today > summary, .fx-lb-today-more > summary { display: flex; align-items: center; gap: var(--fx-s-2); min-height: 48px; padding: 0 var(--fx-pad-panel); cursor: pointer; list-style: none; color: var(--fx-ink-2); font-size: var(--fx-fs-14); }
.fx-lb-today > summary::-webkit-details-marker, .fx-lb-today-more > summary::-webkit-details-marker { display: none; }
.fx-lb-today > summary > span { font-weight: var(--fx-fw-semibold); color: var(--fx-ink); }
.fx-lb-today > summary small { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-lb-today > summary small b { color: var(--fx-ink-2); }
.fx-lb-today-chev { width: 16px; height: 16px; margin-left: auto; color: var(--fx-ink-3); transition: transform var(--fx-dur-2) var(--fx-ease); }
.fx-lb-today[open] > summary .fx-lb-today-chev { transform: rotate(180deg); }
.fx-lb-today-more > summary { min-height: 40px; color: var(--fx-ink-3); }
.fx-lb-quiet .track { height: 6px; }
.fx-lb-quiet .track i { background: var(--fx-ink-3); width: calc(var(--fx-v) * 100%); }
.fx-lb-quiet b { font-size: var(--fx-fs-14); color: var(--fx-ink-2); }

/* The borderou on screen: a summary, then one card per order (a table from a landscape tablet up). */
.fx-bdr-sum { display: flex; flex-wrap: wrap; gap: var(--fx-s-2) var(--fx-s-8); margin-bottom: var(--fx-gap); padding: var(--fx-s-4) var(--fx-pad-panel); background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); }
.fx-bdr-sum b { display: block; color: var(--fx-graphite); font-size: var(--fx-fs-24); line-height: var(--fx-lh-tight); font-weight: var(--fx-fw-strong); }
.fx-bdr-sum span { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fx-bdr { background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); overflow: clip; }
.fx-bdr-head { display: none; }
.fx-bdr-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "num amount" "cust cust" "phone agent" "ref ref" "prod prod";
    gap: var(--fx-s-1) var(--fx-s-3);
    padding: var(--fx-s-4) var(--fx-pad-panel);
    border-top: 1px solid var(--fx-line);
    font-size: var(--fx-fs-14);
}
.fx-bdr-order:first-child { border-top: 0; }
.fx-bdr-order.is-urgent { box-shadow: inset 3px 0 0 var(--fx-st-urgent); }
.fx-bdr-num { grid-area: num; display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-1) var(--fx-s-2); }
.fx-bdr-num a { color: var(--fx-graphite); font-size: var(--fx-fs-16); font-weight: var(--fx-fw-strong); text-decoration: none; font-variant-numeric: tabular-nums; border-radius: var(--fx-r-xs); }
.fx-bdr-num a:focus-visible, .fx-bdr-phone a:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-bdr-num small, .fx-bdr-cust small, .fx-bdr-ref small { display: block; width: 100%; color: var(--fx-ink-3); font-size: var(--fx-fs-12); }
.fx-bdr-urgent { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px 1px 5px; border-radius: var(--fx-r-pill); background: var(--fx-st-urgent-bg); color: var(--fx-st-urgent-text); font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); }
.fx-bdr-urgent .fi-icon { width: 14px; height: 14px; }
.fx-bdr-cust { grid-area: cust; min-width: 0; }
.fx-bdr-cust b { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fx-bdr-phone { grid-area: phone; }
.fx-bdr-phone a { display: inline-flex; align-items: center; gap: var(--fx-s-1); min-height: 32px; color: var(--fx-ink); text-decoration: none; font-variant-numeric: tabular-nums; border-radius: var(--fx-r-xs); }
.fx-bdr-phone .fi-icon { width: 16px; height: 16px; color: var(--fx-ink-3); }
.fx-bdr-amount { grid-area: amount; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fx-bdr-amount b { color: var(--fx-graphite); font-weight: var(--fx-fw-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-bdr-ref { grid-area: ref; color: var(--fx-ink-2); }
.fx-bdr-ref:empty { display: none; }
.fx-bdr-agent { grid-area: agent; align-self: center; color: var(--fx-ink-3); font-size: var(--fx-fs-13); text-align: right; }
.fx-bdr-products { grid-area: prod; list-style: none; margin: var(--fx-s-2) 0 0; padding: var(--fx-s-2) 0 0; display: grid; gap: var(--fx-s-1); border-top: 1px dashed var(--fx-line); }
.fx-bdr-products li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--fx-s-2); font-size: var(--fx-fs-13); color: var(--fx-ink-2); }
.fx-bdr-products b { color: var(--fx-ink); font-variant-numeric: tabular-nums; }
.fx-bdr-state { font-style: normal; font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); padding: 0 8px; border-radius: var(--fx-r-pill); background: var(--fx-st-added-bg); color: var(--fx-st-added-text); }
.fx-bdr-state.is-ready { background: var(--fx-st-ready-bg); color: var(--fx-st-ready-text); }
.fx-bdr-state.is-work { background: var(--fx-st-work-bg); color: var(--fx-st-work-text); }
@media (pointer: coarse) { .fx-bdr-phone a { min-height: var(--fx-tap); } }
@media (max-width: 1023.98px) {
    .fx-bdr { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
    .fx-bdr-rows { display: grid; gap: var(--fx-s-3); }
    .fx-bdr-order { background: var(--fx-surface); border: 0; border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-1); }
    .fx-bdr-order.is-urgent { box-shadow: inset 3px 0 0 var(--fx-st-urgent), var(--fx-shadow-1); }
}
@media (min-width: 1024px) {
    .fx-bdr-head, .fx-bdr-order {
        grid-template-columns: 9.5rem minmax(12rem, 1.6fr) 10rem 9.5rem minmax(8rem, 1fr) 8.5rem;
        grid-template-areas: none;
        column-gap: var(--fx-s-4);
        align-items: start;
    }
    .fx-bdr-head { display: grid; padding: var(--fx-s-3) var(--fx-pad-panel); background: var(--fx-sunk); box-shadow: inset 0 -1px 0 var(--fx-line); color: var(--fx-ink-2); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
    .fx-bdr-head .num { text-align: right; }
    .fx-bdr-order > * { grid-area: auto; }
    .fx-bdr-agent { text-align: left; align-self: start; color: var(--fx-ink-2); font-size: var(--fx-fs-14); }
    .fx-bdr-products { grid-column: 2 / -1; }
    @media (hover: hover) and (pointer: fine) {
        .fx-bdr-order:hover { background: var(--fx-hover); }
    }
}
.fx-bdr-empty { display: grid; justify-items: center; gap: var(--fx-s-2); padding: var(--fx-s-9) var(--fx-pad-panel) var(--fx-s-10); background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); text-align: center; }
.fx-bdr-empty h2 { margin: var(--fx-s-2) 0 0; color: var(--fx-graphite); font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); }
.fx-bdr-empty p { margin: 0; max-width: 42ch; color: var(--fx-ink-3); font-size: var(--fx-fs-14); }
.fx-bdr-empty-icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--fx-sunk); box-shadow: var(--fx-shadow-inset); color: var(--fx-ink-3); overflow: hidden; }
.fx-bdr-empty-icon::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 7px, rgb(35 31 32 / 0.05) 7px 8px); }
.fx-bdr-empty-icon .fi-icon { width: 26px; height: 26px; }

/* Plain tables (statistics details, offer lines) in the same style as Filament's. */
.fx-table { width: 100%; border-collapse: collapse; font-size: var(--fx-fs-14); font-variant-numeric: tabular-nums; }
.fx-table th { background: var(--fx-sunk); color: var(--fx-ink-2); font-weight: var(--fx-fw-semibold); font-size: var(--fx-fs-13); text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--fx-line); white-space: nowrap; }
.fx-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--fx-line); color: var(--fx-ink); }
.fx-table .num { text-align: right; }
.fx-table tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) {
    .fx-table tbody tr:hover td { background: var(--fx-hover); }
}
.fx-table tfoot td, .fx-table tr.total td { font-weight: var(--fx-fw-strong); background: var(--fx-sunk); }

/* ======================================================================================= Statistics: ranked bars and charts */
.fx-stat-empty { display: flex; align-items: center; gap: var(--fx-s-3); color: var(--fx-ink-3); font-size: var(--fx-fs-14); }
.fx-stat-empty p { margin: 0; }
.fx-stat-empty-icon { width: 28px; height: 28px; color: var(--fx-ink-disabled); flex-shrink: 0; }
.fx-stat-sum { display: flex; flex-wrap: wrap; gap: var(--fx-s-2) var(--fx-s-8); padding-bottom: var(--fx-s-4); margin-bottom: var(--fx-s-2); border-bottom: 1px solid var(--fx-line); border-radius: var(--fx-r-xs); }
.fx-stat-sum b { display: block; color: var(--fx-graphite); font-size: var(--fx-fs-30); line-height: var(--fx-lh-tight); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-num); letter-spacing: var(--fx-track-num); font-variant-numeric: tabular-nums; }
.fx-stat-sum span { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fx-stat-rank { list-style: none; margin: 0; padding: 0; display: grid; }
.fx-stat-rank li {
    display: grid;
    grid-template-columns: minmax(8rem, 15rem) minmax(4rem, 1fr) minmax(8.5rem, auto);
    align-items: center;
    gap: var(--fx-s-4);
    padding: var(--fx-s-2) 0;
    border-bottom: 1px solid var(--fx-line-soft);
}
.fx-stat-rank li:last-child { border-bottom: 0; }
.fx-stat-name { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-stat-track { height: 12px; border-radius: var(--fx-r-pill); background: var(--fx-canvas-deep); box-shadow: var(--fx-shadow-inset); overflow: hidden; }
.fx-stat-track i { display: block; width: 100%; height: 100%; border-radius: var(--fx-r-pill); background: var(--fx-graphite); }
.fx-stat-rank li:not(:first-child) .fx-stat-track i { background: var(--fx-ink-2); }
.fx-stat-val { text-align: right; line-height: var(--fx-lh-snug); }
.fx-stat-val b { color: var(--fx-graphite); font-size: var(--fx-fs-16); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-stat-val small { display: block; color: var(--fx-ink-3); font-size: var(--fx-fs-12); }
@media (max-width: 639.98px) {
    .fx-stat-sum b { font-size: var(--fx-fs-24); }
    .fx-stat-rank li { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--fx-s-2); }
    .fx-stat-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
}
.fx-stat-subhead { margin: var(--fx-s-6) 0 var(--fx-s-2); color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); }
.fx-stat-lines, .fx-stat-workers { padding: 0; }
.fx-stat-workers { gap: var(--fx-s-1); }
.fx-stat-workers li { grid-template-columns: minmax(9rem, 16rem) minmax(3rem, 1fr) 2.5rem 5.5rem; min-height: 36px; }
.fx-stat-workers li.is-first { margin-top: var(--fx-s-2); padding-top: var(--fx-s-3); border-top: 1px solid var(--fx-line); }
.fx-stat-workers .lbl { display: grid; white-space: normal; font-weight: var(--fx-fw-semibold); }
.fx-stat-workers .lbl small { margin: 0; font-weight: var(--fx-fw-regular); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-stat-avg { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--fx-s-1); color: var(--fx-ink-2); font-size: var(--fx-fs-13); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-stat-avg-icon { width: 14px; height: 14px; color: var(--fx-ink-3); }
@media (max-width: 639.98px) {
    .fx-stat-workers li { grid-template-columns: minmax(0, 1fr) auto auto; }
    .fx-stat-workers .track { grid-column: 1 / -1; grid-row: 2; }
}
.fx-stat-details { margin-top: var(--fx-s-5); }
.fx-stat-details > summary {
    display: inline-flex;
    align-items: center;
    gap: var(--fx-s-2);
    min-height: 36px;
    cursor: pointer;
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    list-style: none;
    border-radius: var(--fx-r-ctl);
}
.fx-stat-details > summary::-webkit-details-marker { display: none; }
.fx-stat-details > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate var(--fx-dur-3) var(--fx-ease-move); }
.fx-stat-details[open] > summary::before { rotate: 45deg; }
.fx-stat-details > summary:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (pointer: coarse) { .fx-stat-details > summary { min-height: var(--fx-tap); } }
.fx-stat-scroll { overflow-x: auto; margin-top: var(--fx-s-2); border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-inset); }
html.fx-motion .fx-stat-details[open] .fx-stat-scroll { animation: fx-fade-up var(--fx-dur-3) var(--fx-ease-enter); }

/* The column chart: graphite columns grow from the axis, the blue line draws itself, its dots pop in. */
.fx-chart { --fx-plot-h: 220px; --fx-line-c: var(--fx-st-road-text); }
.fx-chart-legend { display: flex; flex-wrap: wrap; gap: var(--fx-s-2) var(--fx-s-5); margin-bottom: var(--fx-s-4); color: var(--fx-ink-2); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fx-chart-legend span { display: inline-flex; align-items: center; gap: var(--fx-s-2); }
.fx-chart-legend span::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--fx-graphite); }
.fx-chart-legend .is-line::before { width: 16px; height: 3px; border-radius: 2px; background: var(--fx-line-c); }
.fx-chart-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--fx-s-3); }
.fx-chart-axis { display: flex; flex-direction: column; justify-content: space-between; height: calc(var(--fx-plot-h) + 1.2em); margin-block: -0.6em; line-height: 1.2; color: var(--fx-ink-3); font-size: var(--fx-fs-12); text-align: right; font-variant-numeric: tabular-nums; }
.fx-chart-plot {
    position: relative;
    height: var(--fx-plot-h);
    display: grid;
    grid-template-columns: repeat(var(--fx-cols), minmax(0, 1fr));
    gap: clamp(2px, 1.2%, 12px);
    border-bottom: 1px solid var(--fx-line-2);
    background:
        linear-gradient(var(--fx-line) 0 0) 0 0 / 100% 1px no-repeat,
        linear-gradient(var(--fx-line) 0 0) 0 50% / 100% 1px no-repeat;
}
.fx-chart-col { position: relative; height: 100%; min-width: 0; }
.fx-chart-bar {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: min(70%, 44px);
    height: 100%;
    translate: -50% 0;
    border-radius: 5px 5px 1px 1px;
    background: var(--fx-graphite);
}
@media (hover: hover) and (pointer: fine) {
    .fx-chart-col:hover .fx-chart-bar { background: var(--fx-ink-2); }
}
.fx-chart-val {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    translate: 0 calc(var(--fx-v) * var(--fx-plot-h) * -1);
    text-align: center;
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-12);
    font-weight: var(--fx-fw-semibold);
    font-variant-numeric: tabular-nums;
    transition: translate var(--fx-dur-5) var(--fx-ease-move);
}
.fx-chart.is-dense .fx-chart-val { display: none; }
.fx-chart-dot {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 0;
    width: 9px;
    height: 9px;
    margin: 0 0 -4.5px -4.5px;
    translate: 0 calc(var(--fx-start) * var(--fx-plot-h) * -1);
    border-radius: 50%;
    background: var(--fx-surface);
    box-shadow: 0 0 0 2.5px var(--fx-line-c);
    transition: translate var(--fx-dur-5) var(--fx-ease-move);
}
.fx-chart-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fx-chart-line path { fill: none; stroke: var(--fx-line-c); stroke-width: 2.5px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fx-chart-x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--fx-cols), minmax(0, 1fr)); gap: clamp(2px, 1.2%, 12px); padding-top: var(--fx-s-2); color: var(--fx-ink-3); font-size: var(--fx-fs-12); font-variant-numeric: tabular-nums; }
.fx-chart-x span { text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }
.fx-chart-x .is-minor { visibility: hidden; }
/* The line draws itself from left to right: a wipe, since a dashed draw breaks on a stretched, even-width line. */
@keyframes fx-chart-wipe { from { clip-path: inset(-10px 100% -10px 0); } to { clip-path: inset(-10px 0 -10px 0); } }
html.fx-motion .is-fx-in .fx-chart-line { animation: fx-chart-wipe var(--fx-dur-show) var(--fx-ease-move) var(--fx-dur-3) backwards; }
html.fx-motion .is-fx-quick .fx-chart-line { animation: none; }
html.fx-motion .is-fx-in .fx-chart-val { animation: fx-fade-in var(--fx-dur-3) var(--fx-ease-out) calc(var(--fx-dur-5) + min(var(--fx-i, 0), 12) * 40ms) backwards; }
html.fx-motion .is-fx-in .fx-chart-dot { animation: fx-pop var(--fx-dur-4) var(--fx-ease-out) calc(var(--fx-dur-5) + 2 * var(--fx-dur-1) + min(var(--fx-i, 0), 20) * 30ms) backwards; }
html.fx-motion .is-fx-quick .fx-chart-val, html.fx-motion .is-fx-quick .fx-chart-dot { animation: none; }
@media (max-width: 639.98px) {
    .fx-chart { --fx-plot-h: 180px; }
}

/* The factory's setup checklist: a count, then one row per gap; a green line once nothing is missing. */
.fx-check { display: flex; align-items: center; gap: var(--fx-s-2); margin: 0; color: var(--fx-warn); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); }
.fx-check::before { content: '!'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fx-warn-bg); color: var(--fx-warn); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-bold); flex-shrink: 0; }
.fx-check.is-done { color: var(--fx-ok); }
.fx-check.is-done::before { content: '✓'; background: var(--fx-ok-bg); color: var(--fx-ok); }
.fx-check-list { list-style: none; margin: var(--fx-s-3) 0 0; padding: 0; display: grid; gap: 1px; border-radius: var(--fx-r-card); overflow: hidden; box-shadow: var(--fx-shadow-inset); }
.fx-check-list li { position: relative; padding: var(--fx-s-2) var(--fx-s-3) var(--fx-s-2) var(--fx-s-7); background: var(--fx-sunk); color: var(--fx-ink); font-size: var(--fx-fs-14); line-height: var(--fx-lh-body); }
.fx-check-list li::before { content: ''; position: absolute; left: var(--fx-s-3); top: calc(var(--fx-s-2) + 0.45em); width: 8px; height: 8px; border-radius: 50%; background: var(--fx-warn-fill); }

/* A production line drawn as a small belt of chips (Linii list and the line form). */
.fx-lineflow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-2) var(--fx-s-1); }
.fx-lineflow-step {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 var(--fx-s-1);
    padding: 3px 10px;
    border-radius: var(--fx-r-pill);
    background: var(--fx-sunk);
    box-shadow: inset 0 0 0 1px var(--fx-line);
    color: var(--fx-ink);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    line-height: 1.45;
}
.fx-lineflow-step.is-together { background: var(--fx-surface); box-shadow: inset 0 0 0 1px var(--fx-line-2); border-style: dashed; }
.fx-lineflow-step small { color: var(--fx-ink-3); font-size: var(--fx-fs-12); font-weight: var(--fx-fw-medium); }
.fx-lineflow-arrow { color: var(--fx-ink-disabled); font-size: var(--fx-fs-13); }
.fx-lineflow-problems { display: grid; gap: var(--fx-s-1); margin-top: var(--fx-s-2); color: var(--fx-bad); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
.fx-lineflow-problems span::before { content: '•'; margin-right: var(--fx-s-1); }

/* ======================================================================================= Setări: the hub and its pages */
.fx-hub { display: grid; gap: var(--fx-gap); }
.fx-hub-grid { display: grid; gap: var(--fx-gap); align-items: start; }
@media (min-width: 1024px) { .fx-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-hub-section { background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); overflow: hidden; }
.fx-hub-title { margin: 0; padding: var(--fx-s-4) var(--fx-pad-panel) var(--fx-s-1); color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
.fx-hub-rows { list-style: none; margin: 0; padding: 0 0 var(--fx-s-2); }
.fx-hub-rows li + li .fx-hub-row { box-shadow: inset 0 1px 0 var(--fx-line-soft); }
.fx-hub-row { display: flex; align-items: center; gap: var(--fx-s-3); min-height: 52px; padding: var(--fx-s-2) var(--fx-pad-panel); color: var(--fx-ink); text-decoration: none; transition: background-color var(--fx-dur-2) var(--fx-ease-out); touch-action: manipulation; }
.fx-hub-row:active { background: var(--fx-sunk); }
.fx-hub-row:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-width) * -1); }
@media (hover: hover) and (pointer: fine) { .fx-hub-row:hover { background: var(--fx-hover); } }
.fx-hub-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--fx-ink-2); }
.fx-hub-text { display: grid; flex: 1; min-width: 0; }
.fx-hub-label { font-size: var(--fx-fs-16); font-weight: var(--fx-fw-semibold); color: var(--fx-graphite); }
.fx-hub-hint { font-size: var(--fx-fs-13); color: var(--fx-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-hub-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--fx-ink-disabled); }
.fx-hub-missing { background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: inset 3px 0 0 var(--fx-warn-fill), var(--fx-shadow-1); }
.fx-hub-missing > summary { display: flex; align-items: center; gap: var(--fx-s-2); min-height: 52px; padding: var(--fx-s-2) var(--fx-pad-panel); cursor: pointer; list-style: none; color: var(--fx-ink); font-weight: var(--fx-fw-semibold); border-radius: var(--fx-r-panel); }
.fx-hub-missing > summary::-webkit-details-marker { display: none; }
.fx-hub-missing > summary b { padding: 0 8px; border-radius: var(--fx-r-pill); background: var(--fx-warn-bg); color: var(--fx-warn); font-size: var(--fx-fs-13); }
.fx-hub-missing > summary .fx-hub-chev { margin-left: auto; transition: rotate var(--fx-dur-3) var(--fx-ease-move); }
.fx-hub-missing[open] > summary .fx-hub-chev { rotate: 180deg; }
.fx-hub-missing > summary:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-hub-missing-icon { width: 20px; height: 20px; color: var(--fx-warn); }
.fx-hub-missing-body { padding: 0 var(--fx-pad-panel) var(--fx-pad-panel); }
.fx-hub-missing-body .fx-check { display: none; }
.fx-hub-missing-body .fx-check-list { margin-top: 0; }

/* Under a settings page's title: the way back (phones only; the crumbs say it above) and the pair switch. */
.fx-set-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-2) var(--fx-s-3); margin-top: var(--fx-s-1); }
.fx-set-back { display: none; align-items: center; gap: 2px; min-height: var(--fx-tap); color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); text-decoration: none; border-radius: var(--fx-r-xs); }
.fx-set-back-icon { width: 18px; height: 18px; }
@media (max-width: 639.98px) {
    .fx-set-back { display: inline-flex; }
    /* The title of a settings page sits under its way back. */
    .fi-header:has(.fx-set-nav) .fi-header-subheading { order: -1; }
}
.fx-setseg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; max-width: 100%; border-radius: var(--fx-r-ctl); background: var(--fx-canvas-deep); box-shadow: var(--fx-shadow-inset); scrollbar-width: none; }
.fx-setseg::-webkit-scrollbar { display: none; }
.fx-setseg-item { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--fx-s-3); border-radius: calc(var(--fx-r-ctl) - 4px); color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); white-space: nowrap; text-decoration: none; touch-action: manipulation; }
.fx-setseg-item.is-current { 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); }
.fx-setseg-item:focus-visible, .fx-set-back:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-setseg-item:not(.is-current):hover { background: rgb(255 255 255 / 0.55); color: var(--fx-ink); } }
@media (pointer: coarse) { .fx-setseg-item { min-height: 40px; } }

/* ======================================================================================= The Real */
/* "Real 2 · Pagina 1: 2", worked out while typing: green when they match, the status red otherwise. */
.fx-real-count { font-weight: var(--fx-fw-semibold); }
.fx-real-count.is-ok { color: var(--fx-ok); }
.fx-real-count.is-off { color: var(--fx-st-urgent-text); }
.fx-real-count-hint { color: var(--fx-ink-3); }
.fx-real-note { color: var(--fx-ink-2); }
/* "+ Câmp 2" and "Alt RAL…": quiet text buttons that reveal the next box. */
.fx-real-add, .fx-real-link { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 var(--fx-s-2); margin-left: calc(var(--fx-s-2) * -1); border-radius: var(--fx-r-ctl); color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); touch-action: manipulation; }
.fx-real-add:focus-visible, .fx-real-link:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-real-add:hover, .fx-real-link:hover { background: var(--fx-hover); color: var(--fx-ink); } }
@media (pointer: coarse) { .fx-real-add, .fx-real-link { min-height: var(--fx-tap); } }
.fx-real-add-cell, .fx-real-link-cell { align-self: end; }
.fx-real-sketch { padding: var(--fx-s-3); border-radius: var(--fx-r-card); background: var(--fx-sunk); box-shadow: var(--fx-shadow-inset); }
.fx-real-sketch-art svg { display: block; width: 100%; max-width: 560px; height: auto; max-height: 260px; margin-inline: auto; }

/* ======================================================================================= The See | Do grid (BoxGrid) */
.fx-bx { display: grid; gap: 0; }
.fx-bx > .fi-sc, .fx-bx .fi-sc-has-gap { gap: 0; }
.fx-bx-bar { display: grid; grid-template-columns: minmax(140px, 0.8fr) 1fr 1fr; align-items: center; gap: var(--fx-s-3); padding-bottom: var(--fx-s-2); border-bottom: 1px solid var(--fx-line); }
.fx-bx-only { display: inline-flex; align-items: center; gap: var(--fx-s-2); min-height: var(--fx-tap); color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); cursor: pointer; }
.fx-bx-legend { display: contents; color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
.fx-bx-row { border-bottom: 1px solid var(--fx-line-soft); }
.fx-bx-part { display: grid; grid-template-columns: minmax(140px, 0.8fr) 1fr 1fr; gap: var(--fx-s-3); padding: var(--fx-s-2) 0; }
.fx-bx-name { font-weight: var(--fx-fw-semibold); color: var(--fx-graphite); font-size: var(--fx-fs-14); padding-top: 8px; }
.fx-bx-col { display: grid; align-content: start; gap: 2px; }
.fx-bx-opt { display: flex; align-items: flex-start; gap: var(--fx-s-2); min-height: 36px; padding: 7px var(--fx-s-2); margin-inline: calc(var(--fx-s-2) * -1); border-radius: var(--fx-r-xs); color: var(--fx-ink); font-size: var(--fx-fs-14); line-height: 1.35; cursor: pointer; }
.fx-bx-opt input, .fx-bx-tick input, .fx-bx-only input { flex-shrink: 0; margin-top: 1px; }
@media (hover: hover) and (pointer: fine) { .fx-bx-opt:hover, .fx-bx-tick:hover { background: var(--fx-hover); } }
/* A line: one folded row with its count; open, a small grid of steps × Vede | Face. */
.fx-bx-sum { display: flex; align-items: center; gap: var(--fx-s-3); min-height: 48px; padding: var(--fx-s-1) 0; cursor: pointer; list-style: none; }
.fx-bx-sum::-webkit-details-marker { display: none; }
.fx-bx-sum .fx-bx-name { padding-top: 0; flex: 1; min-width: 0; }
.fx-bx-sum:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); border-radius: var(--fx-r-xs); }
.fx-bx-count { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); white-space: nowrap; }
.fx-bx-count.is-on { color: var(--fx-graphite); font-weight: var(--fx-fw-semibold); }
.fx-bx-chev { width: 18px; height: 18px; color: var(--fx-ink-3); transition: rotate var(--fx-dur-3) var(--fx-ease-move); }
.fx-bx-fold[open] .fx-bx-chev { rotate: 180deg; }
.fx-bx-grid { display: grid; margin: 0 0 var(--fx-s-3); padding: var(--fx-s-1) var(--fx-s-3); border-radius: var(--fx-r-card); background: var(--fx-sunk); }
.fx-bx-head, .fx-bx-step { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; align-items: center; gap: var(--fx-s-2); min-height: 40px; }
.fx-bx-head { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); border-bottom: 1px solid var(--fx-line); }
.fx-bx-head-col { display: inline-flex; align-items: center; gap: var(--fx-s-1); }
.fx-bx-all { min-height: 28px; padding: 0 8px; border-radius: var(--fx-r-pill); color: var(--fx-ink-2); font-size: var(--fx-fs-12, 12px); font-weight: var(--fx-fw-semibold); box-shadow: inset 0 0 0 1px var(--fx-line); touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .fx-bx-all:hover { background: var(--fx-surface); color: var(--fx-ink); } }
.fx-bx-all:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-bx-step + .fx-bx-step { border-top: 1px solid var(--fx-line-soft); }
.fx-bx-step.is-whole .fx-bx-step-name { font-weight: var(--fx-fw-semibold); }
.fx-bx-step-name { font-size: var(--fx-fs-14); color: var(--fx-ink); min-width: 0; }
.fx-bx-cell { display: flex; gap: var(--fx-s-1); }
.fx-bx-tick { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border-radius: var(--fx-r-xs); cursor: pointer; }
.fx-bx-tick-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Phones: one box per line, 48 px rows; the column's name before each box. */
@media (max-width: 639.98px) {
    .fx-bx-bar { grid-template-columns: 1fr; }
    .fx-bx-legend { display: none; }
    .fx-bx-part { grid-template-columns: 1fr; gap: 0; }
    .fx-bx-col::before { content: attr(data-col); display: block; padding-top: var(--fx-s-1); color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
    .fx-bx-col:empty { display: none; }
    .fx-bx-opt { min-height: 48px; align-items: center; padding-block: var(--fx-s-2); }
    .fx-bx-head, .fx-bx-step { grid-template-columns: minmax(0, 1fr) 64px 64px; min-height: 48px; }
    .fx-bx-tick { min-width: 48px; min-height: 48px; }
    .fx-bx-head-col { flex-direction: column; gap: 2px; }
}
@media (pointer: coarse) { .fx-bx-opt { min-height: 44px; } }

/* Access sets as chips: one tap each, the chosen ones filled. */
.fx-chips .fi-fo-checkbox-list { display: flex !important; flex-wrap: wrap; gap: var(--fx-s-2); }
.fx-chips .fi-fo-checkbox-list-option-ctn { margin: 0; }
.fx-chips .fi-fo-checkbox-list-option { display: inline-flex; align-items: center; gap: var(--fx-s-2); min-height: 40px; padding: 0 var(--fx-s-3); border-radius: var(--fx-r-pill); background: var(--fx-surface); box-shadow: inset 0 0 0 1px var(--fx-line); cursor: pointer; }
.fx-chips .fi-fo-checkbox-list-option:has(input:checked) { background: var(--fx-graphite); color: var(--fx-on-dark); box-shadow: none; }
.fx-chips .fi-fo-checkbox-list-option:has(input:checked) .fi-fo-checkbox-list-option-label { color: var(--fx-on-dark); }
.fx-chips .fi-fo-checkbox-list-option:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* Row and page menus: items big enough for a finger on touch screens. */
@media (pointer: coarse) { .fi-dropdown-list-item { min-height: 44px; } }

/* E-mail moments: the placeholders as chips that insert themselves into the text. */
.fx-token-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-2); color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-token-chip { min-height: 32px; padding: 0 var(--fx-s-3); border-radius: var(--fx-r-pill); background: var(--fx-sunk); box-shadow: inset 0 0 0 1px var(--fx-line); color: var(--fx-ink-2); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .fx-token-chip:hover { background: var(--fx-surface); color: var(--fx-ink); } }
.fx-token-chip:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (pointer: coarse) { .fx-token-chip { min-height: 44px; } }
.fx-tv-link { color: var(--fx-graphite); font-weight: var(--fx-fw-semibold); }

/* ======================================================================================= Producție (the line board) */
/* Apasă and Desfă: two real buttons on every row, ≥ 48 px (56 on touch). */
.fi-ta-actions .fx-lb-btn { min-height: 48px; padding-inline: var(--fx-s-4); font-size: var(--fx-fs-15, 15px); }
@media (pointer: coarse) { .fi-ta-actions .fx-lb-btn { min-height: 56px; } }
/* Choices in a modal as big buttons (the step, who pressed it, what to undo). */
.fx-big-choices .fi-fo-toggle-buttons-btn-ctn, .fx-big-choices .fi-btn { min-height: 48px; }
.fx-big-choices .fi-fo-toggle-buttons { gap: var(--fx-s-2); }
.fx-big-choices .fi-btn { justify-content: flex-start; width: 100%; padding-inline: var(--fx-s-4); font-size: var(--fx-fs-15, 15px); }
.fx-big-choices input:not(:checked) + .fi-btn, .fx-big-choices .fi-btn[aria-pressed="false"] { box-shadow: inset 0 0 0 1px var(--fx-line-2); } /* choices look like buttons, not lines of text */
@media (pointer: coarse) { .fx-big-choices .fi-btn { min-height: 56px; } }
.fx-done-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.fx-done-list li { display: flex; justify-content: space-between; gap: var(--fx-s-3); padding: var(--fx-s-2) 0; border-bottom: 1px solid var(--fx-line-soft); font-size: var(--fx-fs-14); }
.fx-done-list li span { color: var(--fx-ink-2); white-space: nowrap; }

/* ======================================================================================= Pagina 1 and the Real */
.fx-steps-strip { display: inline-flex; align-items: center; gap: var(--fx-s-3); margin: var(--fx-s-1) 0 0; padding: 0; list-style: none; color: var(--fx-ink-3); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-medium); }
.fx-steps-strip li { display: inline-flex; align-items: center; gap: 6px; }
.fx-steps-strip li + li::before { content: ''; width: 18px; height: 1px; margin-right: var(--fx-s-1); background: var(--fx-line); }
.fx-steps-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fx-canvas-deep); color: var(--fx-ink-2); font-size: var(--fx-fs-12, 12px); font-weight: var(--fx-fw-semibold); }
.fx-steps-strip li.is-now { color: var(--fx-graphite); font-weight: var(--fx-fw-semibold); }
.fx-steps-strip li.is-now .fx-steps-n { background: var(--fx-graphite); color: var(--fx-on-dark); }
.fx-steps-strip a { color: inherit; text-decoration: underline; text-decoration-color: var(--fx-line); text-underline-offset: 3px; }
/* A line counted 0 on page 1 is greyed, so the lines that matter stand out. */
.fx-counts .fx-count-zero .fi-fo-field-label, .fx-counts .fx-count-zero .fi-fo-field-label * { color: var(--fx-ink-3); }
.fx-counts .fx-count-zero .fi-input-wrp { opacity: .7; }

/* ======================================================================================= A customer, read first */
.fx-recent { display: grid; gap: var(--fx-gap); }
@media (min-width: 1024px) { .fx-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.fx-recent-block { background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); overflow: hidden; }
.fx-recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fx-s-3); padding: var(--fx-s-4) var(--fx-pad-panel) var(--fx-s-2); }
.fx-recent-head h2 { margin: 0; font-size: var(--fx-fs-16); font-weight: var(--fx-fw-semibold); color: var(--fx-graphite); }
.fx-recent-all { color: var(--fx-ink-2); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); }
.fx-recent-empty { margin: 0; padding: 0 var(--fx-pad-panel) var(--fx-s-4); color: var(--fx-ink-3); font-size: var(--fx-fs-14); }
.fx-recent-rows { list-style: none; margin: 0; padding: 0 0 var(--fx-s-2); }
.fx-recent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--fx-s-3); min-height: 48px; padding: var(--fx-s-2) var(--fx-pad-panel); color: var(--fx-ink); text-decoration: none; box-shadow: inset 0 1px 0 var(--fx-line-soft); }
.fx-recent-row:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-width) * -1); }
@media (hover: hover) and (pointer: fine) { .fx-recent-row:hover { background: var(--fx-hover); } }
.fx-recent-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-14); }
.fx-recent-main span { color: var(--fx-ink-2); }
.fx-recent-date { color: var(--fx-ink-3); font-size: var(--fx-fs-13); white-space: nowrap; }
@media (max-width: 639.98px) { .fx-recent-date { display: none; } }

/* ======================================================================================= The order page */
/* Under the title: the journey, the current stage lit in its status colour, the done ones ticked. */
.fx-journey-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-2); margin-top: var(--fx-s-2); }
.fx-journey { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.fx-journey-step { display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 0 var(--fx-s-2); border-radius: var(--fx-r-pill); color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); white-space: nowrap; }
.fx-journey-step + .fx-journey-step::before { content: ''; width: 10px; height: 1px; margin-right: var(--fx-s-1); margin-left: calc(var(--fx-s-2) * -1 - 2px); background: var(--fx-line); }
.fx-journey-step.is-done { color: var(--fx-ink-2); }
.fx-journey-tick { width: 14px; height: 14px; color: var(--fx-ok); }
.fx-journey-step.is-now { font-weight: var(--fx-fw-semibold); }
.fx-journey-added { background: var(--fx-st-added-bg); color: var(--fx-st-added-text); }
.fx-journey-work { background: var(--fx-st-work-bg); color: var(--fx-st-work-text); }
.fx-journey-ready { background: var(--fx-st-ready-bg); color: var(--fx-st-ready-text); }
.fx-journey-way { background: var(--fx-st-road-bg); color: var(--fx-st-road-text); }
.fx-journey-done { background: var(--fx-st-done-bg); color: var(--fx-st-done-text); }
.fx-journey-cancelled { display: inline-flex; align-items: center; min-height: 26px; padding: 0 var(--fx-s-3); border-radius: var(--fx-r-pill); background: var(--fx-st-cancel-bg); color: var(--fx-st-cancel-text); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); }
/* Phones: the journey wraps onto a second line rather than scrolling sideways. */
@media (max-width: 639.98px) {
    .fx-journey { flex-wrap: wrap; max-width: 100%; }
    .fx-journey-wrap { flex-wrap: wrap; max-width: calc(100vw - 2 * var(--fx-gutter)); }
}
.fx-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 var(--fx-s-3); border-radius: var(--fx-r-pill); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); white-space: nowrap; }
.fx-pill-icon { width: 14px; height: 14px; }
.fx-pill-urgent { background: var(--fx-st-urgent-bg); color: var(--fx-st-urgent-text); }
.fx-pill-cash { background: var(--fx-warn-bg); color: var(--fx-warn); }
.fx-remark-text { font-size: var(--fx-fs-16); color: var(--fx-st-remark-text); }
.fx-order-summary .fi-in-text-item a { color: var(--fx-graphite); text-decoration: underline; text-decoration-color: var(--fx-line); text-underline-offset: 3px; }
/* The money buttons on the Bani card replace the ones in "⋯" from a computer up. */
@media (min-width: 1024px) { .fi-dropdown-list-item.fx-narrow-only, .fx-narrow-only.fi-dropdown-list-item { display: none; } }
/* A page header on a phone: the main button and "⋯" only. A secondary button marked fx-not-phone hides there, and
   its copy at the top of "⋯" (fx-phone-only) shows only there. */
@media (max-width: 639.98px) { .fi-header .fi-btn.fx-not-phone, .fi-header .fi-ac-btn-action.fx-not-phone { display: none; } }
@media (min-width: 640px) { .fi-dropdown-list-item.fx-phone-only, .fi-header .fi-icon-btn.fx-phone-only { display: none; } }
/* A line written only for the phone card (fx-on-phone): from 640 px up the table's own columns say it. */
@media (min-width: 640px) { .fx-on-phone { display: none; } .fi-ta-text-description:has(> .fx-on-phone:only-child) { display: none; } }

/* A product's steps: done ✓ green, the next outlined in ink, the rest grey. */
.fx-chain { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fx-chain-step { display: inline-flex; align-items: center; gap: 2px; min-height: 24px; padding: 0 8px; border-radius: var(--fx-r-pill); background: var(--fx-canvas-deep); color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); white-space: nowrap; }
.fx-chain-step.is-done { background: var(--fx-ok-bg); color: var(--fx-ok); }
.fx-chain-step.is-skipped { background: var(--fx-warn-bg); color: var(--fx-warn); }
.fx-chain-step.is-next { background: var(--fx-surface); color: var(--fx-ink); box-shadow: inset 0 0 0 1.5px var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fx-changed { color: var(--fx-warn); font-weight: var(--fx-fw-medium); }
.fx-product-sketch { display: block; margin-top: var(--fx-s-1); }
.fx-product-sketch svg { display: block; width: 140px; height: auto; max-height: 64px; }

/* ======================================================================================= Reduced motion
   fx-motion.css already makes every animation 1ms; these keep the few transforms of state still. */
@media (prefers-reduced-motion: reduce) {
    .fi-btn:active, .fi-icon-btn:active, .fi-tabs-item:active,
    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr.fi-ta-row.fi-clickable:active { transform: none; }
}

/* ======================================================================================= Nothing scrolls sideways
   Filament's tabs (e.g. the order states on Comenzi) wrap onto more lines on a narrow screen instead of becoming a
   strip to swipe. Only wide tables of numbers (statistics) keep their own sideways scroll. */
.fi-tabs { flex-wrap: wrap; overflow-x: visible !important; row-gap: var(--fx-s-1); }
.fi-tabs-item { flex: none; }
/* Statistics tables on a phone: tighter cells, so a table fits the screen instead of scrolling sideways. */
@media (max-width: 639.98px) {
    .fx-stat-scroll table { width: 100%; font-size: var(--fx-fs-13); }
    .fx-stat-scroll :is(th, td) { padding-inline: var(--fx-s-2) !important; }
}

/* ---- F2-setup-look: the Setări hub ----------------------------------------------------------------------------
   Each row's grey line says what the place holds now; what is worth a look there is the same line in amber with
   the warning icon (the status colour, never the factory's). The sections flow in two balanced columns. */
@media (min-width: 1024px) {
    .fx-hub-grid { display: block; columns: 2; column-gap: var(--fx-gap); }
    .fx-hub-grid > .fx-hub-section { break-inside: avoid; margin-bottom: var(--fx-gap); }
}
.fx-hub-hint.is-warn { display: flex; align-items: flex-start; gap: var(--fx-s-1); white-space: normal; color: var(--fx-warn); }
.fx-hub-warn-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--fx-warn); }
.fx-hub-rest { list-style: none; margin: 0; padding: 0; display: grid; background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: inset 3px 0 0 var(--fx-warn-fill), var(--fx-shadow-1); overflow: hidden; }
.fx-hub-rest li + li .fx-hub-rest-row { box-shadow: inset 0 1px 0 var(--fx-line-soft); }
.fx-hub-rest-row { display: flex; align-items: center; gap: var(--fx-s-2); min-height: 48px; padding: var(--fx-s-2) var(--fx-pad-panel); color: var(--fx-warn); font-size: var(--fx-fs-14); text-decoration: none; }
a.fx-hub-rest-row:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-width) * -1); }
@media (hover: hover) and (pointer: fine) { a.fx-hub-rest-row:hover { background: var(--fx-hover); } }
/* ---- end F2-setup-look: the Setări hub ---- */

/* ---- F2-setup-look: access sets as chips (account page) -------------------------------------------------------
   One idiom for "chosen": the chip itself, with a tick and a quiet ring; no checkbox square inside a pill, and no
   black pill louder than Salvează. The checkbox stays for the keyboard and screen readers, out of sight. */
.fx-chips .fi-fo-checkbox-list-option { position: relative; }
.fx-chips .fi-fo-checkbox-list-option input[type=checkbox] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fx-chips .fi-fo-checkbox-list-option:has(input:checked) { background: var(--fx-canvas-deep); color: var(--fx-ink); box-shadow: inset 0 0 0 1.5px var(--fx-ink); }
.fx-chips .fi-fo-checkbox-list-option:has(input:checked) .fi-fo-checkbox-list-option-label { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fx-chips .fi-fo-checkbox-list-option:has(input:checked) .fi-fo-checkbox-list-option-label::before { content: "✓"; margin-right: var(--fx-s-1); }
.fx-chips .fi-fo-checkbox-list-option:has(input:focus-visible) { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (pointer: coarse) { .fx-chips .fi-fo-checkbox-list-option { min-height: 48px; } }
/* ---- end F2-setup-look: chips ---- */

/* ---- F2-setup-look: Date firmă's pictures --------------------------------------------------------------------
   Each picture on the ground it is made for (the light logo and the icon on white, the dark logo on graphite), with
   no file name printed over it: the picture is the information. */
.fx-logo-up .filepond--file-info, .fx-logo-up .filepond--file-status { display: none; }
.fx-logo-up .filepond--item-panel { background-color: var(--fx-surface); box-shadow: inset 0 0 0 1px var(--fx-line); }
.fx-logo-up .filepond--image-preview, .fx-logo-up .filepond--image-preview-overlay { background: var(--fx-surface); }
.fx-logo-up .filepond--image-preview-overlay { display: none; }
.fx-logo-up-dark .filepond--item-panel, .fx-logo-up-dark .filepond--image-preview { background: var(--fx-graphite); box-shadow: none; }
/* ---- end F2-setup-look: Date firmă ---- */
