/* #ADG: единый каркас реестров. Новые списки и административные таблицы должны
   собираться из этих слоёв, чтобы высота, фильтры и положение scrollbar не
   зависели от конкретной страницы. */
.office-register-page {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    min-width: 0;
}

.office-register {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.office-register-heading,
.office-register-toolbar {
    flex: 0 0 auto;
}

.office-register-toolbar {
    background: #fff;
    border-bottom: 1px solid var(--color-line);
}

.office-register-scroll {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.office-register-state {
    flex: 1 1 auto;
    margin: 0;
}

.office-table {
    border-collapse: collapse;
    width: 100%;
}

.office-table th,
.office-table td {
    border-bottom: 1px solid var(--color-line);
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.office-table th {
    background: #f4f6f3;
    color: #526052;
    font-size: .7rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.office-table tbody tr:hover {
    background: var(--color-brand-soft);
}

.feedback-queue-table {
    border-collapse: collapse;
    min-width: 920px;
    width: 100%;
}

.feedback-queue-table th,
.feedback-queue-table td {
    white-space: nowrap;
}

.feedback-queue-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.feedback-queue-table tbody tr {
    cursor: pointer;
}

/* Массовые действия в очереди обращений продолжают строку фильтров и
   используют тот же спокойный фиолетовый акцент, что и остальной интерфейс. */
.feedback-queue-page .office-filter-row {
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
}

.feedback-queue-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.feedback-queue-actions button {
    white-space: nowrap;
}

.feedback-queue-page .office-bulk-trigger {
    align-items: center;
    background: #f7f6fd;
    border: 1px solid #d8d3f1;
    border-radius: 6px;
    box-shadow: none;
    color: #3f3478;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 650;
    gap: 6px;
    height: 34px;
    padding: 0 10px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}

.feedback-queue-page .office-bulk-trigger:hover,
.feedback-queue-page .office-bulk-trigger:focus-visible,
.feedback-queue-page .office-bulk-trigger[aria-expanded="true"] {
    background: #efecfb;
    border-color: #aaa1db;
    color: #302274;
    outline: none;
}

.feedback-queue-page .office-bulk-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(91, 75, 181, .14);
}

.feedback-queue-page .office-bulk-trigger > .oi:first-child {
    color: #6659aa;
    font-size: .8rem;
}

.feedback-queue-page .office-command-count {
    background: #fff;
    border-color: #cbc5e9;
    color: #4e4190;
}

.feedback-queue-page .office-bulk-caret {
    color: #8178ad;
    font-size: .58rem;
    margin-left: 1px;
    transition: transform .15s ease;
}

.feedback-queue-page .office-bulk-trigger[aria-expanded="true"] .office-bulk-caret {
    transform: rotate(180deg);
}

.feedback-queue-page .office-bulk-popover {
    left: 0;
    right: auto;
}

.status-pill-muted {
    background: #f1f3f0;
    color: var(--color-muted);
}

@media (max-width: 760px) {
    .office-filter-row,
    .feedback-queue-page .office-filter-row {
        grid-template-columns: 1fr;
    }

    .feedback-queue-page .office-bulk-trigger {
        justify-content: center;
        width: 100%;
    }

    .feedback-queue-page .office-bulk-popover {
        min-width: 100%;
    }
}

/* #ADG Настройки статьи собраны в одну правую панель, чтобы экран чтения оставался компактным. */
/* #ADG: длинная статья под модальной панелью не должна создавать второй скролл.
   После закрытия :has перестаёт действовать без изменения позиции чтения. */
html:has(.article-settings-drawer),
body:has(.article-settings-drawer) {
    overflow: hidden;
}

.article-settings-drawer {
    width: min(980px, calc(100vw - 48px));
    min-height: 0;
    overflow: hidden;
}

.article-settings-drawer > .project-drawer-heading {
    flex-shrink: 0;
}

.article-settings-drawer .project-drawer-heading h2 {
    max-width: min(760px, calc(100vw - 150px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-settings-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    padding: 0 20px 28px;
}

.article-settings-drawer-body > section {
    border: 0;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 18px 0;
}

.article-settings-drawer-body > section + section {
    margin-top: 0;
    padding-top: 18px;
}

.article-settings-drawer-body .article-meta-strip {
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-settings-drawer-body .article-meta-strip > div,
.article-settings-drawer-body .article-feedback-stats > div {
    border: 0;
    border-right: 1px solid var(--color-line);
    border-radius: 0;
    padding: .6rem .8rem;
}

.article-settings-drawer-body .article-meta-strip > div:nth-child(4n),
.article-settings-drawer-body .article-meta-strip > div:last-child,
.article-settings-drawer-body .article-feedback-stats > div:last-of-type {
    border-right: 0;
}

.article-settings-drawer-body .article-feedback-stats {
    align-items: center;
    justify-content: flex-start;
}

.article-settings-drawer-body .article-feedback-stats .secondary-action {
    margin-left: auto;
}

.article-settings-drawer-body .article-quality-panel,
.article-settings-drawer-body .article-workflow-panel,
.article-settings-drawer-body .article-feedback-panel {
    align-items: flex-start;
}

.article-settings-drawer-body .related-article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-settings-drawer-body .version-workspace {
    grid-template-columns: 270px minmax(0, 1fr);
}

@media (max-width: 800px) {
    .article-settings-drawer {
        width: 100vw;
    }

    .article-settings-drawer-body .article-meta-strip,
    .article-settings-drawer-body .related-article-list,
    .article-settings-drawer-body .version-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-settings-drawer-body .article-meta-strip > div,
    .article-settings-drawer-body .article-feedback-stats > div {
        border-bottom: 1px solid var(--color-line);
        border-right: 0;
    }

    .article-settings-drawer-body .article-meta-strip > div:last-child,
    .article-settings-drawer-body .article-feedback-stats > div:last-of-type {
        border-bottom: 0;
    }
}

.project-drawer-form {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
}

.project-drawer-form textarea {
    min-height: 112px;
    resize: vertical;
}

.project-drawer-form .project-active-field {
    align-items: center;
    flex-direction: row;
    gap: .55rem;
    min-height: 34px;
}

.project-active-field input[type="checkbox"] {
    accent-color: var(--color-brand);
    height: 18px;
    margin: 0;
    width: 18px;
}

.project-active-field span {
    font-size: .86rem;
}

.project-drawer-form .primary-action {
    justify-self: start;
}

.project-save-action {
    position: relative;
    justify-self: start;
}

.project-save-error {
    position: absolute;
    z-index: 2;
    bottom: calc(100% + 9px);
    left: 0;
    width: max-content;
    max-width: min(360px, calc(100vw - 76px));
    margin: 0;
    padding: .55rem .7rem;
    border: 1px solid #dc7b70;
    border-radius: 4px;
    background: #fff8f7;
    color: #8b241c;
    font-size: .8rem;
    line-height: 1.35;
    box-shadow: 0 5px 14px rgba(74, 37, 32, .14);
}

.project-save-error::after {
    position: absolute;
    bottom: -5px;
    left: 15px;
    width: 8px;
    height: 8px;
    border-right: 1px solid #dc7b70;
    border-bottom: 1px solid #dc7b70;
    background: #fff8f7;
    content: "";
    transform: rotate(45deg);
}

.project-member-list {
    border: 1px solid var(--color-line);
}

.project-member-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 7px 8px 7px 11px;
    border-bottom: 1px solid var(--color-line);
}

.project-member-list > div:last-child {
    border-bottom: 0;
}

.project-member-list span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.project-member-list small {
    color: var(--color-muted);
    font-size: .74rem;
}

.project-member-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
}

/* #ADG: в узкой панели проекта основной выбор занимает всю строку, а роль и
   команда остаются отдельной компактной группой без обрезания подписей. */
.project-member-add select {
    box-sizing: border-box;
    min-height: var(--office-control-height);
    min-width: 0;
    padding-left: 10px;
    width: 100%;
}

.project-member-add-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-width: 0;
}

.project-member-add-actions .secondary-button {
    min-width: 88px;
}

.icon-button-danger {
    color: #a13d3d;
}

/* #ADG Кнопка исключения участника остаётся заметной, но не выглядит как
   тяжёлая системная кнопка и не перетягивает внимание с содержимого строки. */
.project-member-list .project-member-remove {
    align-self: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #8d879d;
    flex: 0 0 30px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 21px;
    font-weight: 300;
    height: 30px;
    line-height: 1;
    min-height: 30px;
    padding: 0 0 2px;
    width: 30px;
}

.project-member-list .project-member-remove:hover:not(:disabled),
.project-member-list .project-member-remove:focus-visible {
    background: #fff0f2;
    border-color: #f0c8ce;
    color: #a3313d;
}

.project-member-list .project-member-remove:focus-visible {
    box-shadow: 0 0 0 2px rgba(163, 49, 61, .14);
    outline: none;
}

.project-danger-zone {
    color: #733636;
}

.project-danger-zone p {
    margin: 0 0 10px;
    color: #7a6666;
    font-size: .79rem;
    line-height: 1.4;
}

.danger-button {
    min-height: 31px;
    padding: 0 11px;
    border: 1px solid #bd5c5c;
    border-radius: 4px;
    background: #fff;
    color: #9c3333;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
}

.danger-button:hover:not(:disabled) {
    background: #fff1f1;
}

.project-delete-confirmation {
    display: grid;
    gap: 7px;
    padding: 11px;
    border: 1px solid #efc8c8;
    background: #fff8f8;
    font-size: .8rem;
}

.project-delete-confirmation > span {
    color: #7a6666;
}

.project-delete-confirmation > div {
    display: flex;
    gap: 7px;
    margin-top: 2px;
}

.service-desk-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 270px);
    align-items: stretch;
    min-height: calc(100vh - 8.25rem);
    border: 1px solid var(--color-line);
    background: var(--color-surface);
    box-shadow: var(--shadow-panel);
}

.service-desk-projects,
.service-desk-list,
.service-desk-inspector {
    min-width: 0;
}

.service-desk-projects {
    background: #fafcf9;
    border-right: 1px solid var(--color-line);
}

.service-desk-inspector {
    background: #fbfcfa;
    border-left: 1px solid var(--color-line);
    padding: 12px;
}

.service-desk-pane-head,
.service-desk-list-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--color-line);
}

