/* generated from common/ui/messedo-ui.css by common/ui/publish.sh — edit there, not here */
/*
 * Messedo UI — the shared design system of the admin (backend), the client cabinet and the public site.
 * Stage 7 of the redesign (2026-10-19). SOURCE OF TRUTH: common/ui/messedo-ui.css. Copies in backend/web/ui,
 * cabinet/web/ui and frontend/web/ui are made by common/ui/publish.sh — edit here, then run the script.
 *
 * Rules of this file
 * - Every selector is a .mx-* class, the shared drawer anatomy (.cp-drawer / .mc-drawer / .mx-drawer) or a --mx-* token
 *   on :root. Nothing here restyles Bootstrap, AdminLTE or plain elements (no .btn, table, .alert, a, h1…).
 * - No body class is needed: the same markup looks the same in all three apps.
 * - The apps' own token families (--cp-*, --mc-*, --ui-*) are mapped onto --mx-* in the app layers
 *   (backend/web/css/cp-ui.css, cabinet/web/css/ui.css), not here.
 * - Colour pairs for text are WCAG AA (>= 4.5:1); the ratios are written next to the tokens.
 * - Selectors that colour links (.mx-btn, .mx-tabs__tab) use two classes: the apps colour every link with
 *   "body.x a" / "body.x a:hover" (specificity 0,1,2 / 0,2,2), and the components must win without !important.
 */

/* ==== Tokens ======================================================================================== */
:root {
    /* brand / primary */
    --mx-primary: #2f6df6;          /* fills; white text on it 4.53:1 */
    --mx-primary-strong: #2354ca;   /* hover / pressed; white text 6.58:1 */
    --mx-primary-text: #1d5bd8;     /* text and links: 5.93:1 on white, 5.23:1 on soft */
    --mx-primary-soft: #eaf1ff;
    --mx-primary-line: #c6d7fb;

    /* status colours: solid (white text), strong (hover), text (on white / soft), soft background, border */
    --mx-success: #0b805d;          /* white 4.93:1 */
    --mx-success-strong: #086b4e;   /* white 6.51:1 */
    --mx-success-text: #087f5b;     /* white 5.00:1, soft 4.55:1 */
    --mx-success-soft: #e7f8f1;
    --mx-success-line: #b7e5d2;

    --mx-warning: #b45309;          /* white 5.02:1 */
    --mx-warning-strong: #92400e;   /* white 7.09:1 */
    --mx-warning-text: #986314;     /* white 5.08:1, soft 4.69:1 */
    --mx-warning-soft: #fff5df;
    --mx-warning-line: #f1d9a4;

    --mx-danger: #c8344a;           /* white 5.19:1 */
    --mx-danger-strong: #a92b3e;    /* white 6.77:1 */
    --mx-danger-text: #bd3748;      /* white 5.52:1, soft 4.99:1 */
    --mx-danger-soft: #fff0f2;
    --mx-danger-line: #f4c3cb;

    --mx-info: #1d5bd8;             /* white 5.93:1 */
    --mx-info-strong: #1749ba;
    --mx-info-text: #1d5bd8;        /* white 5.93:1, soft 5.23:1 */
    --mx-info-soft: #eaf1ff;
    --mx-info-line: #c6d7fb;

    --mx-neutral: #5b6880;          /* white 5.62:1 */
    --mx-neutral-text: #53627e;     /* white 6.15:1, soft 5.47:1 */
    --mx-neutral-soft: #eef2f8;
    --mx-neutral-line: #d5dce8;

    /* pill-only tone: "needs attention" (expired, paused) — orange, distinct from the amber "wait" */
    --mx-attention-text: #a8410b;   /* white 6.13:1, soft 5.35:1 */
    --mx-attention-soft: #ffece0;

    /* text */
    --mx-text: #18243f;             /* white 15.41:1, bg 14.23:1 */
    --mx-text-2: #2c3a55;           /* secondary body text, white 11.39:1 */
    --mx-text-muted: #5b6880;       /* white 5.62:1, bg 5.19:1, soft surfaces >= 5.0:1 */
    --mx-text-subtle: #6b7280;      /* placeholders only, white 4.83:1 */
    --mx-text-inverse: #ffffff;

    /* lines and surfaces */
    --mx-line: #dfe6f2;
    --mx-line-strong: #cdd8e8;
    --mx-bg: #f3f6fc;
    --mx-surface: #ffffff;
    --mx-surface-soft: #f8faff;
    --mx-surface-hover: #f7f9fd;
    --mx-overlay: rgba(15, 23, 42, .42);

    /* shape */
    --mx-radius-xs: 6px;
    --mx-radius-sm: 8px;
    --mx-radius-md: 12px;
    --mx-radius-lg: 18px;
    --mx-radius-xl: 24px;
    --mx-radius-pill: 999px;

    --mx-shadow-xs: 0 1px 2px rgba(15, 29, 61, .04);
    --mx-shadow-sm: 0 8px 24px rgba(15, 29, 61, .07);
    --mx-shadow-md: 0 18px 50px rgba(15, 29, 61, .10);
    --mx-shadow-pop: 0 24px 64px rgba(15, 23, 42, .24);
    --mx-shadow-drawer: -12px 0 40px rgba(15, 23, 42, .18);

    /* spacing scale */
    --mx-space-1: 4px;
    --mx-space-2: 8px;
    --mx-space-3: 12px;
    --mx-space-4: 16px;
    --mx-space-5: 20px;
    --mx-space-6: 24px;
    --mx-space-7: 32px;
    --mx-space-8: 40px;

    /* type */
    --mx-font: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mx-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --mx-fs-xs: 12px;
    --mx-fs-sm: 13px;
    --mx-fs-md: 14px;
    --mx-fs-lg: 16px;
    --mx-fs-xl: 18px;
    --mx-fs-2xl: 22px;
    --mx-fs-3xl: 28px;

    /* focus, motion, layers */
    --mx-focus-color: #2f6df6;
    --mx-focus-ring: 0 0 0 3px rgba(47, 109, 246, .35);
    --mx-ease: cubic-bezier(.22, 1, .36, 1);
    --mx-dur: .18s;
    --mx-z-drawer: 1045;            /* Bootstrap modal backdrop 1040 / modal 1050 */
    --mx-z-toast: 1080;             /* above drawers and Bootstrap modals */
    --mx-z-dialog: 1090;            /* above everything: a sticky toast must not cover the dialog's buttons */
    --mx-toast-top: 84px;           /* below the fixed admin / cabinet header */
}

