        :root {
            --page-gutter: clamp(10px, 2.4vw, 40px);
            --card-padding: clamp(12px, 1.8vw, 20px);
            --content-max: 1440px;
            --block-border: #d7dde7;
            --block-border-soft: #e6ebf2;
            --block-surface: #fbfcfe;
            --block-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
            --control-height: 38px;
            --text-main: #20242a;
            --text-muted: #697386;
            --row-hover: #f8fbff;
            --table-head: #f7f9fc;
        }

        * {
            box-sizing: border-box;
        }

        html {
            overflow-x: hidden;
        }

        body {
            margin: var(--page-gutter);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            color: var(--text-main);
            background-color: #f9f9f9;
            overflow-x: hidden;
            max-width: min(var(--content-max), calc(100vw - (var(--page-gutter) * 2)));
            line-height: 1.42;
        }

        nav {
            margin-bottom: 22px;
            padding: 12px 14px;
            border: 1px solid #e2e6ed;
            border-radius: 6px;
            background: #fff;
            display: flex;
            flex-direction: column;
            gap: 12px;
            align-items: stretch;
            position: relative;
            z-index: 100;
        }

        nav a {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 5px 8px;
            border-radius: 4px;
            font-size: 14px;
            color: #2255aa;
            text-decoration: none;
            white-space: nowrap;
            position: relative;
            z-index: 40;
        }

        nav a:hover {
            background: #eef4ff;
            text-decoration: none;
        }

        .nav-notifications-link {
            gap: 6px;
        }

        .nav-notifications-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24px;
            height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            font-size: 13px;
            font-weight: 700;
            line-height: 1;
            box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(220, 38, 38, 0.22);
        }

        .nav-notifications-badge::before {
            content: "!";
            margin-right: 4px;
        }

        .nav-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            width: 100%;
            padding-bottom: 10px;
            border-bottom: 1px solid #edf0f4;
        }

        .nav-meta .muted {
            display: inline-flex;
            align-items: center;
            min-height: 28px;
            padding: 4px 8px;
            border: 1px solid #e4e8ef;
            border-radius: 4px;
            background: #f8fafc;
        }

        .nav-main {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 12px;
            align-items: center;
            min-width: 0;
            padding-top: 10px;
            border-top: 1px solid #edf0f4;
        }

        details.nav-dropdown {
            position: relative;
        }

        details.nav-dropdown summary {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 5px 8px;
            border-radius: 4px;
            list-style: none;
            cursor: pointer;
            color: #2255aa;
            font-size: 14px;
            user-select: none;
            white-space: nowrap;
            position: relative;
            z-index: 40;
        }

        details.nav-dropdown summary::-webkit-details-marker {
            display: none;
        }

        .nav-dropdown-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            border: 0;
            padding: 0;
            background: transparent;
            cursor: default;
            pointer-events: none;
            z-index: 10;
        }

        details.nav-dropdown[open] > .nav-dropdown-backdrop {
            display: block;
        }

        details.nav-dropdown > summary::after {
            content: "";
            width: 7px;
            height: 7px;
            margin-left: 4px;
            border-right: 1.5px solid #667085;
            border-bottom: 1.5px solid #667085;
            transform: rotate(45deg) translateY(-2px);
            flex: 0 0 auto;
            pointer-events: none;
        }

        details.nav-dropdown[open] summary {
            background: #eef4ff;
            text-decoration: none;
        }

        .nav-dropdown-menu {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            width: max-content;
            min-width: min(230px, calc(100vw - 24px));
            max-width: min(320px, calc(100vw - 24px));
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            padding: 8px;
            z-index: 50;
        }

        .nav-dropdown-menu a {
            display: block;
            padding: 6px 8px;
            white-space: normal;
        }

        .nav-auth {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .nav-auth form {
            display: inline;
            margin: 0;
        }

        .global-search {
            position: relative;
            width: min(720px, 100%);
            margin: 0;
            z-index: 90;
        }

        .global-search__input {
            width: 100%;
            min-height: 36px;
            padding: 7px 10px;
            border: 1px solid #bbb;
            border-radius: 4px;
            background: #fff;
            color: #222;
            font: inherit;
        }

        .global-search__results {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            width: min(720px, calc(100vw - 24px));
            max-height: min(420px, 70vh);
            overflow-y: auto;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 6px;
            background: #fff;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
            box-sizing: border-box;
            overflow: hidden;
        }

        .global-search__item {
            display: grid;
            grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
            gap: 8px 10px;
            padding: 8px;
            border-radius: 4px;
            color: #222;
            text-decoration: none;
        }

        .global-search__item:hover,
        .global-search__item.is-active {
            background: #eef4ff;
            text-decoration: none;
        }

        .global-search__kind {
            color: #777;
            font-size: 12px;
        }

        .global-search__title {
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .global-search__subtitle {
            grid-column: 2;
            color: #777;
            font-size: 12px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .global-search__empty {
            padding: 8px;
            color: #777;
        }

        .global-search__suggestion,
        .searchable-select__suggestion {
            display: block;
            width: 100%;
            padding: 8px;
            border: 0;
            color: #5f6b7a;
            background: #f8fafc;
            border-bottom: 1px solid #eef2f7;
            font-size: 14px;
            font: inherit;
            text-align: left;
        }

        .global-search__suggestion {
            cursor: pointer;
        }

        .card {
            padding: var(--card-padding);
            border: 1px solid var(--block-border);
            border-radius: 6px;
            background: #fff;
            width: 100%;
            max-width: var(--content-max);
            box-sizing: border-box;
            margin-bottom: 20px;
            box-shadow: var(--block-shadow);
        }

        .card + .card,
        .breadcrumbs + .card {
            margin-top: 22px;
        }

        .card h2,
        .card h3 {
            margin-top: 0;
            line-height: 1.2;
            letter-spacing: 0;
        }

        .card h2 {
            margin-bottom: 14px;
        }

        .content-section {
            position: relative;
            margin-top: 30px;
            padding: 22px 0 0 14px;
            border-top: 2px solid var(--block-border-soft);
            border-left: 3px solid var(--block-border);
        }

        .collapsible-section {
            position: relative;
            margin-top: 22px;
            padding: 16px 0 0 14px;
            border-top: 2px solid var(--block-border-soft);
            border-left: 3px solid var(--block-border);
        }

        .collapsible-section:first-of-type {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid var(--block-border-soft);
        }

        .collapsible-section > summary {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 34px;
            width: fit-content;
            max-width: 100%;
            margin-bottom: 12px;
            padding: 6px 10px 6px 0;
            border: 1px solid transparent;
            border-radius: 6px;
            font-size: 18px;
            font-weight: 700;
            line-height: 1.25;
            list-style: none;
            cursor: pointer;
            user-select: none;
        }

        .collapsible-section > summary:hover,
        .collapsible-section[open] > summary {
            border-color: var(--block-border-soft);
            background: var(--block-surface);
        }

        .collapsible-section > summary::-webkit-details-marker {
            display: none;
        }

        .collapsible-section > summary::before {
            content: "";
            width: 9px;
            height: 9px;
            margin: 1px 2px 0 0;
            border-right: 2px solid #667085;
            border-bottom: 2px solid #667085;
            transform: rotate(-45deg);
            flex: 0 0 auto;
            transition: transform 0.12s ease;
        }

        .collapsible-section[open] > summary::before {
            transform: rotate(45deg);
        }

        .collapsible-section__hint {
            font-size: 13px;
            font-weight: 400;
            color: #777;
        }

        details > summary.btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            padding-right: 42px;
            list-style: none;
            cursor: pointer;
        }

        details > summary.btn::-webkit-details-marker {
            display: none;
        }

        details > summary.btn::after {
            content: "";
            position: absolute;
            right: 16px;
            top: 50%;
            width: 9px;
            height: 9px;
            border-right: 2px solid #64748b;
            border-bottom: 2px solid #64748b;
            transform: translateY(-65%) rotate(45deg);
            transition: transform 0.15s ease;
            pointer-events: none;
        }

        details[open] > summary.btn::after {
            transform: translateY(-35%) rotate(225deg);
        }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(280px, 1fr));
            gap: 0 28px;
            width: 100%;
            max-width: 1180px;
        }

        .detail-grid__item {
            display: grid;
            grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
            gap: 10px;
            align-items: start;
            min-width: 0;
            padding: 9px 0;
            border-bottom: 1px solid #eee;
        }

        .detail-grid__label {
            min-width: 0;
            color: #333;
            font-weight: 600;
        }

        .detail-grid__value {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .content-section > h3 {
            margin: 0 0 14px;
            font-size: 18px;
            line-height: 1.25;
        }

        .content-section > .muted:first-child,
        .content-section > p:first-child {
            margin-top: 0;
        }

        .content-section .actions {
            margin: 8px 0 12px;
        }

        .table-actions-cell {
            min-width: 112px;
        }

        .table-actions {
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: stretch;
        }

        .table-actions form {
            display: block;
            margin: 0;
        }

        .table-actions .btn {
            width: 100%;
            min-width: 96px;
            text-align: center;
        }

        .table-icon-cell {
            width: 44px;
            min-width: 44px;
            max-width: 44px;
            text-align: center;
            white-space: nowrap;
        }

        .icon-action {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            min-width: 28px;
            padding: 0;
            border: 0;
            border-radius: 4px;
            background: transparent;
            color: var(--link-color);
            text-decoration: none;
            line-height: 1;
            vertical-align: middle;
        }

        .icon-action:hover,
        .icon-action:focus {
            background: #eef4ff;
            color: #174ea6;
            text-decoration: none;
        }

        .icon-action svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .icon-action--inline {
            width: 24px;
            height: 24px;
            min-width: 24px;
        }

        .entity-link-with-action {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            max-width: 100%;
            white-space: nowrap;
        }

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

        .work-line-add-form {
            margin-top: 18px;
            padding: 14px;
            border: 1px solid var(--block-border-soft);
            border-radius: 6px;
            background: var(--block-surface);
        }

        .recommendation-send-form {
            width: 100%;
            min-width: 0;
            max-width: 560px;
        }

        .recommendation-offer-rows {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .recommendation-offer-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(96px, 128px);
            gap: 6px 8px;
            align-items: start;
            padding: 8px 0 0;
            border: 1px solid var(--block-border-soft);
            border-width: 1px 0 0;
            border-radius: 6px;
            background: transparent;
        }

        .recommendation-offer-row input,
        .recommendation-offer-row select {
            width: 100%;
            min-width: 0;
        }

        .recommendation-offer-row select,
        .recommendation-offer-row .recommendation-send-form__title,
        .recommendation-offer-row input[name="note"] {
            grid-column: 1 / -1;
        }

        .recommendation-offer-row__remove {
            justify-self: start;
        }

        .recommendation-offer-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            margin: 8px 0 0;
        }

        .recommendation-offer-editor {
            width: fit-content;
            max-width: 100%;
            margin: 0;
            padding: 8px 10px;
            border: 1px solid transparent;
            border-radius: 6px;
            background: transparent;
        }

        .recommendation-offer-editor-row td {
            padding-top: 0;
            border-bottom-color: var(--block-border-soft);
            background: #fff;
        }

        .recommendation-offer-editor-row .recommendation-send-form {
            max-width: 920px;
        }

        .recommendation-offer-editor-row .recommendation-offer-row {
            grid-template-columns: minmax(220px, 1.5fr) minmax(220px, 1.5fr) minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
            align-items: center;
        }

        .recommendation-offer-editor-row .recommendation-offer-row select,
        .recommendation-offer-editor-row .recommendation-offer-row .recommendation-send-form__title,
        .recommendation-offer-editor-row .recommendation-offer-row input[name="note"] {
            grid-column: auto;
        }

        .recommendation-offer-editor > summary {
            width: fit-content;
            max-width: 100%;
            padding: 3px 0;
            border-radius: 5px;
            color: #3366cc;
            font-weight: 600;
            cursor: pointer;
            list-style-position: outside;
        }

        .recommendation-offer-editor[open] > summary,
        .recommendation-offer-editor > summary:hover {
            text-decoration: underline;
        }

        .recommendation-offer-editor .recommendation-send-form {
            margin-top: 8px;
        }

        .client-recommendation-decision {
            min-width: 360px;
        }

        .client-decision-form {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin: 0 0 10px;
            padding: 0 0 10px;
            border-bottom: 1px solid var(--block-border-soft);
        }

        .client-decision-form:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: 0;
        }

        .client-decision-fields {
            display: grid;
            grid-template-columns: minmax(128px, 0.7fr) minmax(160px, 1fr);
            gap: 6px;
            align-items: end;
        }

        .client-decision-field {
            display: block;
            min-width: 0;
        }

        .client-decision-field span {
            display: block;
            margin-bottom: 2px;
            color: #555;
            font-size: 12px;
            font-weight: 600;
        }

        .client-decision-field input {
            width: 100%;
            box-sizing: border-box;
        }

        .client-decision-reject-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 12px;
            align-items: center;
        }

        .client-decision-reject-reason {
            width: fit-content;
            max-width: 100%;
        }

        .client-decision-reject-reason[open] {
            width: 100%;
        }

        .client-decision-reject-reason > summary {
            width: fit-content;
            color: #3366cc;
            font-weight: 600;
            cursor: pointer;
            list-style-position: outside;
        }

        .client-decision-reject-reason > summary:hover {
            text-decoration: underline;
        }

        .client-decision-reject-reason .client-decision-field {
            margin-top: 6px;
            max-width: 360px;
        }

        .client-decision-form .btn {
            align-self: flex-start;
        }

        .status-flow {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 14px;
            align-items: center;
        }

        .status-flow__current {
            font-weight: 600;
        }

        .status-flow .actions {
            margin: 0;
        }

        table {
            width: 100%;
            max-width: 100%;
            min-width: 100%;
            border-collapse: collapse;
            margin-top: 16px;
            font-size: 14px;
            display: table;
            table-layout: auto;
            overflow-x: visible;
        }

        table.compact-table {
            font-size: 13px;
        }

        table.compact-table th,
        table.compact-table td {
            padding: 6px;
        }

        form table {
            margin-top: 0;
        }

        form table th,
        form table td {
            vertical-align: top;
            min-width: 0;
        }

        form table input,
        form table select,
        form table textarea,
        form table .searchable-select,
        form table .searchable-select__button {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            box-sizing: border-box;
        }

        form table td:has(> .btn),
        form table td:has(> button),
        form table td:has(> form.inline),
        form table td:has(> form > button) {
            white-space: nowrap;
            overflow-wrap: normal;
            word-break: normal;
        }

        table.data-table {
            display: table;
            table-layout: auto;
            overflow-x: visible;
        }

        .table-scroll {
            width: 100%;
            max-width: 100%;
            margin-top: 16px;
            overflow-x: visible;
            -webkit-overflow-scrolling: touch;
            border: 1px solid var(--block-border-soft);
            border-radius: 6px;
            background: #fff;
        }

        .table-scroll.table-scroll--wide {
            overflow-x: auto;
        }

        .table-scroll.table-scroll--fit {
            overflow-x: visible;
        }

        .table-scroll table {
            width: 100%;
            min-width: 100%;
            max-width: 100%;
            margin-top: 0;
            table-layout: fixed;
        }

        .table-scroll.table-scroll--wide table {
            width: max-content;
            min-width: max(100%, var(--table-min-width, 960px));
            max-width: none;
            table-layout: auto;
        }

        .table-scroll.table-scroll--fit table {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            table-layout: fixed;
        }

        .table-scroll th,
        .table-scroll td {
            min-width: 84px;
            max-width: 360px;
        }

        .table-scroll th:first-child,
        .table-scroll td:first-child {
            min-width: 72px;
        }

        .table-scroll.table-scroll--fit th,
        .table-scroll.table-scroll--fit td {
            min-width: 0;
            max-width: none;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .table-scroll.table-scroll--fit table[data-smart-widths="1"] .smart-cell-date,
        .table-scroll.table-scroll--fit table[data-smart-widths="1"] .smart-cell-money,
        .table-scroll.table-scroll--fit table[data-smart-widths="1"] .smart-cell-status {
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .table-scroll th,
        .table-scroll td,
        .table-scroll table a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create),
        .table-scroll table .badge,
        .table-scroll table .muted {
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .table-scroll table .cell-nowrap,
        .table-scroll table .cell-money,
        .table-scroll table[data-smart-widths="1"] .smart-cell-date,
        .table-scroll table[data-smart-widths="1"] .smart-cell-money,
        .table-scroll table[data-smart-widths="1"] .smart-cell-status {
            white-space: nowrap;
            overflow-wrap: normal;
        }

        table.table-fit {
            display: table;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            table-layout: fixed;
            overflow-x: visible;
        }

        table.table-fit th,
        table.table-fit td {
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: normal;
            min-width: 0;
        }

        table.table-fit .cell-nowrap,
        table.table-fit .cell-money {
            white-space: nowrap;
            overflow-wrap: normal;
        }

        table[data-smart-widths="1"] {
            table-layout: fixed;
        }

        table[data-smart-widths="1"] th,
        table[data-smart-widths="1"] td {
            min-width: 0;
            max-width: none;
        }

        table[data-smart-widths="1"] .smart-cell-date,
        table[data-smart-widths="1"] .smart-cell-money,
        table[data-smart-widths="1"] .smart-cell-status {
            white-space: nowrap;
            overflow-wrap: normal;
        }

        table[data-smart-widths="1"] .smart-cell-long {
            max-width: none;
            white-space: normal;
            overflow-wrap: break-word;
            word-break: normal;
            hyphens: auto;
        }

        .table-scroll table[data-smart-widths="1"] .smart-cell-long,
        .table-scroll table[data-smart-widths="1"] .smart-cell-long a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create) {
            white-space: normal;
            overflow-wrap: break-word;
            word-break: normal;
            hyphens: auto;
        }

        .table-scroll table[data-smart-widths="1"] th,
        .table-scroll table[data-smart-widths="1"] td {
            overflow: visible;
            text-overflow: clip;
            overflow-wrap: break-word;
            word-break: normal;
            hyphens: auto;
        }

        table form[action$="/activate"],
        table form[action$="/deactivate"] {
            display: none !important;
        }

        tr.is-archived-row {
            color: #687385;
            background: #f7f8fb;
        }

        tr.is-archived-row > th,
        tr.is-archived-row > td {
            border-bottom-color: #e3e7ee;
        }

        tr.is-archived-row a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create) {
            color: #6a7894;
        }

        tr.is-archived-row .badge {
            background: #eef1f5;
            color: #697386;
            border-color: #d9dee8;
        }

        th, td {
            padding: 10px 12px;
            border-bottom: 1px solid #edf0f4;
            text-align: left;
            vertical-align: top;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: normal;
            max-width: none;
            line-height: 1.35;
        }

        td > *,
        th > * {
            min-width: 0;
            max-width: 100%;
        }

        td:has(.btn),
        th:has(.btn),
        td:has(form),
        th:has(form) {
            overflow-wrap: normal;
        }

        td input:not([type="checkbox"]):not([type="radio"]),
        td select,
        td textarea,
        td .searchable-select {
            width: 100%;
            min-width: 0;
        }

        th {
            font-weight: 600;
            color: #303743;
            background: var(--table-head);
            border-bottom-color: #e1e6ef;
        }

        th[data-sortable-column="1"] {
            cursor: pointer;
            user-select: none;
        }

        th[data-sortable-column="1"]:hover {
            background: #eef4ff;
        }

        .table-sort-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            max-width: 100%;
            min-width: 0;
        }

        .table-sort-label::after {
            content: "←";
            width: 12px;
            height: 14px;
            flex: 0 0 12px;
            color: #9aa4b2;
            font-size: 14px;
            line-height: 1;
            background: none;
        }

        th[aria-sort="ascending"] .table-sort-label::after {
            content: "";
            width: 0;
            height: 0;
            flex-basis: 0;
            color: transparent;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-bottom: 7px solid #2255aa;
            background: none;
        }

        th[aria-sort="descending"] .table-sort-label::after {
            content: "";
            width: 0;
            height: 0;
            flex-basis: 0;
            color: transparent;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 7px solid #2255aa;
            background: none;
        }

        .list-sort-button {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            width: 100%;
            min-width: 0;
            padding: 0;
            min-height: 0 !important;
            height: auto !important;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            font-weight: inherit;
            text-align: left;
            cursor: pointer;
        }

        .list-sort-button::after {
            content: "←";
            width: 12px;
            flex: 0 0 12px;
            color: #9aa4b2;
            font-size: 14px;
            line-height: 1;
        }

        .list-sort-button[aria-sort="ascending"]::after {
            content: "▲";
            color: #2255aa;
        }

        .list-sort-button[aria-sort="descending"]::after {
            content: "▼";
            color: #2255aa;
        }

        tbody tr:hover {
            background: var(--row-hover);
        }

        tbody tr:last-child > th,
        tbody tr:last-child > td {
            border-bottom-color: transparent;
        }

        .cell-nowrap {
            white-space: nowrap;
            overflow-wrap: normal;
        }

        .cell-money {
            white-space: nowrap;
            overflow-wrap: normal;
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

        .link-chip {
            justify-content: flex-start !important;
            max-width: none;
            text-align: left;
            overflow-wrap: normal;
            word-break: normal;
            white-space: nowrap;
        }

        .link-chip--nowrap {
            white-space: nowrap !important;
        }

        .role-list {
            display: grid;
            gap: 6px;
            min-width: 220px;
        }

        .role-list__row {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr);
            gap: 8px;
            align-items: start;
        }

        .role-list__label {
            color: #555;
            white-space: nowrap;
        }

        .role-list__value {
            min-width: 0;
        }

        fieldset {
            border: 1px solid var(--block-border-soft);
            border-radius: 6px;
            background: var(--block-surface);
        }

        .actions {
            margin: 12px 0 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px 12px;
            align-items: flex-end !important;
        }

        .actions > form {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 12px;
            align-items: flex-end !important;
            margin: 0;
            min-width: 0;
        }

        .actions > form label {
            margin: 0;
        }

        .actions > form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        .actions > form select,
        .actions > form .searchable-select {
            min-width: min(260px, 100%);
        }

        .actions > .btn,
        .actions > a.btn,
        .actions > button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop),
        .actions > form > .btn,
        .actions > form > button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop) {
            min-height: var(--control-height);
            height: var(--control-height);
            align-self: flex-end;
            box-sizing: border-box;
            white-space: nowrap;
            overflow-wrap: normal;
        }

        .actions:first-child {
            margin-top: 0;
        }

        .actions + .actions,
        form + .actions {
            margin-top: 16px;
        }

        .pagination-dock {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 4px 6px;
            width: 100%;
            margin: 12px 0 0;
            padding: 8px 0 0;
            border: 0;
            border-top: 1px solid var(--block-border-soft);
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .pagination-dock__page,
        .pagination-dock__step,
        .pagination-dock__ellipsis {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            min-height: 24px;
            padding: 1px 3px;
            font-size: 15px;
            font-weight: 600;
            line-height: 1;
            white-space: nowrap;
        }

        .pagination-dock__page,
        .pagination-dock__step {
            color: #1f5fbf;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .pagination-dock__page--current {
            color: #2255aa;
            font-weight: 700;
            text-decoration: none;
        }

        .pagination-dock__ellipsis {
            color: var(--text-main);
            letter-spacing: 0;
        }

        .work-orders-list-actions {
            align-items: flex-end;
        }

        .work-orders-list-actions > form {
            align-items: flex-end;
        }

        .work-orders-list-actions .form-row {
            min-width: min(140px, 100%);
        }

        .work-orders-list-actions select {
            min-width: min(96px, 100%);
        }

        .work-orders-table {
            table-layout: fixed;
        }

        .work-orders-table col.col-number { width: 6%; }
        .work-orders-table col.col-operated { width: 8%; }
        .work-orders-table col.col-created { width: 11%; }
        .work-orders-table col.col-closed { width: 11%; }
        .work-orders-table col.col-client { width: 10%; }
        .work-orders-table col.col-vehicle { width: 10%; }
        .work-orders-table col.col-roles { width: 18%; }
        .work-orders-table col.col-amount { width: 8%; }
        .work-orders-table col.col-settlements { width: 13%; }
        .work-orders-table col.col-status { width: 5%; }
        .work-orders-table col.col-action { width: 44px; }

        .work-orders-table th,
        .work-orders-table td {
            overflow-wrap: normal;
            word-break: normal;
        }

        .report-filter-grid {
            --report-control-height: 46px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
            gap: 12px 16px;
            align-items: end;
            margin: 14px 0 16px;
        }

        .report-filter-grid > .form-row {
            display: grid;
            grid-template-rows: minmax(34px, auto) minmax(var(--report-control-height), auto);
            align-content: end;
            align-self: end;
        }

        .report-filter-grid > .form-row > label:not(:has(input[type="checkbox"])):not(:has(input[type="radio"])) {
            display: flex;
            align-items: flex-end;
            min-height: 34px;
            line-height: 1.25;
        }

        .report-filter-grid .form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        .report-filter-grid .form-row select,
        .report-filter-grid .searchable-select,
        .report-filter-grid .searchable-select__button {
            width: 100%;
            min-height: var(--report-control-height);
            box-sizing: border-box;
        }

        .report-filter-grid .searchable-select__button {
            display: flex;
            align-items: center;
        }

        .report-filter-actions,
        .report-filter-checks {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 14px;
            align-items: center;
        }

        .report-filter-actions {
            align-self: end;
            padding-top: 38px;
        }

        .report-filter-actions > .btn,
        .report-filter-actions > button {
            min-height: var(--report-control-height);
        }

        .report-filter-checks {
            grid-column: 1 / -1;
        }

        .report-filter-checks label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin: 0;
        }

        .report-summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 14px;
            margin: 16px 0;
        }

        .report-metric {
            border: 1px solid var(--block-border);
            border-radius: 8px;
            padding: 14px 16px;
            background: #fff;
        }

        .report-metric strong,
        .report-metric span {
            display: block;
        }

        .report-table th,
        .report-table td {
            vertical-align: top;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .report-table .num,
        .report-table .money,
        .report-table .pct,
        .report-table .date,
        .report-table .status {
            white-space: nowrap;
            overflow-wrap: normal;
        }

        .report-table .action,
        .report-table .text,
        .report-table .comment {
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .report-table .action a:not(.btn),
        .report-table .text a:not(.btn),
        .report-table .comment a:not(.btn) {
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .card > form:has(> .form-row),
        .filters,
        .filters-row,
        .form-grid,
        form[style*="grid-template-columns"],
        form[style*="display:grid"],
        form[style*="display: grid"] {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important;
            gap: 12px 16px;
            align-items: start;
            max-width: none !important;
        }

        .filters {
            margin: 14px 0 16px;
        }

        form[style*="display:flex"],
        .filters-row {
            display: flex !important;
            flex-wrap: wrap;
            gap: 10px 12px;
            align-items: flex-end;
        }

        .filters-row > *,
        form[style*="display:flex"] > label,
        form[style*="display:flex"] > div {
            min-width: min(220px, 100%);
            flex: 1 1 220px;
        }

        .filters-row > .form-row,
        form[style*="display:flex"] > .form-row {
            display: block;
        }

        .filters-row .actions,
        .filters .actions {
            flex: 1 1 100%;
        }

        .card > form:has(> .form-row) > .actions,
        .filters > .actions,
        .form-grid > .actions,
        form[style*="grid-template-columns"] > .actions,
        form[style*="display:grid"] > .actions,
        form[style*="display: grid"] > .actions {
            grid-column: 1 / -1;
            width: 100%;
        }

        .form-row {
            min-width: 0;
            margin: 0;
            align-self: start;
        }

        .period-filter-group {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            width: 100%;
            max-width: min(920px, 100%);
            min-width: min(460px, 100%);
            padding: 10px;
            border: 1px solid #d9e5f6;
            border-radius: 6px;
            background: #f8fbff;
            align-self: start;
        }

        .card > form:has(> .form-row) > .period-filter-group,
        .report-filter-grid > .period-filter-group,
        .filters > .period-filter-group,
        .form-grid > .period-filter-group,
        form[style*="grid-template-columns"] > .period-filter-group,
        form[style*="display:grid"] > .period-filter-group,
        form[style*="display: grid"] > .period-filter-group {
            grid-column: 1 / -1;
        }

        .filters-row > .period-filter-group,
        form[style*="display:flex"] > .period-filter-group {
            flex: 1 1 100%;
        }

        .period-filter-group .form-row {
            min-width: 0;
        }

        .form-row label,
        .form-row > span:first-child {
            display: block;
            margin-bottom: 4px;
            font-size: 13px;
            font-weight: 600;
            color: #444;
        }

        .ru-date-field {
            position: relative;
            display: block;
            width: 100%;
            min-width: 0;
        }

        .ru-date-field > input[data-ru-date-display-enhanced="1"] {
            width: 100%;
            padding-right: 44px;
        }

        button.ru-date-picker-button {
            position: absolute;
            top: 1px;
            right: 1px;
            bottom: 1px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px !important;
            min-width: 38px !important;
            max-width: 38px !important;
            min-height: 0;
            padding: 0;
            border: 0;
            border-left: 1px solid #d7dde7;
            border-radius: 0 4px 4px 0;
            background: transparent;
            box-shadow: none;
            cursor: pointer;
        }

        button.ru-date-picker-button::before {
            content: "";
            display: block;
            width: 15px;
            height: 14px;
            border: 2px solid #667085;
            border-top-width: 4px;
            border-radius: 3px;
            box-sizing: border-box;
        }

        button.ru-date-picker-button:hover,
        button.ru-date-picker-button:focus-visible {
            background: #eef4ff;
        }

        .ru-date-popup {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 10000;
            width: min(320px, calc(100vw - 24px));
            padding: 12px;
            border: 1px solid #d7dde7;
            border-radius: 8px;
            background: #fff;
            box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
        }

        .ru-date-popup[hidden] {
            display: none !important;
            pointer-events: none !important;
        }

        .ru-date-popup__header {
            display: grid;
            grid-template-columns: 36px 1fr 36px;
            gap: 8px;
            align-items: center;
            margin-bottom: 10px;
        }

        .ru-date-popup__title {
            font-weight: 700;
            text-align: center;
            color: #20242a;
        }

        .ru-date-popup__nav,
        .ru-date-popup__day {
            min-height: 36px;
            padding: 0;
            border-radius: 6px;
            line-height: 1;
        }

        .ru-date-popup__weekdays,
        .ru-date-popup__days {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 4px;
        }

        .ru-date-popup__weekdays {
            margin-bottom: 5px;
            color: #697386;
            font-size: 12px;
            font-weight: 700;
            text-align: center;
        }

        .ru-date-popup__weekday,
        .ru-date-popup__day {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            aspect-ratio: 1 / 1;
        }

        .ru-date-popup__day {
            border: 1px solid transparent;
            background: transparent;
            color: #20242a;
            font-size: 14px;
            cursor: pointer;
        }

        .ru-date-popup__day:hover,
        .ru-date-popup__day:focus-visible {
            border-color: #b8c7e6;
            background: #eef4ff;
        }

        .ru-date-popup__day.is-today {
            border-color: #93c5fd;
            font-weight: 700;
        }

        .ru-date-popup__day.is-selected {
            border-color: #2563eb;
            background: #2563eb;
            color: #fff;
            font-weight: 700;
        }

        .ru-date-popup__day.is-muted {
            color: #98a2b3;
        }

        @media (pointer: coarse), (max-width: 640px) {
            .ru-date-popup {
                position: fixed;
                left: 12px;
                right: 12px;
                top: 50%;
                width: auto;
                max-width: 420px;
                margin: 0 auto;
                transform: translateY(-50%);
            }

            .ru-date-popup__nav,
            .ru-date-popup__day {
                min-height: 42px;
            }
        }

        .card > form:has(> .form-row) > .form-row > label:not(:has(input[type="checkbox"])):not(:has(input[type="radio"])),
        .card > form:has(> .form-row) > .form-row > span:first-child,
        .form-grid > .form-row > label:not(:has(input[type="checkbox"])):not(:has(input[type="radio"])),
        .form-grid > .form-row > span:first-child,
        .filters > .form-row > label:not(:has(input[type="checkbox"])):not(:has(input[type="radio"])),
        .filters > .form-row > span:first-child {
            display: flex;
            align-items: flex-end;
            min-height: 34px;
            line-height: 1.25;
        }

        label.required-label::after {
            content: " *";
            color: #c62828;
            font-weight: 700;
        }

        label .required,
        .required {
            color: #c62828;
            font-weight: 700;
        }

        form label {
            display: block;
            margin-bottom: 4px;
            font-size: 13px;
            font-weight: 600;
            color: #444;
        }

        form[style*="display:grid"] > label,
        form[style*="display: grid"] > label {
            min-width: 0;
            margin: 0;
        }

        form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        form select {
            min-height: var(--control-height);
            padding: 7px 10px;
            border: 1px solid #bbb;
            border-radius: 4px;
            background: #fff;
            color: #222;
            font: inherit;
            line-height: 1.3;
            vertical-align: middle;
        }

        form select {
            padding-right: 30px;
        }

        .form-row input:not([type="checkbox"]):not([type="radio"]),
        .form-row select,
        .form-row textarea,
        .form-row .searchable-select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .form-row > select[data-searchable="off"] {
            display: block;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            height: var(--control-height);
        }

        form[style*="display:grid"] > label > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        form[style*="display:grid"] > label > select,
        form[style*="display:grid"] > label > textarea,
        form[style*="display: grid"] > label > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        form[style*="display: grid"] > label > select,
        form[style*="display: grid"] > label > textarea {
            width: 100%;
            box-sizing: border-box;
            margin-top: 4px;
        }

        .form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        .form-row select,
        .searchable-select__button {
            min-height: var(--control-height);
            padding-top: 7px;
            padding-bottom: 7px;
            line-height: 1.3;
        }

        .form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        .form-row select {
            border: 1px solid #bbb;
            border-radius: 4px;
            background: #fff;
            color: #222;
            font: inherit;
        }

        .form-row textarea {
            min-height: 76px;
            resize: vertical;
        }

        .form-row .feedback-rating {
            display: flex;
            align-items: center;
            min-height: var(--control-height);
            width: 100%;
            padding: 2px 0;
        }

        .form-row .feedback-rating__star {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 30px;
            min-height: var(--control-height);
            font-size: 28px;
            line-height: 1;
            color: #d5a600;
            cursor: pointer;
        }

        .feedback-rating__input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .feedback-rating__star:hover,
        .feedback-rating__star:focus-visible {
            color: #b8860b;
            outline: none;
        }

        .form-row:has(textarea),
        .card > form:has(> .form-row) > .actions,
        .card > form:has(> .form-row) > .muted {
            grid-column: 1 / -1;
        }

        .card > form:has(> .form-row) > .actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 12px;
            align-items: center;
            margin: 10px 0 6px;
            padding-top: 2px;
        }

        .btn,
        button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop):not(.ru-date-picker-button):not(.ru-date-popup__nav):not(.ru-date-popup__day):not(.status-multiselect__remove),
        input[type="submit"],
        input[type="button"],
        input[type="file"]::file-selector-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            min-height: var(--control-height);
            max-width: 100%;
            padding: 7px 12px;
            border: 1px solid #d7dce3;
            border-radius: 4px;
            background: #f3f4f6;
            color: #222;
            font: inherit;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.25;
            text-align: center;
            text-decoration: none;
            vertical-align: middle;
            white-space: normal;
            overflow-wrap: anywhere;
            cursor: pointer;
            appearance: none;
        }

        .btn:hover,
        button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop):not(.status-multiselect__remove):hover,
        input[type="submit"]:hover,
        input[type="button"]:hover,
        input[type="file"]::file-selector-button:hover {
            border-color: #c5ccd6;
            background: #e9edf3;
            text-decoration: none;
        }

        .btn:focus-visible,
        button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop):not(.status-multiselect__remove):focus-visible,
        input[type="submit"]:focus-visible,
        input[type="button"]:focus-visible,
        input[type="file"]:focus-visible {
            outline: 2px solid rgba(45, 115, 255, 0.35);
            outline-offset: 2px;
        }

        .auto-submit-filter [data-auto-submit-apply-button] {
            display: none !important;
        }

        .btn.primary,
        button.primary,
        input.primary {
            background: #2d73ff;
            border-color: #2d73ff;
            color: #fff;
        }

        .btn.primary:hover,
        button.primary:hover,
        input.primary:hover {
            background: #1f63e6;
            border-color: #1f63e6;
        }

        .btn.secondary,
        button.secondary,
        input.secondary {
            background: #f3f4f6;
            border-color: #d7dce3;
            color: #222;
        }

        .btn.danger,
        button.danger,
        input.danger {
            background: #d9534f;
            border-color: #d9534f;
            color: #fff;
        }

        .btn.danger:hover,
        button.danger:hover,
        input.danger:hover {
            background: #c9433f;
            border-color: #c9433f;
        }

        .btn:disabled,
        button:disabled,
        input[type="submit"]:disabled,
        input[type="button"]:disabled {
            opacity: 0.58;
            cursor: not-allowed;
        }

        input[type="file"] {
            max-width: 100%;
            color: #444;
            font: inherit;
            font-size: 14px;
        }

        button.table-tree-toggle,
        .table-tree-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            min-width: 30px;
            height: 30px;
            min-height: 30px;
            padding: 0;
            border: 1px solid #d7dce3;
            border-radius: 6px;
            background: #f8fafc;
            color: #667085;
            position: relative;
            flex: 0 0 30px;
            overflow: hidden;
            font-size: 0;
            line-height: 1;
            vertical-align: middle;
        }

        button.table-tree-toggle:hover,
        .table-tree-toggle:hover {
            border-color: #c5ccd6;
            background: #eef4ff;
        }

        button.table-tree-toggle::before,
        .table-tree-toggle::before {
            content: "";
            width: 8px;
            height: 8px;
            border-right: 2px solid currentColor;
            border-bottom: 2px solid currentColor;
            transform: rotate(-45deg);
            transition: transform 0.12s ease;
        }

        button.table-tree-toggle[aria-expanded="true"]::before,
        .table-tree-toggle[aria-expanded="true"]::before {
            transform: rotate(45deg);
        }

        .table-tree-toggle-placeholder {
            display: inline-block;
            width: 30px;
            min-width: 30px;
            height: 30px;
            flex: 0 0 30px;
        }

        a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create):not(.people-access__toggle) {
            display: inline;
            max-width: 100%;
            color: #2255aa;
            font: inherit;
            font-weight: 500;
            line-height: inherit;
            text-decoration: underline;
            text-decoration-thickness: 1px;
            text-underline-offset: 2px;
            vertical-align: middle;
            white-space: normal;
        }

        table a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create),
        table .badge,
        table .muted {
            display: inline;
            max-width: none;
            white-space: normal;
            overflow-wrap: normal;
        }

        a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create):not(.people-access__toggle):hover {
            color: #123f8a;
            text-decoration-thickness: 2px;
        }

        .btn + .btn {
            margin-left: 0;
        }

        .form-row > .btn,
        .form-grid .btn,
        .filters .btn,
        .filter-form .btn,
        table .btn,
        .executor-picker__controls .btn,
        .mixed-executor-picker__add .btn,
        .mixed-executor-picker__controls .btn {
            min-height: var(--control-height);
            height: var(--control-height);
            align-self: start;
            box-sizing: border-box;
            white-space: nowrap;
            overflow-wrap: normal;
        }

        .muted {
            color: #777;
            font-size: 14px;
        }

        .entity-creation-marker {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 8px;
            max-width: 100%;
            margin: -2px 0 12px;
            color: #64748b;
            font-size: 12px;
            line-height: 1.35;
        }

        .entity-creation-marker a {
            font-size: inherit;
        }

        .breadcrumbs {
            font-size: 13px;
            margin-bottom: 10px;
        }

        .breadcrumbs a {
            font-size: 13px;
        }

        .breadcrumbs a:hover {
            text-decoration: none;
        }

        .inline {
            display: inline-block;
        }

        .inline form {
            display: inline;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 10px;
            margin: 14px 0 18px;
        }

        .stat-card {
            padding: 12px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            background: #fff;
        }

        .stat-card span {
            display: block;
            color: #777;
            font-size: 13px;
            margin-bottom: 4px;
        }

        .stat-card strong {
            font-size: 20px;
        }

        /* Бейджи статусов */
        .badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 500;
        }

        .badge.status-created {
            background: #e3f2fd;
            color: #1565c0;
        }

        .badge.status-applied {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .badge.status-refunded {
            background: #ffebee;
            color: #c62828;
        }

        .searchable-select {
            --entity-link-size: 30px;
            position: relative;
            display: inline-grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 4px;
            align-items: start;
            min-width: min(220px, 100%);
            width: 100%;
            max-width: 100%;
        }

        .searchable-select.has-selected-detail {
            grid-template-columns: minmax(0, 1fr) var(--entity-link-size);
            align-items: stretch;
        }

        .searchable-select.has-selected-detail > .searchable-select__button {
            grid-column: 1;
            grid-row: 1;
            min-width: 0;
        }

        .searchable-select.has-selected-detail > .searchable-select__selected-link {
            grid-column: 2;
            grid-row: 1;
        }

        table .searchable-select,
        .form-grid .searchable-select,
        .filters .searchable-select,
        .filters-row .searchable-select,
        .actions .searchable-select {
            min-width: 0;
        }

        table .searchable-select.has-selected-detail,
        .form-grid .searchable-select.has-selected-detail,
        .filters .searchable-select.has-selected-detail,
        .filters-row .searchable-select.has-selected-detail,
        .actions .searchable-select.has-selected-detail {
            display: grid;
            grid-template-columns: minmax(0, 1fr) var(--entity-link-size);
            grid-auto-rows: minmax(var(--control-height), auto);
            align-items: stretch;
        }

        .searchable-select__native {
            position: absolute;
            left: 0;
            top: 0;
            width: 1px !important;
            height: 1px !important;
            min-height: 1px !important;
            opacity: 0 !important;
            pointer-events: none;
        }

        .searchable-select__button {
            position: relative;
            width: 100%;
            min-height: 38px;
            padding: 7px 32px 7px 10px;
            border: 1px solid #bbb;
            border-radius: 4px;
            background: #fff;
            color: #222;
            font: inherit;
            text-align: left;
            cursor: pointer;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .searchable-select.has-validation-error > .searchable-select__button {
            border-color: #c62828;
            box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.12);
        }

        .searchable-select__validation-error {
            display: none;
            width: 100%;
            margin-top: 5px;
            color: #c62828;
            font-size: 0.9rem;
            line-height: 1.3;
        }

        .searchable-select__validation-error:not([hidden]) {
            display: block;
        }

        .searchable-select.has-selected-detail > .searchable-select__validation-error {
            grid-column: 1 / -1;
        }

        .searchable-select.is-disabled .searchable-select__button,
        .searchable-select__button:disabled {
            cursor: not-allowed;
            opacity: 0.65;
            background: #f3f4f6;
            color: #777;
        }

        .searchable-select__button::after {
            content: "";
            position: absolute;
            right: 12px;
            top: 50%;
            width: 8px;
            height: 8px;
            border-right: 1.5px solid #667085;
            border-bottom: 1.5px solid #667085;
            transform: translateY(-65%) rotate(45deg);
            pointer-events: none;
        }

        .searchable-select.is-open .searchable-select__button::after {
            transform: translateY(-25%) rotate(225deg);
        }

        .searchable-select__selected-link {
            display: none;
            align-items: center;
            justify-content: center;
            width: var(--entity-link-size);
            min-width: var(--entity-link-size);
            height: auto;
            min-height: var(--control-height);
            border: 0;
            border-radius: 4px;
            background: transparent;
            color: #3366cc;
            font-size: 18px;
            line-height: 1;
            text-decoration: none;
            box-sizing: border-box;
            align-self: stretch;
        }

        .searchable-select.has-selected-detail .searchable-select__selected-link {
            display: inline-flex !important;
        }

        .searchable-select__selected-link[hidden],
        .searchable-select__selected-link.is-disabled,
        .searchable-select.is-disabled .searchable-select__selected-link {
            display: none !important;
        }

        .searchable-select__selected-link:hover {
            background: transparent;
            color: #174ea6;
            text-decoration: none;
        }

        .searchable-select__dropdown {
            position: fixed;
            z-index: 1000;
            top: 0;
            left: 0;
            width: min(100%, calc(100vw - 24px));
            min-width: min(220px, calc(100vw - 24px));
            max-width: calc(100vw - 24px);
            padding: 6px;
            border: 1px solid #ccc;
            border-radius: 6px;
            background: #fff;
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
            box-sizing: border-box;
        }

        .searchable-select:not(.is-open) .searchable-select__dropdown {
            display: none !important;
            pointer-events: none !important;
        }

        .searchable-select__search {
            width: 100%;
            box-sizing: border-box;
            padding: 7px 9px;
            border: 1px solid #bbb;
            border-radius: 4px;
            font: inherit;
        }

        .searchable-select__options {
            margin-top: 6px;
            max-height: var(--searchable-options-max-height, min(288px, 55vh));
            overflow-y: auto;
        }

        .searchable-select__option-row {
            display: flex;
            align-items: stretch;
            gap: 4px;
            width: 100%;
            min-height: 36px;
        }

        .searchable-select__option,
        .searchable-select__empty {
            display: block;
            width: 100%;
            padding: 7px 9px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: #222;
            font: inherit;
            text-align: left;
        }

        .searchable-select__option {
            flex: 1 1 auto;
            min-width: 0;
            cursor: pointer;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .searchable-select__option:hover,
        .searchable-select__option.is-selected {
            background: #eef4ff;
        }

        .placeholder-contractor-warning,
        .placeholder-master-warning,
        .placeholder-supplier-warning,
        a.placeholder-contractor-warning,
        a.placeholder-master-warning,
        a.placeholder-supplier-warning,
        .searchable-select__button.placeholder-contractor-warning,
        .searchable-select__button.placeholder-master-warning,
        .searchable-select__button.placeholder-supplier-warning,
        .searchable-select__option.placeholder-contractor-warning,
        .searchable-select__option.placeholder-master-warning,
        .searchable-select__option.placeholder-supplier-warning,
        .executor-picker__chip.placeholder-contractor-warning,
        .executor-picker__chip.placeholder-master-warning,
        .mixed-executor-picker__chip.placeholder-contractor-warning,
        .mixed-executor-picker__chip.placeholder-master-warning {
            color: #b91c1c !important;
            border-color: #ef4444 !important;
            background: #fef2f2 !important;
            font-weight: 700;
        }

        .searchable-select__option-row.placeholder-contractor-warning,
        .searchable-select__option-row.placeholder-master-warning,
        .searchable-select__option-row.placeholder-supplier-warning {
            border: 1px solid #ef4444;
            border-radius: 5px;
            background: #fef2f2;
        }

        .searchable-select__option-row.placeholder-contractor-warning .searchable-select__option-link,
        .searchable-select__option-row.placeholder-master-warning .searchable-select__option-link,
        .searchable-select__option-row.placeholder-supplier-warning .searchable-select__option-link {
            color: #b91c1c;
        }

        .searchable-select__option-link {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 34px;
            padding: 7px 8px;
            border-radius: 4px;
            color: #3366cc;
            font-size: 12px;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
        }

        .searchable-select__option-link:hover {
            background: #eef4ff;
            text-decoration: underline;
        }

        .searchable-select__empty {
            color: #777;
        }

        .searchable-select__error {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            padding: 7px 9px;
            box-sizing: border-box;
            color: #991b1b;
        }

        .searchable-select__retry {
            flex: 0 0 auto;
            min-height: 34px;
            padding: 5px 10px;
            white-space: nowrap;
        }

        .searchable-select__create {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 6px;
            padding: 8px 10px;
            border: 1px solid #bfdbfe;
            border-radius: 6px;
            background: #eff6ff;
            color: #1d4ed8;
            text-decoration: none;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.2;
            box-sizing: border-box;
        }

        .searchable-select__create::before {
            content: "+";
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            background: #2563eb;
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            line-height: 1;
        }

        .searchable-select__create:hover {
            background: #dbeafe;
            border-color: #93c5fd;
            color: #174ea6;
            text-decoration: none;
        }

        @media (max-width: 760px) {
            .searchable-select.is-mobile-panel .searchable-select__dropdown {
                left: var(--searchable-mobile-left, var(--page-gutter)) !important;
                top: var(--searchable-mobile-top, var(--page-gutter)) !important;
                width: var(--searchable-mobile-width, calc(100vw - (var(--page-gutter) * 2))) !important;
                min-width: 0;
                max-width: calc(100vw - (var(--page-gutter) * 2));
                max-height: var(--searchable-mobile-height, min(520px, calc(100vh - (var(--page-gutter) * 2)))) !important;
                display: grid;
                grid-template-rows: auto auto minmax(0, 1fr);
                padding: 10px;
                border-radius: 8px;
                box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
                overscroll-behavior: contain;
            }

            .searchable-select.is-mobile-panel .searchable-select__search {
                min-height: 44px;
                font-size: 16px;
            }

            .searchable-select.is-mobile-panel .searchable-select__options {
                max-height: var(--searchable-options-max-height, 48vh);
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
            }

            .searchable-select.is-mobile-panel .searchable-select__option-row {
                min-height: 44px;
            }

            .searchable-select.is-mobile-panel .searchable-select__option,
            .searchable-select.is-mobile-panel .searchable-select__empty {
                padding: 10px 9px;
                white-space: normal;
                overflow-wrap: anywhere;
            }
        }

        .table-column-settings {
            margin: 0 0 10px;
            max-width: 100%;
        }

        .table-tools {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 8px;
            margin: 0 0 10px;
            max-width: 100%;
        }

        .table-scroll > .table-tools {
            margin: 10px 10px 10px;
        }

        .table-scroll > .table-column-settings {
            margin: 10px 10px 10px;
        }

        .table-tools > .table-column-settings {
            margin: 0;
        }

        .table-column-settings summary {
            display: inline-flex;
            align-items: center;
            position: relative;
            min-height: 30px;
            padding: 5px 30px 5px 10px;
            border: 1px solid #cfd7e6;
            border-radius: 999px;
            background: #f8fbff;
            color: #2255aa;
            font-size: 13px;
            cursor: pointer;
            user-select: none;
            list-style: none;
        }

        .table-column-settings summary::-webkit-details-marker {
            display: none;
        }

        .table-column-settings summary::after {
            content: "";
            position: absolute;
            right: 12px;
            top: 50%;
            width: 7px;
            height: 7px;
            border-right: 1.5px solid #64748b;
            border-bottom: 1.5px solid #64748b;
            transform: translateY(-65%) rotate(45deg);
            transition: transform 0.15s ease;
            pointer-events: none;
        }

        .table-column-settings[open] summary::after {
            transform: translateY(-35%) rotate(225deg);
        }

        .table-column-settings[open] summary {
            background: #eef4ff;
        }

        .table-column-settings__panel {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 12px;
            margin-top: 8px;
            padding: 10px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            background: #fff;
        }

        .table-column-settings__item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 13px;
            color: #333;
        }

        .table-column-settings__reset {
            border: 0;
            background: transparent;
            color: #3366cc;
            font: inherit;
            font-size: 13px;
            cursor: pointer;
            padding: 0;
        }

        .table-column-settings__reset:hover {
            text-decoration: underline;
        }

        .table-export-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            padding: 5px 10px;
            border: 1px solid #cfd7e6;
            border-radius: 999px;
            background: #f8fbff;
            color: #2255aa;
            font: inherit;
            font-size: 13px;
            line-height: 1.3;
            cursor: pointer;
            white-space: nowrap;
        }

        .table-export-button:hover {
            background: #eef4ff;
            border-color: #b9c7dc;
        }

        .table-output-totals {
            display: flex;
            flex: 1 1 100%;
            flex-wrap: wrap;
            align-items: baseline;
            gap: 6px 16px;
            margin-top: 2px;
            padding: 9px 12px;
            border: 1px solid #dbe4f0;
            border-radius: 8px;
            background: #f8fafc;
            color: #334155;
            font-size: 14px;
            line-height: 1.35;
        }

        .table-output-totals__lead,
        .table-output-totals__value {
            font-weight: 700;
        }

        .table-output-totals__item {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 4px;
            min-width: 0;
        }

        @media (max-width: 720px) {
            .table-output-totals {
                display: grid;
                gap: 5px;
            }
        }

        @media (max-width: 1100px) {
            .table-scroll.table-scroll--mobile-cards {
                border: 0;
                background: transparent;
                overflow-x: visible;
            }

            .table-scroll.table-scroll--mobile-cards > .table-column-settings {
                display: none;
            }

            .table-scroll.table-scroll--mobile-cards table {
                display: block;
                width: 100% !important;
                min-width: 0 !important;
                max-width: 100% !important;
                margin-top: 0;
                border-collapse: separate;
                border-spacing: 0;
                table-layout: auto;
            }

            .table-scroll.table-scroll--mobile-cards table colgroup,
            .table-scroll.table-scroll--mobile-cards table thead {
                display: none;
            }

            .table-scroll.table-scroll--mobile-cards table tbody {
                display: grid;
                gap: 10px;
            }

            .table-scroll.table-scroll--mobile-cards table tbody tr {
                display: grid;
                grid-template-columns: 1fr;
                gap: 8px 12px;
                width: 100%;
                padding: 12px;
                border: 1px solid var(--block-border-soft);
                border-radius: 8px;
                background: #fff;
                box-shadow: none;
            }

            .table-scroll.table-scroll--mobile-cards table th,
            .table-scroll.table-scroll--mobile-cards table td {
                display: block;
                width: 100%;
                min-width: 0 !important;
                max-width: 100% !important;
                padding: 0;
                border: 0;
                white-space: normal !important;
                overflow-wrap: anywhere;
                word-break: normal;
            }

            .table-scroll.table-scroll--mobile-cards table td::before {
                content: attr(data-label);
                display: block;
                margin-bottom: 2px;
                color: var(--text-muted);
                font-size: 12px;
                font-weight: 700;
                line-height: 1.25;
            }

            .table-scroll.table-scroll--mobile-cards table td[data-label=""]::before {
                display: none;
            }
        }

        @media (max-width: 768px) {
            header h1 {
                font-size: 18px;
            }

            .card {
                border-radius: 5px;
            }

            nav {
                gap: 8px;
                margin-bottom: 16px;
            }

            .nav-main {
                gap: 6px 10px;
            }

            nav a,
            details.nav-dropdown summary {
                font-size: 13px;
            }

            .nav-dropdown-menu {
                position: fixed;
                top: auto;
                left: var(--page-gutter);
                right: var(--page-gutter);
                width: auto;
                max-width: none;
                max-height: min(70vh, 520px);
                overflow-y: auto;
            }

            .card > form:has(> .form-row),
            .report-filter-grid,
            .filters,
            .form-grid,
            form[style*="grid-template-columns"] {
                grid-template-columns: 1fr !important;
            }

            .report-filter-actions {
                padding-top: 0;
            }

            .period-filter-group {
                grid-template-columns: 1fr;
                min-width: 0;
            }

            .card > form:has(> .form-row) > .period-filter-group,
            .report-filter-grid > .period-filter-group,
            .filters > .period-filter-group,
            .form-grid > .period-filter-group,
            form[style*="grid-template-columns"] > .period-filter-group {
                grid-column: 1 / -1;
            }

            table {
                font-size: 13px;
                margin-top: 10px;
            }

            .table-scroll {
                margin-top: 12px;
            }

            .table-scroll.table-scroll--wide:not(.table-scroll--mobile-cards) table {
                width: max-content;
                min-width: max(100%, 720px);
            }

            .table-scroll th,
            .table-scroll td {
                min-width: 104px;
                max-width: 280px;
            }

            .table-scroll table a:not(.btn):not(nav a):not(.global-search__item):not(.searchable-select__option-link):not(.searchable-select__create),
            .table-scroll table .smart-cell-long,
            .table-scroll table td:not(.smart-cell-short):not(.smart-cell-date):not(.smart-cell-money):not(.smart-cell-status) {
                overflow-wrap: anywhere;
                word-break: normal;
            }

            .work-orders-table {
                min-width: 980px !important;
            }

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

            .detail-grid__item {
                grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
            }

            .recommendation-offer-row {
                grid-template-columns: 1fr;
            }

            th,
            td {
                padding: 6px;
                max-width: none;
            }

            input:not([type="checkbox"]):not([type="radio"]),
            select,
            textarea,
            .searchable-select,
            .searchable-select__button {
                max-width: 100%;
            }

            .searchable-select {
                width: 100%;
            }

            .searchable-select__dropdown {
                width: min(100%, calc(100vw - (var(--page-gutter) * 2)));
                min-width: 0;
            }

            .table-column-settings__panel {
                display: grid;
                grid-template-columns: 1fr;
            }
        }

        @media (min-width: 560px) and (max-width: 1024px) and (pointer: coarse) {
            .table-scroll.table-scroll--mobile-cards table tbody tr {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .table-scroll.table-scroll--mobile-cards table td[data-mobile-wide="1"],
            .table-scroll.table-scroll--mobile-cards table td[data-mobile-kind="long"],
            .table-scroll.table-scroll--mobile-cards table td[data-mobile-kind="action"] {
                grid-column: 1 / -1;
            }
        }

        @media (max-width: 480px) {
            .collapsible-section > summary {
                align-items: flex-start;
                font-size: 17px;
            }

            .collapsible-section__hint {
                display: block;
                margin-top: 2px;
            }

            .detail-grid__item {
                grid-template-columns: 1fr;
                gap: 4px;
            }

            .btn,
            button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop):not(.ru-date-picker-button):not(.ru-date-popup__nav):not(.ru-date-popup__day):not(.status-multiselect__remove),
            input[type="submit"],
            input[type="button"] {
                width: 100%;
                text-align: center;
            }

            .actions .badge {
                width: 100%;
            }

            table.compact-table th,
            table.compact-table td {
                min-width: 120px !important;
            }

            .table-scroll .btn,
            .table-scroll button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop),
            table .btn,
            table button:not(.searchable-select__button):not(.searchable-select__option):not(.table-column-settings__reset):not(.nav-dropdown-backdrop) {
                width: auto;
            }

            button.table-tree-toggle,
            .table-tree-toggle-placeholder {
                width: 30px !important;
                min-width: 30px !important;
                flex: 0 0 30px !important;
            }
        }