.service-desk-pane-head h1,
.service-desk-list-head h2,
.service-desk-inspector-card h2 {
    margin: 2px 0 0;
    color: var(--color-ink);
    font-size: 1.06rem;
    font-weight: 700;
}

.service-desk-eyebrow {
    display: block;
    color: var(--color-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.service-desk-toolbar {
    display: flex;
    gap: 7px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-line);
}

.service-desk-toolbar .primary-action,
.service-desk-toolbar .secondary-button {
    flex: 1 1 0;
    justify-content: center;
    white-space: nowrap;
}

.service-desk-tree {
    padding: 6px 0 10px;
}

.service-desk-tree-row {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding-left: calc(8px + var(--tree-depth) * 14px);
}

.service-desk-tree-row:hover,
.service-desk-tree-row.is-selected {
    background: #f1f3ff;
}

.service-desk-tree-row.is-selected {
    box-shadow: inset 3px 0 0 var(--color-brand-bright);
}

.tree-expander,
.tree-spacer {
    display: inline-grid;
    width: 24px;
    height: 28px;
    place-items: center;
    color: var(--color-brand-dark);
}

.tree-expander {
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
}

.tree-expander:hover {
    background: rgba(30, 7, 170, .11);
}

.tree-select-button {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: 7px;
    height: 34px;
    padding: 0 10px 0 0;
    border: 0;
    background: transparent;
    color: #243022;
    font: inherit;
    font-size: .82rem;
    text-align: left;
}

.tree-select-button .oi {
    flex: 0 0 auto;
    color: var(--color-brand);
    font-size: .9rem;
}

.tree-project-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-select-button small {
    margin-left: auto;
    color: #778273;
    font-size: .7rem;
}

.service-desk-list-head {
    align-items: flex-start;
}

.service-desk-list-head p {
    max-width: 620px;
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: .83rem;
    line-height: 1.4;
}

.service-desk-list-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding-top: 4px;
}

.service-desk-project-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--color-line);
    background: #fbfcfa;
}

.project-navigation-select {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid #d7e2d3;
    background: #fff;
}

.project-navigation-select .oi {
    color: var(--color-brand);
    font-size: .86rem;
}

.project-navigation-select select {
    width: 100%;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: .82rem;
}

.project-navigation-select select:focus {
    outline: 0;
}

.project-navigation-hint {
    flex: 1 1 auto;
    color: #758171;
    font-size: .76rem;
}

.service-desk-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-line);
    background: #fcfdfb;
}

.service-desk-filter-row select {
    min-width: 145px;
    height: 32px;
    font-size: .8rem;
    /* #ADG: Текст фильтра не должен прилипать к левой границе нативного select. */
    padding-left: 10px;
    padding-right: 30px;
}

.service-desk-filter-row select option {
    padding: 5px 10px;
}

.service-desk-search {
    display: flex;
    flex: 1 1 260px;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid #d9e3d5;
    background: #fff;
}

.service-desk-search:focus-within {
    border-color: var(--color-brand-bright);
    box-shadow: var(--focus-ring);
}