/* ==== Helpers ======================================================================================= */
.mx-visually-hidden,
.mx-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.mx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mx-space-2); }
.mx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-muted { color: var(--mx-text-muted); }

@keyframes mx-spin { to { transform: rotate(360deg); } }
@keyframes mx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes mx-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes mx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mx-pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mx-slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ==== Button ======================================================================================== */
/* <button class="mx-btn mx-btn--primary">…</button>; sizes --sm / --lg; --icon (aria-label required); .is-loading */
.mx-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background-image: none;
    font-family: var(--mx-font);
    font-size: var(--mx-fs-md);
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    transition: background-color var(--mx-dur) ease, border-color var(--mx-dur) ease, color var(--mx-dur) ease, box-shadow var(--mx-dur) ease;
}
.mx-btn > .fa, .mx-btn > svg { flex: 0 0 auto; font-size: 1em; }
.mx-btn:focus { outline: none; }
.mx-btn:focus-visible { outline: 2px solid var(--mx-focus-color); outline-offset: 2px; box-shadow: var(--mx-focus-ring); }

/* secondary is also the look of a bare .mx-btn (".mx-btn.mx-btn" = two classes, see the header); every tone below
   sets colour, background and border for the base, :focus and :hover states, so it fully replaces this one */
.mx-btn.mx-btn,
.mx-btn.mx-btn:focus { color: var(--mx-text); background-color: var(--mx-surface); border-color: var(--mx-line-strong); }
.mx-btn.mx-btn:hover,
.mx-btn.mx-btn:active { color: var(--mx-primary-text); background-color: var(--mx-surface-soft); border-color: var(--mx-primary-line); }