.service-desk-search .oi {
    color: var(--color-brand);
    font-size: .82rem;
}

.service-desk-search input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0;
    border: 0;
    box-shadow: none;
    font-size: .82rem;
}

.service-desk-search input:focus {
    outline: 0;
}

.service-desk-table-head,
.service-desk-table-filter-row,
.service-desk-ticket-row {
    display: grid;
    grid-template-columns: 94px minmax(240px, 1.9fr) minmax(130px, .8fr) minmax(140px, .9fr) 145px;
}

.service-desk-project-row {
    cursor: pointer;
}

.service-desk-project-table-head > span:first-child,
.service-desk-project-row > span:first-child {
    align-items: center;
    display: flex;
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
}

.project-selection-header input,
.service-desk-project-row > span:first-child input {
    accent-color: var(--color-brand);
    height: 15px;
    margin: 0;
    width: 15px;
}

.service-desk-project-row.project-row-selected {
    background: #eef6ec;
}

.service-desk-project-name {
    gap: .2rem;
}

.project-table-expander,
.project-table-expander-spacer {
    align-items: center;
    display: inline-flex;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

/* #ADG: декоративная рамка не нужна, но квадратная зона клика остаётся прежней:
   нажатие рядом с треугольником должно раскрывать ветку, а не открывать проект. */
.project-table-expander {
    position: relative;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0;
}

.project-table-chevron {
    position: relative;
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    display: block;
    height: .42rem;
    transform: rotate(-45deg);
    transition: transform .16s ease;
    width: .42rem;
    pointer-events: none;
}

.project-table-chevron.is-expanded {
    transform: rotate(45deg);
}

.project-table-expander:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.project-table-expander:hover,
.project-table-expander:focus-visible {
    background: transparent;
    color: var(--color-brand-dark);
    box-shadow: none;
    transform: none;
}

.project-table-name-link {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: .2rem;
    min-width: 0;
    text-decoration: none;
}

.project-table-name-link:hover,
.project-table-name-link:focus-visible {
    color: var(--color-brand-dark);
    text-decoration: underline;
}

.service-desk-project-table-head {
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 500;
}

.service-desk-project-row {
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 400;
}

.service-desk-project-name strong {
    font-weight: 500;
}

.service-desk-project-row.project-parent-row .service-desk-project-name strong {
    font-weight: 700;
}

.service-desk-project-row.project-leaf-row .service-desk-project-name strong {
    font-weight: 400;
}

.workspace-tree-heading {
    font-weight: 600;
}

.workspace-tree-root,
.workspace-tree-row > a {
    font-weight: 400;
}

/* #ADG: основные проекты и узлы с подпроектами выделяем как в Planfix, не перегружая конечные пункты дерева. */
.workspace-tree-row.workspace-tree-parent-item > a {
    color: var(--color-brand-dark);
    font-weight: 600;
}

.workspace-tree-row.workspace-tree-root-item > a {
    color: var(--color-brand-dark);
    font-weight: 700;
}

.workspace-tree-row.workspace-tree-parent-item > .workspace-tree-expander {
    color: var(--color-brand-dark);
}

@keyframes project-tree-slide-left {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes project-tree-slide-in {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: translateX(0); }
}

.tree-workspace > .workspace-tree {
    animation: project-tree-slide-in .28s ease-out both;
}

.tree-workspace > :not(.workspace-tree):not(.workspace-tree-resizer) {
    animation: project-tree-slide-left .32s ease-out both;
}

/* #ADG: Карточка заявки содержит полноэкранные drawer-панели. Общая анимация
   рабочей области оставляла после завершения transform и превращала карточку
   в систему координат для position:fixed, из-за чего backdrop обрезался. */
.tree-workspace.ticket-detail-workspace > .ticket-detail-main.workspace-main-scroll {
    animation: none;
    transform: none;
}

/* Основную навигацию переносим в верхнюю полосу, чтобы рабочая область была шире. */
@media (min-width: 641px) {
    .page > .sidebar {
        display: none !important;
    }

    .top-row-start {
        flex: 1 1 auto;
        min-width: 0;
    }

    .top-row-start > .sidebar-toggle-button,
    .top-row-start > .sidebar-top-toggle,
    .top-row-start > .top-row-title {
        display: none !important;
    }

    .top-row-start > .top-nav-brand {
        display: none !important;
    }

    .top-row-start > .top-nav-scrollable {
        align-self: center;
        display: block !important;
        flex: 1 1 auto;
        height: auto !important;
        max-height: 2.8rem;
        min-width: 0;
        min-height: 0 !important;
        overflow: hidden !important;
        padding: 0;
        position: static !important;
        width: auto;
    }

    .top-row-start > .top-nav-scrollable nav {
        height: auto !important;
        min-height: 0 !important;
    }

    .top-nav-scrollable nav {
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row !important;
        gap: .12rem;
        min-width: max-content;
    }

    .top-nav-scrollable .nav-section-title {
        display: none;
    }

    .top-nav-scrollable .nav-item,
    .top-nav-scrollable .nav-item.px-3 {
        margin: 0;
        padding: 0 !important;
    }

    .top-nav-scrollable .nav-link {
        align-items: center;
        border: 0;
        border-radius: 5px;
        font-size: .72rem;
        gap: .3rem;
        line-height: 1;
        min-height: 2.25rem;
        padding: .42rem .48rem;
        white-space: nowrap;
    }

    .top-nav-scrollable .nav-link .oi {
        /* #ADG: иконка и подпись образуют одну строку без унаследованного вертикального смещения. */
        align-items: center;
        display: inline-flex;
        font-size: .82rem;
        height: 1rem;
        justify-content: center;
        line-height: 1;
        margin-right: 0;
        position: static;
        top: auto;
        vertical-align: middle;
        width: 1rem;
    }

    .top-nav-scrollable .nav-link-label {
        align-items: center;
        display: inline-flex;
        line-height: 1rem;
    }

    .top-nav-scrollable .nav-mail-unread-badge {
        align-items: center;
        background: #c62828;
        border: 1px solid #fff;
        border-radius: 999px;
        box-sizing: border-box;
        color: #fff;
        display: inline-flex;
        font-family: Arial, sans-serif;
        font-feature-settings: "tnum" 1;
        font-size: .6rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        height: 1.1rem;
        justify-content: center;
        line-height: 1;
        min-width: 1.1rem;
        padding: .04rem .2rem 0;
        text-align: center;
    }

    .top-nav-scrollable .nav-link.active {
        border: 0;
    }
}

/* #ADG: на промежуточных и нестандартных разрешениях верхняя навигация
   сохраняет все разделы, но освобождает место для поиска и профиля. */
/* #ADG: полный набор подписей вместе с поиском, компанией и профилем не помещается
   в шапку обычного desktop-окна. Переключаемся на компактные иконки заранее,
   чтобы крайние разделы меню не обрезались скрытым overflow. */
@media (min-width: 641px) and (max-width: 1900px) {
    .page > main > .top-row {
        gap: .45rem;
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .top-row-start {
        gap: .4rem;
    }

    .top-row-start > .top-nav-scrollable {
        flex: 0 0 auto;
        overflow: visible !important;
    }

    .top-nav-scrollable nav {
        gap: .18rem;
        min-width: 0;
    }

    .top-nav-scrollable .nav-link {
        justify-content: center;
        padding: 0;
        position: relative;
        width: 36px;
    }

    .top-nav-scrollable .nav-link-label {
        /* #ADG: подпись остаётся доступной скринридеру через aria-label и показывается в подсказке. */
        display: none;
    }

    .top-nav-scrollable .nav-mail-unread-badge {
        /* #ADG: в компактном меню бейдж размещается поверх иконки и не увеличивает ширину кнопки. */
        height: 1rem;
        min-width: 1rem;
        padding: .04rem .16rem 0;
        position: absolute;
        right: 1px;
        top: 1px;
    }

    .top-nav-scrollable .nav-link .oi {
        font-size: .95rem;
    }

    .top-nav-scrollable .nav-link[data-tooltip]::after {
        background: #263128;
        border-radius: 4px;
        color: #fff;
        content: attr(data-tooltip);
        font-size: .7rem;
        font-weight: 600;
        left: 50%;
        opacity: 0;
        padding: .34rem .48rem;
        pointer-events: none;
        position: absolute;
        top: calc(100% + 7px);
        transform: translate(-50%, -3px);
        transition: opacity .12s ease, transform .12s ease;
        visibility: hidden;
        white-space: nowrap;
        z-index: 1200;
    }

    .top-nav-scrollable .nav-link[data-tooltip]:hover::after,
    .top-nav-scrollable .nav-link[data-tooltip]:focus-visible::after {
        opacity: 1;
        transform: translate(-50%, 0);
        visibility: visible;
    }

    .tenant-pill {
        display: none;
    }

    .global-search {
        flex-basis: 260px;
        max-width: 390px;
        min-width: 180px;
    }
}

@media (min-width: 641px) and (max-width: 1100px) {
    .global-search {
        display: none;
    }

    .user-menu-trigger-text {
        display: none;
    }

    .user-menu-trigger {
        height: 36px;
        justify-content: center;
        padding: .25rem .38rem;
    }
}

.notification-channel-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 1rem;
    border-top: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
}

.notification-center-page input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--color-brand);
}