.mx-btn.mx-btn--primary,
.mx-btn.mx-btn--primary:focus { color: #fff; background-color: var(--mx-primary); border-color: var(--mx-primary); }
.mx-btn.mx-btn--primary:hover,
.mx-btn.mx-btn--primary:active { color: #fff; background-color: var(--mx-primary-strong); border-color: var(--mx-primary-strong); }

.mx-btn.mx-btn--danger,
.mx-btn.mx-btn--danger:focus { color: #fff; background-color: var(--mx-danger); border-color: var(--mx-danger); }
.mx-btn.mx-btn--danger:hover,
.mx-btn.mx-btn--danger:active { color: #fff; background-color: var(--mx-danger-strong); border-color: var(--mx-danger-strong); }
.mx-btn.mx-btn--danger:focus-visible { outline-color: var(--mx-danger); box-shadow: 0 0 0 3px rgba(200, 52, 74, .30); }

.mx-btn.mx-btn--ghost,
.mx-btn.mx-btn--ghost:focus { color: var(--mx-primary-text); background-color: transparent; border-color: transparent; }
.mx-btn.mx-btn--ghost:hover,
.mx-btn.mx-btn--ghost:active { color: var(--mx-primary-strong); background-color: var(--mx-primary-soft); border-color: transparent; }

.mx-btn.mx-btn--link,
.mx-btn.mx-btn--link:focus { min-height: 0; padding-left: 2px; padding-right: 2px; color: var(--mx-primary-text); background-color: transparent; border-color: transparent; }
.mx-btn.mx-btn--link:hover,
.mx-btn.mx-btn--link:active { color: var(--mx-primary-strong); background-color: transparent; border-color: transparent; text-decoration: underline; }
.mx-btn.mx-btn--link.mx-btn--danger-text,
.mx-btn.mx-btn--ghost.mx-btn--danger-text { color: var(--mx-danger-text); }
.mx-btn.mx-btn--ghost.mx-btn--danger-text:hover { background-color: var(--mx-danger-soft); }

.mx-btn.mx-btn--sm { min-height: 30px; padding: 4px 10px; border-radius: 8px; font-size: var(--mx-fs-sm); gap: 6px; }
.mx-btn.mx-btn--lg { min-height: 44px; padding: 10px 18px; border-radius: 12px; font-size: 15px; }
.mx-btn.mx-btn--block { display: flex; width: 100%; }
.mx-btn.mx-btn--icon { width: 36px; padding: 0; }
.mx-btn.mx-btn--icon.mx-btn--sm { width: 30px; }
.mx-btn.mx-btn--icon.mx-btn--lg { width: 44px; }

.mx-btn:disabled,
.mx-btn.is-disabled,
.mx-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.mx-btn.is-loading,
.mx-btn[aria-busy="true"] { cursor: progress; pointer-events: none; opacity: .9; }
.mx-btn.is-loading::before,
.mx-btn[aria-busy="true"]::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mx-spin .7s linear infinite;
}
.mx-btn.mx-btn--icon.is-loading > *,
.mx-btn.mx-btn--icon[aria-busy="true"] > * { display: none; }

/* ==== Pill (status) ================================================================================= */
/* <span class="mx-pill mx-pill--ok [mx-pill--dot]">Доставлено</span>; tones ok, bad, wait, info, neutral, warn */
.mx-pill {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: var(--mx-radius-pill);
    color: var(--mx-neutral-text);
    background: var(--mx-neutral-soft);
    font-family: var(--mx-font);
    font-size: var(--mx-fs-xs);
    font-weight: 700;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
}
.mx-pill > .fa { font-size: 11px; }
.mx-pill--ok { color: var(--mx-success-text); background: var(--mx-success-soft); }
.mx-pill--bad { color: var(--mx-danger-text); background: var(--mx-danger-soft); }
.mx-pill--wait { color: var(--mx-warning-text); background: var(--mx-warning-soft); }
.mx-pill--warn { color: var(--mx-attention-text); background: var(--mx-attention-soft); }
.mx-pill--info { color: var(--mx-info-text); background: var(--mx-info-soft); }
.mx-pill--neutral { color: var(--mx-neutral-text); background: var(--mx-neutral-soft); }
.mx-pill--dot::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mx-pill--live::before { animation: mx-pulse 1.6s ease-in-out infinite; }

/* ==== Card and KPI ================================================================================== */
.mx-card {
    box-sizing: border-box;
    padding: 18px 20px;
    border: 1px solid var(--mx-line);
    border-radius: 16px;
    background: var(--mx-surface);
    box-shadow: var(--mx-shadow-xs);
    color: var(--mx-text);
}
.mx-card + .mx-card { margin-top: var(--mx-space-4); }
.mx-card .mx-card__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 14px; }
.mx-card .mx-card__title { margin: 0; font-family: var(--mx-font); font-size: var(--mx-fs-lg); font-weight: 750; line-height: 1.35; letter-spacing: 0; color: var(--mx-text); }
.mx-card .mx-card__sub { margin: 2px 0 0; font-size: var(--mx-fs-sm); line-height: 1.45; color: var(--mx-text-muted); }
.mx-card .mx-card__footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 16px -20px -18px; padding: 12px 20px; border-top: 1px solid var(--mx-line); background: var(--mx-surface-soft); border-radius: 0 0 16px 16px; }
.mx-card--flush { padding: 0; }
.mx-card--flush > .mx-card__header { padding: 16px 20px 0; }

.mx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.mx-kpi {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--mx-line);
    border-radius: 14px;
    background: var(--mx-surface);
    font-family: var(--mx-font);
}
.mx-kpi .mx-kpi__label { font-size: var(--mx-fs-xs); font-weight: 650; line-height: 1.35; color: var(--mx-text-muted); }
.mx-kpi .mx-kpi__value { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--mx-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mx-kpi .mx-kpi__sub { font-size: var(--mx-fs-xs); line-height: 1.4; color: var(--mx-text-muted); }
.mx-kpi--ok .mx-kpi__value { color: var(--mx-success-text); }
.mx-kpi--bad .mx-kpi__value { color: var(--mx-danger-text); }
.mx-kpi--warn .mx-kpi__value { color: var(--mx-warning-text); }

/* ==== Table ========================================================================================= */
/* <div class="mx-table-wrap"><table class="mx-table">…</table></div>; numeric cells: class="mx-num" */
.mx-table-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--mx-line);
    border-radius: 14px;
    background: var(--mx-surface);
}
.mx-table {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-family: var(--mx-font);
    font-size: var(--mx-fs-sm);
    line-height: 1.45;
    color: var(--mx-text);
}
.mx-table > thead > tr > th,
.mx-table > thead > tr > td {
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--mx-line);
    background: var(--mx-surface-soft);
    color: var(--mx-text-muted);
    font-size: var(--mx-fs-xs);
    font-weight: 700;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
    vertical-align: bottom;
}
.mx-table > tbody > tr > td,
.mx-table > tbody > tr > th {
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--mx-line);
    background: transparent;
    text-align: left;
    vertical-align: middle;
}
.mx-table > tbody > tr:last-child > td,
.mx-table > tbody > tr:last-child > th { border-bottom: 0; }
.mx-table > tbody > tr:hover > td,
.mx-table > tbody > tr:hover > th { background: var(--mx-surface-hover); }
.mx-table > thead > tr > .mx-num,
.mx-table > tbody > tr > .mx-num,
.mx-table > tfoot > tr > .mx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-table > tfoot > tr > td { padding: 10px 12px; border-top: 1px solid var(--mx-line); font-weight: 700; }
.mx-table--compact > thead > tr > th, .mx-table--compact > tbody > tr > td, .mx-table--compact > tbody > tr > th { padding: 6px 10px; }
.mx-table-wrap > .mx-table > thead > tr:first-child > th:first-child { border-top-left-radius: 13px; }
.mx-table-wrap > .mx-table > thead > tr:first-child > th:last-child { border-top-right-radius: 13px; }

/* ==== Tabs ========================================================================================== */
/* <div class="mx-tabs" role="tablist"><button class="mx-tabs__tab is-active" role="tab" aria-selected="true">…
   links work too (aria-current="page"); [data-mx-tabs] + aria-controls switches panels (messedo-ui.js) */
.mx-tabs { display: flex; gap: 2px; margin: 0 0 16px; padding: 0; overflow-x: auto; border-bottom: 1px solid var(--mx-line); scrollbar-width: thin; }
.mx-tabs .mx-tabs__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 -1px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--mx-text-muted);
    font-family: var(--mx-font);
    font-size: var(--mx-fs-sm);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.mx-tabs .mx-tabs__tab:focus { color: var(--mx-text-muted); outline: none; }
.mx-tabs .mx-tabs__tab:hover { color: var(--mx-text); text-decoration: none; }
.mx-tabs .mx-tabs__tab:focus-visible { outline: 2px solid var(--mx-focus-color); outline-offset: -2px; border-radius: 8px 8px 0 0; }
.mx-tabs .mx-tabs__tab.is-active,
.mx-tabs .mx-tabs__tab[aria-selected="true"],
.mx-tabs .mx-tabs__tab[aria-current="page"] { color: var(--mx-primary-text); border-bottom-color: var(--mx-primary); }
.mx-tabs .mx-tabs__count { display: inline-flex; min-width: 20px; justify-content: center; padding: 0 6px; border-radius: 999px; background: var(--mx-neutral-soft); color: var(--mx-neutral-text); font-size: 11px; line-height: 18px; }
.mx-tab-panel[hidden] { display: none !important; }