.notification-channel-card {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: .85rem;
    align-items: flex-start;
    padding: .85rem 0;
    border-bottom: 1px solid var(--color-line);
}

.notification-channel-card:last-child {
    border-bottom: 0;
}

.notification-channel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex: 0 0 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    line-height: 1;
    text-align: center;
    border-radius: 50%;
    background: var(--color-brand);
    color: white;
    font-weight: 700;
}

.notification-channel-icon > .oi { top: 0; line-height: 1; }

.notification-channel-content {
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(14rem, 1fr) auto;
    align-items: center;
    gap: .4rem;
    width: 100%;
    font-size: 14px;
}

.notification-channel-title { align-items: center; display: inline-flex; gap: .4rem; grid-column: 1; grid-row: 1; min-width: 0; }
.notification-channel-content strong { font-size: 14px; }
.notification-channel-help { align-items: center; background: transparent; border: 1px solid var(--color-line); border-radius: 50%; color: var(--color-muted); display: inline-flex; flex: 0 0 18px; height: 18px; justify-content: center; padding: 0; position: relative; width: 18px; }
.notification-channel-help .oi { font-size: 9px; top: 0; }
.notification-channel-help:hover, .notification-channel-help:focus-visible { background: var(--color-brand-soft); border-color: var(--color-brand); color: var(--color-primary); outline: none; }
.notification-channel-help::after { background: #1d2a1f; border-radius: 5px; bottom: calc(100% + 8px); color: #fff; content: attr(data-tooltip); font-size: 12px; font-weight: 500; left: 50%; line-height: 1.35; max-width: min(280px, 70vw); opacity: 0; padding: .5rem .65rem; pointer-events: none; position: absolute; transform: translate(-50%, 4px); transition: opacity .12s ease, transform .12s ease; visibility: hidden; white-space: normal; width: max-content; z-index: 20; }
.notification-channel-help:hover::after, .notification-channel-help:focus-visible::after { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.notification-channel-content input:not([type="checkbox"]) { width: 100%; }
.notification-channel-content input:not([type="checkbox"]) { grid-column: 2; grid-row: 1; }
.notification-channel-content .project-active-field { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap; }
.notification-channel-content .project-active-field,
.notification-channel-content .project-active-field span { font-size: 14px; }
.notification-channel-content small { grid-column: 2 / -1; grid-row: 2; color: var(--color-muted); font-size: 12px; }
.notification-quiet-hours { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-bottom: 1rem; }
.notification-center-page .panel-heading h2 { font-size: 15px; line-height: 1.3; }
.notification-center-page .panel-heading > span { font-size: 12px; line-height: 1.3; }
.notification-quiet-hours > .panel-heading { align-items: center; }
.notification-quiet-hours > .panel-heading { grid-column: 1 / -1; }
.notification-quiet-hours > .project-active-field { display: inline-flex; align-items: center; align-self: center; gap: .6rem; height: 34px; margin: .9rem 1rem .9rem 0; }
.notification-time-row { display: inline-flex; align-items: center; align-self: center; justify-self: end; gap: .75rem; height: 34px; white-space: nowrap; }
.notification-time-row label { display: inline-flex; align-items: center; gap: .35rem; height: 34px; }
.notification-quiet-hours .project-active-field span,
.notification-time-row label { font-size: 14px; }
.notification-time-row input { width: 7rem; }
.notification-all-tickets-field { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: .6rem; margin: 0 1rem 1rem 0; }
.notification-all-tickets-field span { font-size: 14px; }
.notification-project-add { display: flex; gap: .75rem; margin-bottom: 1rem; }
.notification-project-add select { min-width: 20rem; }
.notification-project-group { margin-top: 1rem; }
.notification-project-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.notification-project-group h3 { margin: 0; }
.notification-project-heading .link-button { color: var(--color-muted); font-size: .85rem; }
.notification-matrix { overflow-x: auto; }
.notification-matrix-head, .notification-matrix-row {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) repeat(4, 6rem);
    align-items: center;
    gap: .5rem;
    min-width: 650px;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-line);
}
.notification-matrix-head { color: var(--color-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.notification-matrix-head > span:not(:first-child) { text-align: center; }
.notification-matrix-row > span { display: grid; gap: .2rem; font-size: 14px; }
.notification-matrix-row small { color: var(--color-muted); font-size: 12px; }
.notification-matrix-row input { justify-self: center; margin: 0; width: 16px; height: 16px; accent-color: var(--color-brand); }
.notification-save-bar { display: flex; justify-content: flex-end; padding: 1rem 0 2rem; }

@media (max-width: 800px) {
    .notification-channel-content { grid-template-columns: 1fr; }
    .notification-channel-title,
    .notification-channel-content input:not([type="checkbox"]),
    .notification-channel-content .project-active-field,
    .notification-channel-content small { grid-column: 1; grid-row: auto; }
    .notification-project-add { flex-direction: column; }
    .notification-project-add select { min-width: 0; }
    .notification-quiet-hours { grid-template-columns: 1fr; }
    .notification-time-row { justify-self: start; margin: 0 1rem 1rem; }
}

.service-desk-table {
    max-width: 100%;
    /* #ADG Таблица заявок растёт вместе со страницей: вертикальная прокрутка должна быть общей для всей задачи. */
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    /* #ADG: оставляем визуальный зазор между заявками и горизонтальной полосой прокрутки. */
    padding-bottom: .5rem;
}

.service-desk-table > .service-desk-table-head,
.service-desk-table > .service-desk-ticket-row {
    grid-template-columns: var(--ticket-grid-columns);
}

.service-desk-table-head,
.service-desk-table-filter-row,
.service-desk-ticket-row {
    width: 100%;
    min-width: 100%;
}

.service-desk-table-head {
    position: sticky;
    z-index: 4;
    top: 0;
    border-bottom: 1px solid var(--color-line);
    background: #f4f6f2;
    color: #68708a;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.service-desk-table-head button,
.service-desk-ticket-row > * {
    padding: 10px 12px;
    border-right: 1px solid #e7ece4;
}

.service-desk-table-head button {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
}

.service-desk-table-head button:hover,
.service-desk-table-head button:focus-visible {
    background: #eaf2e6;
    color: var(--color-brand-dark);
    box-shadow: none;
    transform: none;
}

.service-desk-table-head-cell {
    position: relative;
    min-width: 0;
    border-right: 1px solid #e7ece4;
    cursor: grab;
}

.service-desk-table-head-cell.is-dragging {
    cursor: grabbing;
    opacity: .65;
}

.ticket-column-resizer {
    position: absolute;
    z-index: 5;
    top: 0;
    right: -4px;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    touch-action: none;
}

.ticket-column-resizer:hover,
.service-desk-table.is-resizing-columns .ticket-column-resizer {
    background: var(--color-brand-bright);
}

body.is-resizing-table-columns {
    cursor: col-resize;
    user-select: none;
}

.service-desk-table-head-cell > button {
    width: 100%;
}

/* #ADG Заголовок и значения статуса образуют одну визуальную колонку и выравниваются по центру. */
.service-desk-table-head-cell.ticket-column-status > button,
.service-desk-ticket-row .ticket-status {
    justify-content: center;
    text-align: center;
}
.ticket-inline-display {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: inherit;
    display: block;
    font: inherit;
    height: 30px;
    overflow: hidden;
    padding: 4px 7px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.ticket-inline-display:hover,
.ticket-inline-display:focus-visible { background:#f5f3fc; border-color:#d8d3ef; outline:none; }
.ticket-inline-display.ticket-status { display:block; }
.ticket-inline-text,
.ticket-inline-date {
    background:#fff;
    border:1px solid #9f96cf;
    border-radius:5px;
    box-shadow:0 0 0 2px rgba(88,70,170,.1);
    box-sizing:border-box;
    color:inherit;
    font:inherit;
    height:30px;
    min-width:0;
    padding:4px 7px;
    width:100%;
}
.ticket-inline-choice { position:relative; width:100%; z-index:75; }
.ticket-inline-choice-search {
    background:#fff;
    border:1px solid #9f96cf;
    border-radius:5px;
    box-shadow:0 0 0 2px rgba(88,70,170,.1);
    box-sizing:border-box;
    font:inherit;
    height:30px;
    padding:4px 8px;
    width:100%;
}
.ticket-inline-choice-options {
    background:#fff;
    border:1px solid #d7d2eb;
    border-radius:7px;
    box-shadow:0 10px 24px rgba(38,25,92,.16);
    left:0;
    max-height:240px;
    min-width:max(100%,220px);
    overflow-y:auto;
    padding:5px;
    position:absolute;
    top:34px;
}
.ticket-inline-choice-options button {
    background:transparent;
    border:0;
    border-radius:5px;
    color:#302b43;
    display:block;
    font:inherit;
    min-height:30px;
    padding:6px 8px;
    text-align:left;
    width:100%;
}
.ticket-inline-choice-options button:hover,
.ticket-inline-choice-options button:focus-visible { background:#f1effa; color:#33228d; outline:none; }
.ticket-inline-choice-options button.selected { background:#e9e5fa; color:#2d1d82; font-weight:600; }
.ticket-inline-choice-empty { color:var(--color-muted); display:block; padding:8px; }
.ticket-inline-status { font-weight:700; }

.ticket-column-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 4px;
    min-width: 220px;
    padding: 8px;
    border: 1px solid #cfdacb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 10px 22px rgb(31 50 28 / 16%);
}

.ticket-column-menu-actions {
    display: grid;
    gap: 2px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e4ebe1;
}

.ticket-column-menu .ticket-column-menu-actions button {
    width: 100%;
    padding: 6px 8px;
    color: #45513f;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.ticket-column-menu input,
.ticket-column-menu select {
    box-sizing: border-box;
    width: 100%;
    min-height: 31px;
    padding: 5px 7px;
    border: 1px solid #d8e2d4;
    border-radius: 3px;
    background: #fff;
    color: var(--color-ink);
    font-size: .76rem;
}

.ticket-column-menu .table-filter-dates {
    display: grid;
    grid-template-columns: 1fr;
}

.service-desk-table-filter-row {
    min-height: 48px;
    padding: 6px 0;
    border-bottom: 1px solid #e3e9e0;
    background: #fbfcfa;
}

.service-desk-table-filter-row > * {
    min-width: 0;
    margin: 0 6px;
}

.service-desk-table-filter-row input,
.service-desk-table-filter-row select {
    width: calc(100% - 12px);
    min-width: 0;
    height: 29px;
    padding: 4px 7px;
    border: 1px solid #d8e2d4;
    border-radius: 3px;
    background: #fff;
    color: var(--color-ink);
    font-size: .74rem;
}

.table-filter-stack,
.table-filter-dates {
    display: flex;
    gap: 4px;
    min-width: 0;
}

.custom-fields-admin-head,
.custom-fields-admin-row { display:grid; grid-template-columns:minmax(180px,1.4fr) 120px 140px minmax(170px,1fr) 100px 100px; align-items:center; gap:12px; padding:11px 16px; }
.custom-fields-admin-head { background:#f6f8f4; border-bottom:1px solid #dce5d9; color:#68708a; font-size:12px; font-weight:700; text-transform:uppercase; }
.custom-fields-admin-row { border-bottom:1px solid #e5ece2; }
.custom-fields-admin-row:last-child { border-bottom:0; }
.custom-fields-admin-row small { display:block; margin-top:3px; color:#778478; font-size:12px; }
.custom-fields-admin-row > span:last-child { text-align:right; }
.custom-field-state-button { align-items: center; background: transparent; border: 0; color: #526150; display: grid; font-size: 12px; gap: 1px 6px; grid-template-columns: 8px auto; justify-content: start; line-height: 1.15; padding: 3px 0; text-align: left; }
.custom-field-state-button .custom-field-state-dot { background: #9aa69a; border-radius: 50%; grid-row: 1 / 3; height: 8px; width: 8px; }
.custom-field-state-button.active .custom-field-state-dot { background: var(--color-brand); }
.custom-field-state-button > span:nth-child(2) { font-weight: 700; }
.custom-field-state-button small { color: var(--color-muted); font-size: 10px; margin: 0; white-space: nowrap; }
.custom-field-state-button:hover:not(:disabled), .custom-field-state-button:focus-visible { color: var(--color-brand-dark); outline: none; }
.custom-field-state-button:hover:not(:disabled) small { text-decoration: underline; }
.ticket-analytics-admin-table .custom-fields-admin-head,
.ticket-analytics-admin-table .custom-fields-admin-row { grid-template-columns: minmax(240px, 1.5fr) minmax(90px, .45fr) minmax(150px, .75fr) 100px; }
.ticket-analytics-admin-table .custom-fields-admin-row > span:nth-child(2) { color: #5d6c5a; font-weight: 700; }
.custom-field-definition-form { display:grid; grid-template-columns:minmax(0, 1fr); gap:13px; }
.modal-panel .form-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:2px; }
.custom-field-roles { margin:0; padding:10px 12px; border:1px solid #dce5d9; border-radius:5px; display:flex; flex-wrap:wrap; gap:8px 14px; }
.custom-field-roles legend { padding:0 4px; color:#5d6c5a; font-size:12px; font-weight:700; }
.custom-field-roles label { display:inline-flex; width:auto; align-items:center; gap:5px; margin:0; font-size:13px; font-weight:500; }
.custom-field-options { display:grid; grid-column:1 / -1; gap:0; border:1px solid #dfe8dc; border-radius:5px; overflow:hidden; }
.custom-field-option-row { display:grid; grid-template-columns:minmax(0, 1fr) 48px; align-items:center; min-height:38px; padding:0 10px; border-bottom:1px solid #edf2eb; color:#273128; font-size:13px; font-weight:600; }
.custom-field-option-row:last-child { border-bottom:0; }
.custom-field-option-row > input[type="checkbox"] { justify-self:center; }
.custom-field-active-option { background: var(--color-brand-soft); min-height: 50px; }
.custom-field-options .form-switch-copy small { color: var(--color-muted); display: block; font-size: 11px; font-weight: 400; margin-top: 2px; }
.custom-field-role-list input[type="checkbox"] { display:block; width:16px; height:16px; min-height:0; margin:0; padding:0; accent-color:#1e07aa; }
.custom-field-role-list { display:grid; grid-column:1 / -1; gap:0; border:1px solid #dce5d9; border-radius:5px; overflow:hidden; }
.custom-field-role-list-heading, .custom-field-role-list-row { display:grid; grid-template-columns:minmax(0, 1fr) 100px 110px; align-items:center; column-gap:8px; }
.custom-field-role-list-heading { min-height:34px; padding:0 11px; background:#f6f9f5; border-bottom:1px solid #dce5d9; color:#68708a; font-size:12px; }
.custom-field-role-list-row { min-height:42px; padding:0 11px; border-bottom:1px solid #edf2eb; color:#273128; font-size:13px; }
.custom-field-role-list-row:last-child { border-bottom:0; }
.custom-field-role-check { display:grid; place-items:center; min-height:40px; }
@media (max-width: 560px) { .custom-field-role-list-heading, .custom-field-role-list-row { grid-template-columns:minmax(0, 1fr) 82px 92px; padding-left:9px; padding-right:9px; } }
.service-desk-custom-fields { padding-top:18px; margin-top:18px; border-top:1px solid #dfe8dc; }
.service-desk-custom-fields h3 { margin:0 0 12px; font-size:14px; }
.service-desk-custom-field { display:grid; gap:6px; margin-bottom:12px; color:#4f5d4c; font-size:13px; font-weight:600; }
.service-desk-custom-field b { color:#bd3c2a; }
.service-desk-custom-field output { display:block; padding:8px 10px; border:1px solid #dfe8dc; border-radius:4px; background:#fafcf9; color:#263024; font-weight:400; white-space:pre-wrap; }
.service-desk-custom-field-readonly { display:grid; grid-template-columns:minmax(0, 1fr) 34px; gap:6px; align-items:stretch; }
.service-desk-custom-field-readonly output { min-width:0; overflow-wrap:anywhere; user-select:text; }
.service-desk-custom-field-copy { display:grid; place-items:center; width:34px; min-height:34px; padding:0; border:1px solid #d8d3ed; border-radius:5px; background:#f7f5fc; color:#594ba0; cursor:pointer; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.service-desk-custom-field-copy:hover:not(:disabled), .service-desk-custom-field-copy:focus-visible { background:#eeeafb; border-color:#aaa1d7; color:#392b83; outline:none; }
.service-desk-custom-field-copy:disabled { background:#fafafa; border-color:#e5e5e5; color:#aaa; cursor:default; }
.service-desk-custom-field input[type="checkbox"] { width:17px; height:17px; margin:2px 0; }
.searchable-choice-field { display:flex; align-items:center; gap:6px; width:100%; min-width:0; }
.searchable-choice-field-control { position:relative; flex:1 1 auto; min-width:0; }
.searchable-choice-field input { width:100%; }
.searchable-choice-field-create { flex:0 0 36px; align-self:stretch; min-height:36px; display:grid; place-items:center; margin:0; padding:0; border:1px solid #dfe3f0; border-radius:5px; background:#f1f3ff; color:#1e07aa; cursor:pointer; }
.searchable-choice-field-create:hover:not(:disabled), .searchable-choice-field-create:focus-visible { background:#d8ecd4; }
.searchable-choice-field-create:disabled { background:transparent; color:#9ba59a; cursor:default; }
.original-development-picker { min-width:0; position:relative; }
.original-development-picker.is-open { z-index:40; }
.original-development-picker > :is(input,label) { position:relative; z-index:2; }
.original-development-picker > .picker-dismiss { position:fixed; inset:0; width:100%; height:100%; opacity:0; border:0; z-index:1; cursor:default; }
.original-development-picker > .picker-results { position:absolute; top:100%; left:0; right:0; z-index:3; max-height:240px; overflow-y:auto; background:var(--color-surface,#fff); color:var(--color-ink,#111); border:1px solid var(--color-line,#ddd); border-radius:6px; box-shadow:0 6px 18px #0002; }
.original-development-picker > .picker-results > button { display:block; width:100%; padding:.5rem .65rem; border:0; background:transparent; color:inherit; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.original-development-picker > .picker-results > button:hover, .original-development-picker > .picker-results > button:focus-visible { background:#8064df22; }
.original-development-picker > label { display:block; margin-bottom:.35rem; }
.original-development-picker > input { width:100%; min-width:0; }
.original-development-picker > small { display:block; margin-top:.25rem; }
@media (max-width:900px) { .custom-fields-admin-head { display:none; } .custom-fields-admin-row { grid-template-columns:1fr; gap:5px; } .custom-fields-admin-row > span:last-child { text-align:left; } }

.table-filter-stack select,
.table-filter-dates input {
    width: 100%;
}

.service-desk-ticket-row {
    color: var(--ticket-status-color, inherit);
    text-decoration: none;
    border-bottom: 1px solid #e6ebe3;
    font-size: .8rem;
}

.service-desk-ticket-row:hover {
    background: #f7faf5;
}

.service-desk-ticket-row > * {
    display: flex;
    align-items: center;
    min-width: 0;
    color: inherit;
}

.service-desk-ticket-row > strong {
    color: inherit;
    font-size: .76rem;
}

.service-desk-ticket-title {
    display: flex !important;
    align-items: center;
    gap: .32rem;
    line-height: 1.35;
    padding-left: calc(12px + var(--ticket-indent, 0px)) !important;
    position: relative;
}

.service-desk-ticket-child::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(12px + var(--ticket-parent-indent, 0px));
    width: 12px;
    border-bottom: 1px solid #b9cbb4;
    border-left: 1px solid #b9cbb4;
    content: "";
}

.service-desk-ticket-title strong,
.service-desk-ticket-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-desk-ticket-title strong {
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    font-size: .83rem;
}

/* ADG: компактный переключатель показывает, что у заявки есть скрытые подзаявки. */
.ticket-tree-expander {
    align-self: center;
    appearance: none;
    box-sizing: border-box;
    display: inline-grid;
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    place-items: center;
    border: 1px solid #c9dbc5;
    border-radius: 3px;
    background: #f7fbf5;
    color: #28712e;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 0;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.ticket-tree-expander:hover {
    border-color: #8fbd87;
    background: #eaf5e7;
    color: #185d20;
}

.ticket-tree-expander:focus-visible {
    outline: 2px solid #4d9e55;
    outline-offset: 1px;
}

.ticket-tree-expander-spacer {
    visibility: hidden;
    pointer-events: none;
}

.service-desk-ticket-title small {
    margin-top: 3px;
    color: #778273;
    font-size: .72rem;
}

.service-desk-ticket-row time {
    color: inherit;
    font-size: .74rem;
}

/* #ADG В реестре статус читается через цвет всей строки, поэтому отдельная плашка не нужна. */
.service-desk-ticket-row .ticket-status {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
    font-size: .76rem;
    padding: 0;
}

/* #ADG: в режиме просмотра редактируемая кнопка является самой ячейкой таблицы.
   Она должна растягиваться вместе с обычными полями, иначе фиксированные 30px
   прижимают часть значений к верхней границе строки. */
.service-desk-ticket-row > .ticket-inline-display {
    align-items: center;
    align-self: stretch;
    box-sizing: border-box;
    display: flex;
    height: auto;
    min-height: 44px;
    padding: 10px 12px;
}

.service-desk-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 54px 20px;
    color: var(--color-muted);
    text-align: center;
}

.service-desk-empty .oi {
    color: var(--color-brand);
    font-size: 1.7rem;
}

.service-desk-empty strong {
    color: var(--color-ink);
}

.service-desk-inspector-card {
    padding: 13px 12px;
    border: 1px solid var(--color-line);
    background: #fff;
    box-shadow: none;
}

.service-desk-inspector-card + .service-desk-inspector-card {
    margin-top: 10px;
}

.service-desk-inspector-card p {
    margin: 9px 0 12px;
    color: var(--color-muted);
    font-size: .8rem;
    line-height: 1.45;
}

.service-desk-inspector-card h3 {
    margin: 0 0 9px;
    font-size: .88rem;
}

.service-desk-stats {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #e6ebe3;
    font-size: .77rem;
}

.service-desk-stats dt {
    color: #6e796a;
}

.service-desk-stats dd {
    margin: 0;
    color: #243123;
    font-weight: 700;
}

.service-desk-inspector-actions {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.service-desk-inspector-actions a {
    justify-content: center;
}

.service-desk-members {
    display: grid;
    gap: 5px;
}

.service-desk-members div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #edf0eb;
    font-size: .78rem;
}

.service-desk-members small,
.inspector-muted {
    color: #768171;
    font-size: .72rem;
}

/* #ADG: Универсальные представления используют один рабочий scrollbar и не наследуют размеры модальных форм. */
.saved-views-page{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;height:100%;min-height:0;padding:12px}.saved-views-sidebar,.saved-views-workspace{min-height:0;margin:0;overflow:hidden}.saved-views-sidebar{display:flex;flex-direction:column;padding:0}.saved-views-sidebar-head,.saved-view-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border-color,#dbe5d8)}.saved-views-sidebar-head h1,.saved-view-editor-head h2{margin:2px 0 0;font-size:18px}.saved-views-sidebar-head .eyebrow,.saved-view-editor-head .eyebrow{margin:0}.saved-view-list-group{padding:10px}.saved-view-list-group h3{margin:5px 8px 7px;color:#657261;font-size:11px;text-transform:uppercase}.saved-view-list-empty{margin:0 8px 12px;color:#8a9487;font-size:12px}.saved-view-list-item{width:100%;display:grid;grid-template-columns:20px minmax(0,1fr) 18px;align-items:center;gap:8px;padding:9px;border:0;border-left:3px solid transparent;background:transparent;text-align:left;border-radius:3px;color:inherit}.saved-view-list-item:hover{background:#f3f8f1}.saved-view-list-item.active{background:#eaf5e7;border-left-color:#25722b}.saved-view-list-item span:nth-child(2){display:flex;flex-direction:column;min-width:0}.saved-view-list-item strong,.saved-view-list-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-view-list-item small{color:#788374;font-size:11px;margin-top:2px}.saved-views-workspace{display:flex;flex-direction:column}.saved-view-head-actions{display:flex;gap:7px}.saved-view-editor-scroll{min-height:0;overflow:auto;padding:16px}.saved-view-general-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px}.saved-view-general-grid label,.saved-view-sort-row label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#596356}.saved-view-general-grid input,.saved-view-general-grid select,.saved-view-condition input,.saved-view-condition select,.saved-view-rule-group-head select,.saved-view-inline-select select,.saved-view-sort-row select{height:34px;border:1px solid #cfdbcc;border-radius:4px;background:#fff;padding:0 9px;min-width:0}.saved-view-rules,.saved-view-columns{margin-top:18px;border:1px solid #dbe5d8;border-radius:5px;padding:14px}.saved-view-section-head,.saved-view-rule-group-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.saved-view-section-head h3{font-size:14px;margin:0}.saved-view-section-head p{font-size:12px;color:#73806f;margin:3px 0 0}.saved-view-inline-select{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap}.saved-view-rule-group{margin-top:12px;padding:12px;background:#f8f9fd;border-left:3px solid #39823e}.saved-view-rule-group-head strong{font-size:13px}.saved-view-rule-group-head>div{display:flex;gap:6px}.saved-view-condition{display:grid;grid-template-columns:minmax(150px,1.2fr) minmax(135px,.8fr) minmax(170px,1fr) 30px;gap:7px;margin-top:8px;align-items:center}.saved-view-condition .icon-action{height:30px;width:30px}.saved-view-rule-group .link-action{margin-top:8px}.saved-view-column-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:8px;margin-top:12px}.saved-view-column-grid label{display:flex;align-items:center;gap:7px;font-size:12px}.saved-view-column-grid input{width:16px;height:16px;appearance:auto}.saved-view-sort-row{display:flex;align-items:flex-end;gap:20px;margin-top:14px}.saved-view-sort-row label:last-child{flex-direction:row;align-items:center;height:34px}.saved-view-sort-row input{appearance:auto;width:16px;height:16px}.saved-view-welcome{margin:auto;max-width:560px;text-align:center;padding:40px}.saved-view-welcome>.oi{font-size:34px;color:#26742c}.saved-view-welcome h2{font-size:20px}.saved-view-welcome p{color:#687565;line-height:1.5}.saved-view-result-table tbody tr{cursor:pointer}.saved-view-result-table tbody tr:hover{background:#f0f7ed}.saved-view-editor-head>div:first-child>p:last-child{margin:3px 0 0;color:#71806d;font-size:12px}
.saved-view-list-item strong{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;line-height:1.25}
@media(max-width:900px){.saved-views-page{grid-template-columns:1fr;height:auto}.saved-views-sidebar{max-height:280px}.saved-views-workspace{min-height:600px}.saved-view-general-grid{grid-template-columns:1fr 1fr}.saved-view-column-grid{grid-template-columns:1fr 1fr}.saved-view-condition{grid-template-columns:1fr 1fr 30px}.saved-view-condition>*:nth-child(3){grid-column:1/3}}
@media(max-width:560px){.saved-views-page{padding:6px}.saved-view-general-grid,.saved-view-column-grid{grid-template-columns:1fr}.saved-view-condition{grid-template-columns:1fr 30px}.saved-view-condition>*:not(:last-child){grid-column:1}.saved-view-condition>*:last-child{grid-column:2;grid-row:1}.saved-view-section-head,.saved-view-rule-group-head,.saved-view-editor-head{align-items:flex-start;flex-direction:column}.saved-view-head-actions{width:100%}.saved-view-head-actions button{flex:1}}

.activity-feed-shell{position:relative;display:flex;align-items:center}.activity-feed-trigger{position:relative;z-index:1080;width:36px;height:36px;border:1px solid var(--color-line);border-radius:7px;display:grid;place-items:center;background:#fff;color:var(--color-brand);font-size:16px}.activity-feed-trigger:hover,.activity-feed-trigger[aria-expanded="true"]{background:var(--color-brand-soft);border-color:var(--color-brand-line)}.activity-feed-badge{position:absolute;right:-5px;top:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;display:grid;place-items:center;background:#c7382f;color:#fff;border:2px solid #fff;font:700 10px/1 sans-serif}.activity-feed-backdrop{position:fixed;inset:0;z-index:1078;background:rgba(20,35,20,.12)}.activity-feed-panel{position:fixed;right:18px;top:62px;z-index:1079;width:min(390px,calc(100vw - 24px));max-height:min(620px,calc(100dvh - 76px));display:flex;flex-direction:column;background:#fff;border:1px solid #d6e1d3;border-radius:9px;box-shadow:0 18px 50px rgba(24,45,24,.25);overflow:hidden}.activity-feed-panel header{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;border-bottom:1px solid #e1e9df}.activity-feed-panel header small{display:block;color:#73806f;font-size:10px;text-transform:uppercase}.activity-feed-panel h2{margin:1px 0 0;font-size:17px}.activity-feed-panel header button{border:0;background:transparent;font-size:24px;color:#687565}.activity-feed-list{overflow:auto;overscroll-behavior:contain}.activity-feed-empty{margin:0;padding:28px 18px;text-align:center;color:#758172}.activity-feed-item{display:grid;grid-template-columns:8px minmax(0,1fr);gap:9px;padding:12px 14px;color:#263126;text-decoration:none;border-bottom:1px solid #edf1eb}.activity-feed-item:hover{background:#f5f9f3}.activity-feed-item strong,.activity-feed-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-feed-item strong{font-size:12px}.activity-feed-item small{margin-top:2px;color:#7a8577;font-size:10px}.activity-feed-item p{margin:5px 0 0;color:#4e5c4b;font-size:12px;line-height:1.35}.activity-feed-dot{width:6px;height:6px;margin-top:5px;border-radius:50%;background:#c9d2c6}.activity-feed-item.is-unread{background:#f2f8ef}.activity-feed-item.is-unread .activity-feed-dot{background:var(--color-brand)}@media(max-width:600px){.activity-feed-trigger{width:36px;height:36px}.activity-feed-panel{right:8px;top:56px;width:calc(100vw - 16px);max-height:calc(100dvh - 68px - env(safe-area-inset-bottom))}}