/* ==== Form field ==================================================================================== */
/* <div class="mx-field [is-invalid]"><label class="mx-field__label" for="x">…</label><input class="mx-input" id="x"
   aria-describedby="x-help"><div class="mx-field__help" id="x-help">…</div><div class="mx-field__error">…</div></div>
   Inside Bootstrap forms the .form-control can stay: the label / help / error parts work with it. */
.mx-field { margin: 0 0 16px; font-family: var(--mx-font); }
.mx-field .mx-field__label { display: block; margin: 0 0 6px; color: var(--mx-text); font-size: var(--mx-fs-sm); font-weight: 650; line-height: 1.35; letter-spacing: 0; }
.mx-field .mx-field__req { color: var(--mx-danger-text); margin-left: 2px; }
.mx-field .mx-field__help { margin: 6px 0 0; color: var(--mx-text-muted); font-size: var(--mx-fs-xs); line-height: 1.45; }
.mx-field .mx-field__error { display: none; margin: 6px 0 0; color: var(--mx-danger-text); font-size: var(--mx-fs-xs); font-weight: 600; line-height: 1.45; }
.mx-field.is-invalid .mx-field__error { display: block; }
.mx-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--mx-line-strong);
    border-radius: 10px;
    background: var(--mx-surface);
    color: var(--mx-text);
    font-family: var(--mx-font);
    font-size: var(--mx-fs-md);
    line-height: 1.4;
    box-shadow: none;
    transition: border-color var(--mx-dur) ease, box-shadow var(--mx-dur) ease;
}
.mx-input::placeholder { color: var(--mx-text-subtle); opacity: 1; }
.mx-input:focus { outline: none; border-color: var(--mx-focus-color); box-shadow: var(--mx-focus-ring); }
.mx-field.is-invalid .mx-input,
.mx-field.is-invalid .form-control,
.mx-input[aria-invalid="true"] { border-color: var(--mx-danger); }
.mx-field.is-invalid .mx-input:focus,
.mx-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(200, 52, 74, .22); }
textarea.mx-input { min-height: 88px; resize: vertical; }

/* ==== Empty state =================================================================================== */
.mx-empty {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 20px;
    color: var(--mx-text-muted);
    font-family: var(--mx-font);
    text-align: center;
}
.mx-empty .mx-empty__icon { display: inline-flex; width: 44px; height: 44px; margin: 0 0 4px; align-items: center; justify-content: center; border-radius: 50%; background: var(--mx-neutral-soft); color: var(--mx-neutral); font-size: 18px; }
.mx-empty .mx-empty__title { color: var(--mx-text); font-size: 15px; font-weight: 750; line-height: 1.35; }
.mx-empty .mx-empty__text { max-width: 440px; font-size: var(--mx-fs-sm); line-height: 1.5; }
.mx-empty .mx-empty__action { margin-top: 8px; }
.mx-empty--compact { padding: 16px; }
.mx-empty--compact .mx-empty__icon { width: 36px; height: 36px; font-size: 15px; }

/* ==== Skeleton loader =============================================================================== */
.mx-skeleton {
    display: block;
    height: 12px;
    margin: 8px 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef2f8 25%, #f8faff 37%, #eef2f8 63%);
    background-size: 400% 100%;
    animation: mx-shimmer 1.4s ease infinite;
}
.mx-skeleton--title { height: 18px; width: 55%; }
.mx-skeleton--text { width: 100%; }
.mx-skeleton--short { width: 40%; }
.mx-skeleton--block { height: 72px; border-radius: 12px; }
.mx-skeleton--circle { width: 40px; height: 40px; border-radius: 50%; }

/* ==== Toasts ======================================================================================== */
/* created by MxUi.toast(); flashes from the server become toasts (layouts render .mx-flashes, see Ui::flashes()) */
.mx-toasts {
    position: fixed;
    top: var(--mx-toast-top);
    right: 16px;
    z-index: var(--mx-z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}
.mx-toast {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 10px 12px 14px;
    border: 1px solid var(--mx-line);
    border-left: 4px solid var(--mx-neutral);
    border-radius: 12px;
    background: var(--mx-surface);
    box-shadow: var(--mx-shadow-pop);
    color: var(--mx-text);
    font-family: var(--mx-font);
    font-size: var(--mx-fs-sm);
    line-height: 1.45;
    pointer-events: auto;
    animation: mx-slide-in .22s var(--mx-ease);
}
.mx-toast.is-leaving { opacity: 0; transform: translateX(16px); transition: opacity .18s ease, transform .18s ease; }
.mx-toast .mx-toast__icon { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 0; color: var(--mx-neutral); }
.mx-toast .mx-toast__icon svg { display: block; width: 20px; height: 20px; }
.mx-toast .mx-toast__text { flex: 1 1 auto; min-width: 0; padding-top: 1px; overflow-wrap: anywhere; }
.mx-toast .mx-toast__text a { color: var(--mx-primary-text); text-decoration: underline; }
.mx-toast .mx-toast__text > .icon,
.mx-toast .mx-toast__text > i.fa:first-child { display: none; } /* the alert icon of a converted flash */
.mx-toast .mx-toast__close {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: -4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mx-text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.mx-toast .mx-toast__close:hover { background: var(--mx-neutral-soft); color: var(--mx-text); }
.mx-toast .mx-toast__close:focus { outline: none; }
.mx-toast .mx-toast__close:focus-visible { outline: 2px solid var(--mx-focus-color); outline-offset: 1px; }
.mx-toast--ok { border-left-color: var(--mx-success); }
.mx-toast--ok .mx-toast__icon { color: var(--mx-success); }
.mx-toast--bad { border-left-color: var(--mx-danger); }
.mx-toast--bad .mx-toast__icon { color: var(--mx-danger); }
.mx-toast--warn, .mx-toast--wait { border-left-color: var(--mx-warning); }
.mx-toast--warn .mx-toast__icon, .mx-toast--wait .mx-toast__icon { color: var(--mx-warning); }
.mx-toast--info { border-left-color: var(--mx-info); }
.mx-toast--info .mx-toast__icon { color: var(--mx-info); }
@media (max-width: 575px) {
    .mx-toasts { top: 68px; right: 12px; left: 12px; width: auto; }
}
/* server flashes: the no-JS fallback is the normal alert block; messedo-ui.js hides it after making the toasts */
.mx-flashes.is-toasted { display: none; }

/* ==== Dialog (confirm) ============================================================================== */
.mx-dialog {
    position: fixed;
    inset: 0;
    z-index: var(--mx-z-dialog);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--mx-font);
}
.mx-dialog[hidden] { display: none; }
.mx-dialog .mx-dialog__backdrop { position: absolute; inset: 0; background: var(--mx-overlay); animation: mx-fade-in .16s ease; }
.mx-dialog .mx-dialog__panel {
    position: relative;
    box-sizing: border-box;
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 22px 22px 18px;
    border-radius: var(--mx-radius-lg);
    background: var(--mx-surface);
    box-shadow: var(--mx-shadow-pop);
    color: var(--mx-text);
    text-align: left;
    animation: mx-pop-in .2s var(--mx-ease);
}
.mx-dialog .mx-dialog__panel:focus { outline: none; }
.mx-dialog .mx-dialog__head { display: flex; align-items: flex-start; gap: 14px; }
.mx-dialog .mx-dialog__icon { display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--mx-primary-soft); color: var(--mx-primary-text); }
.mx-dialog .mx-dialog__icon svg { width: 20px; height: 20px; }
.mx-dialog--danger .mx-dialog__icon { background: var(--mx-danger-soft); color: var(--mx-danger-text); }
.mx-dialog .mx-dialog__title { margin: 2px 0 6px; padding: 0; font-family: var(--mx-font); font-size: 17px; font-weight: 750; line-height: 1.3; letter-spacing: 0; color: var(--mx-text); }
.mx-dialog .mx-dialog__text { margin: 0; color: var(--mx-text-2); font-size: var(--mx-fs-md); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.mx-dialog .mx-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 575px) {
    .mx-dialog { align-items: flex-end; padding: 0; }
    .mx-dialog .mx-dialog__panel { width: 100%; border-radius: 18px 18px 0 0; }
    .mx-dialog .mx-dialog__actions .mx-btn { flex: 1 1 auto; }
}

/* ==== Drawer (side panel) =========================================================================== */
/* One anatomy for three class families: .cp-drawer (admin, js/cp-drawer.js), .mc-drawer (cabinet, js/mc-drawer.js)
   and .mx-drawer (new code). Moved here from backend/web/css/cp-ui.css and cabinet/web/css/ui.css (stage 7). */
.cp-drawer, .mc-drawer, .mx-drawer { position: fixed; inset: 0; z-index: var(--mx-z-drawer); visibility: hidden; pointer-events: none; transition: visibility 0s linear .22s; }
.cp-drawer.is-open, .mc-drawer.is-open, .mx-drawer.is-open { visibility: visible; pointer-events: auto; transition: none; }
.cp-drawer__backdrop, .mc-drawer__backdrop, .mx-drawer__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .38); opacity: 0; transition: opacity .22s ease; }
.cp-drawer.is-open .cp-drawer__backdrop, .mc-drawer.is-open .mc-drawer__backdrop, .mx-drawer.is-open .mx-drawer__backdrop { opacity: 1; }
.cp-drawer__panel, .mc-drawer__panel, .mx-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; box-sizing: border-box; width: min(520px, 100%); background: var(--mx-surface); border-radius: 18px 0 0 18px; box-shadow: var(--mx-shadow-drawer); transform: translateX(104%); transition: transform .22s ease; }
.cp-drawer--wide .cp-drawer__panel, .mc-drawer--wide .mc-drawer__panel, .mx-drawer--wide .mx-drawer__panel { width: min(880px, 100%); }
.cp-drawer.is-open .cp-drawer__panel, .mc-drawer.is-open .mc-drawer__panel, .mx-drawer.is-open .mx-drawer__panel { transform: none; }
.cp-drawer__header, .mc-drawer__header, .mx-drawer__header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--mx-line); }
.cp-drawer__icon, .mc-drawer__icon, .mx-drawer__icon { display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--mx-primary-soft); color: var(--mx-primary); font-size: 17px; }
.cp-drawer__title, .mc-drawer__title, .mx-drawer__title { flex: 1 1 auto; min-width: 0; }
.cp-drawer__title h3, .mc-drawer__title h3, .mx-drawer__title h3 { margin: 2px 0 4px !important; font-size: 17px !important; font-weight: 750; line-height: 1.3; letter-spacing: 0; color: var(--mx-text); overflow-wrap: anywhere; }
.cp-drawer__title p, .mc-drawer__title p, .mx-drawer__title p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--mx-text-muted); }
.cp-drawer__close, .mc-drawer__close, .mx-drawer__close { display: inline-flex; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--mx-line); border-radius: 10px; background: var(--mx-surface); color: var(--mx-text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.cp-drawer__close > .fa, .mc-drawer__close > .fa, .mx-drawer__close > .fa { font-size: 15px; }
.cp-drawer__close:hover, .cp-drawer__close:focus, .mc-drawer__close:hover, .mc-drawer__close:focus, .mx-drawer__close:hover, .mx-drawer__close:focus { border-color: var(--mx-primary); color: var(--mx-primary); }
.cp-drawer__close:focus-visible, .mc-drawer__close:focus-visible, .mx-drawer__close:focus-visible { outline: 2px solid var(--mx-focus-color); outline-offset: 2px; }
.cp-drawer__panel form, .mc-drawer__panel form, .mx-drawer__panel form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; }
.cp-drawer__body, .mc-drawer__body, .mx-drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 20px; }
.cp-drawer__body .form-group, .mc-drawer__body .form-group, .mx-drawer__body .form-group { margin-bottom: 16px; }
.cp-drawer__body .help-block:empty, .mc-drawer__body .help-block:empty, .mx-drawer__body .help-block:empty { display: none; }
.cp-drawer__body .has-error .help-block, .mc-drawer__body .has-error .help-block, .mx-drawer__body .has-error .help-block { display: block; color: var(--mx-danger-text); font-size: 13px; margin-top: 6px; }
.cp-drawer__body .has-error .form-control, .mc-drawer__body .has-error .form-control, .mx-drawer__body .has-error .form-control { border-color: #d64560 !important; }
.cp-drawer__hint, .mc-drawer__hint, .mx-drawer__hint { margin: 6px 0 0; font-size: 12px; color: var(--mx-text-muted); }
.cp-drawer__loading, .mc-drawer__loading, .mx-drawer__loading { padding: 24px 0; color: var(--mx-text-muted); font-size: 14px; }
.cp-drawer__status, .mc-drawer__status, .mx-drawer__status { font-size: 13px; border-radius: 10px; }
.cp-drawer__status:empty, .mc-drawer__status:empty, .mx-drawer__status:empty { display: none; }
.cp-drawer__status.is-good, .mc-drawer__status.is-good, .mx-drawer__status.is-good { padding: 10px 12px; background: var(--mx-success-soft); color: var(--mx-success-text); }
.cp-drawer__status.is-bad, .mc-drawer__status.is-bad, .mx-drawer__status.is-bad { padding: 10px 12px; background: #fdecee; color: var(--mx-danger-text); }
.cp-drawer__footer, .mc-drawer__footer, .mx-drawer__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--mx-line); background: #fbfcfe; border-radius: 0 0 0 18px; }
body.cp-drawer-lock, body.mc-drawer-lock, body.mx-drawer-lock { overflow: hidden; }
@media (max-width: 575px) {
    .cp-drawer__panel, .cp-drawer__footer, .mc-drawer__panel, .mc-drawer__footer, .mx-drawer__panel, .mx-drawer__footer { border-radius: 0; }
}

/* ==== Reduced motion ================================================================================ */
@media (prefers-reduced-motion: reduce) {
    .mx-btn, .mx-input, .mx-toast, .mx-toast.is-leaving,
    .mx-dialog .mx-dialog__backdrop, .mx-dialog .mx-dialog__panel,
    .cp-drawer, .cp-drawer__backdrop, .cp-drawer__panel,
    .mc-drawer, .mc-drawer__backdrop, .mc-drawer__panel,
    .mx-drawer, .mx-drawer__backdrop, .mx-drawer__panel { transition: none !important; animation: none !important; }
    .mx-skeleton, .mx-pill--live::before { animation: none; }
    .mx-btn.is-loading::before, .mx-btn[aria-busy="true"]::before { animation-duration: 2.4s; }
}
