.task-workspace {
    --tw-surface: #ffffff;
    --tw-ink: #1c2430;
    --tw-muted: #6b7280;
    --tw-line: #e6eaf0;
    --tw-soft: #f4f6f9;
    --tw-accent: #2563eb;
    --tw-accent-soft: #eff4ff;
    margin-bottom: 1rem;
}

.task-workspace__grid {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.task-workspace--tracker .task-workspace__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

@media (max-width: 992px) {
    .task-workspace__grid,
    .task-workspace--tracker .task-workspace__grid {
        grid-template-columns: 1fr;
    }
}

.task-workspace__main {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tw-description-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
.tw-description-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--tw-line, #e2e8f0);
}
.tw-description-card__title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}
.tw-description-card .tw-description {
    flex: 1 1 auto;
    max-height: none;
    overflow: visible;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1e293b;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    -webkit-user-select: text;
    user-select: text;
}
.tw-description--empty {
    display: flex;
    align-items: center;
    min-height: 120px;
}
.tw-description__placeholder {
    color: #94a3b8;
    font-style: italic;
}
.tw-description p { margin: 0 0 0.85em; }
.tw-description p:last-child { margin-bottom: 0; }
.tw-description h1, .tw-description h2, .tw-description h3, .tw-description h4 {
    margin: 1.1em 0 0.45em;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.tw-description h1 { font-size: 1.35rem; }
.tw-description h2 { font-size: 1.2rem; }
.tw-description h3 { font-size: 1.05rem; }
.tw-description ul, .tw-description ol {
    margin: 0 0 0.85em;
    padding-left: 1.35rem;
}
.tw-description li { margin: 0.2em 0; }
.tw-description a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.tw-description a:hover { color: #1d4ed8; }
.tw-description blockquote {
    margin: 0.75em 0;
    padding: 0.35em 0 0.35em 0.9em;
    border-left: 3px solid #cbd5e1;
    color: #64748b;
}
.tw-description code,
.tw-description .tw-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: #f1f5f9;
    color: #0f172a;
}
.tw-description pre,
.tw-description pre.ql-syntax {
    margin: 0.85em 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
}
.tw-description pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.tw-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5em 0;
}
.tw-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.85em 0;
    font-size: 0.9em;
}
.tw-description th, .tw-description td {
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.55rem;
    text-align: left;
}
.tw-description th { background: #f8fafc; font-weight: 650; }
/* Наследие Quill в описании */
.tw-description .ql-align-center { text-align: center; }
.tw-description .ql-align-right { text-align: right; }
.tw-description .ql-align-justify { text-align: justify; }
.tw-description .ql-indent-1 { padding-left: 1.5em; }
.tw-description .ql-indent-2 { padding-left: 3em; }
.tw-description .ql-size-small { font-size: 0.85em; }
.tw-description .ql-size-large { font-size: 1.2em; }
.tw-description .ql-size-huge { font-size: 1.45em; }
.tw-description .ql-font-monospace,
.tw-description .ql-font-serif { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Кастомный композер обсуждения (без Quill CDN) */
.tw-rte {
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tw-rte__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.55rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.tw-rte__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.4rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.tw-rte__btn:hover { background: #e2e8f0; color: #0f172a; }
.tw-rte__btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }
.tw-rte__u { text-decoration: underline; text-underline-offset: 2px; }
.tw-rte__s { text-decoration: line-through; }
.tw-rte__code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; font-weight: 700; }
.tw-rte__sep {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 0.25rem;
}
.tw-rte__hint {
    margin-left: auto;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
    padding-right: 0.2rem;
    white-space: nowrap;
}
.tw-rte__editor-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
}
.tw-rte__editor {
    min-height: 110px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.75rem 0.9rem 0.55rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #0f172a;
    outline: none;
}
.tw-rte__editor.is-empty::before,
.tw-rte__editor:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    float: left;
    height: 0;
}
.tw-rte__editor p { margin: 0 0 0.5em; }
.tw-rte__editor ul, .tw-rte__editor ol { margin: 0 0 0.5em; padding-left: 1.25rem; }
.tw-rte__editor pre {
    margin: 0.4em 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.84rem;
    white-space: pre-wrap;
}
.tw-rte__editor a { color: #2563eb; }
.tw-rte__resize {
    height: 12px;
    cursor: ns-resize;
    touch-action: none;
    flex-shrink: 0;
    background:
        linear-gradient(#cbd5e1, #cbd5e1) center 4px / 32px 2px no-repeat,
        linear-gradient(#cbd5e1, #cbd5e1) center 8px / 22px 2px no-repeat,
        #fafbfc;
    border-top: 1px solid #eef2f7;
}
.tw-rte__resize:hover,
.tw-rte__resize.is-dragging {
    background-color: #e2e8f0;
}
.tw-rte__footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-top: 1px solid #eef2f7;
    background: #fff;
}
.tw-rte__attach {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
    margin: 0;
}
.tw-rte__attach:hover { background: #fff; color: #0f172a; border-color: #cbd5e1; }
.tw-rte__attach svg { width: 16px; height: 16px; }
.tw-rte__attach input { display: none; }
.tw-rte__send {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    min-width: 110px;
    padding: 0.45rem 1.15rem;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.tw-rte__send:hover { background: #1d4ed8; }
.tw-rte__send:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }
.tw-composer__preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem 0;
}
@media (max-width: 640px) {
    .tw-rte__hint { display: none; }
}

.tw-card {
    background: var(--tw-surface);
    border: 1px solid var(--tw-line);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.tw-bottom {
    padding-top: 0.65rem;
}

.tw-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--tw-line);
    margin: 0 -1rem 0.85rem;
    padding: 0 1rem;
    overflow-x: auto;
}

.tw-tabs__btn {
    border: 0;
    background: transparent;
    color: var(--tw-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.tw-tabs__btn span {
    display: inline-block;
    margin-left: 0.25rem;
    font-weight: 500;
    color: #94a3b8;
}

.tw-tabs__btn.is-active {
    color: var(--tw-accent);
    border-bottom-color: var(--tw-accent);
}

.tw-tab-panel[hidden] { display: none !important; }

.tw-discussion--docked {
    display: flex;
    flex-direction: column;
    min-height: 360px;
}

.tw-discussion--docked .tw-feed {
    flex: 1 1 auto;
    max-height: min(52vh, 560px);
}

.tw-composer {
    margin-top: 0.75rem;
    border-top: 1px solid var(--tw-line);
    padding-top: 0.75rem;
}

.tw-composer__reply {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: #eff4ff;
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
}

.tw-composer__editor-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: visible;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tw-composer__editor-wrap .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid #eef2f7;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.tw-composer__editor-wrap .ql-container.ql-snow {
    border: 0;
    font-size: 0.92rem;
    flex: 1 1 auto;
    min-height: 96px;
    height: auto !important;
}

.tw-composer__editor-wrap .ql-editor {
    min-height: 96px;
    max-height: none !important;
    height: auto;
    overflow-y: auto;
    resize: none;
}

.tw-composer__editor-wrap .ql-editor.ql-blank::before {
    color: #94a3b8;
    font-style: normal;
}

.tw-composer__resize {
    height: 14px;
    cursor: ns-resize;
    touch-action: none;
    flex-shrink: 0;
    background:
        linear-gradient(#cbd5e1, #cbd5e1) center 5px / 36px 2px no-repeat,
        linear-gradient(#cbd5e1, #cbd5e1) center 9px / 24px 2px no-repeat,
        #f8fafc;
    border-top: 1px solid #eef2f7;
    border-radius: 0 0 12px 12px;
}
.tw-composer__resize:hover,
.tw-composer__resize.is-dragging {
    background-color: #e2e8f0;
}

.tw-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.tw-file-card {
    border: 1px solid #e8edf3;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.tw-file-card__preview {
    display: block;
    height: 120px;
    background: #f8fafc;
    overflow: hidden;
}
.tw-file-card__preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.tw-file-card__icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}
.tw-file-card__meta {
    padding: 0.55rem 0.65rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.tw-file-card__name {
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-file-card__size { font-size: 0.72rem; }

.tw-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.tw-sheet[hidden] { display: none !important; }
.tw-sheet__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.45);
}
.tw-sheet__panel {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(80vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    padding: 0 0 1rem;
}
.tw-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eef2f7;
}
.tw-sheet__close {
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}
.tw-link-modal__body { padding: 0.85rem 1rem 0; }
.tw-link-modal__results {
    margin-top: 0.55rem;
    max-height: 240px;
    overflow: auto;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #f8fafc;
}
.tw-link-result {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.55rem;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: transparent;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}
.tw-link-result:last-child { border-bottom: 0; }
.tw-link-result:hover,
.tw-link-result.is-active { background: #eff6ff; }
.tw-link-result strong {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 0.78rem;
    color: #1d4ed8;
}
.tw-link-result span {
    font-size: 0.86rem;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-link-result em {
    font-style: normal;
    font-size: 0.72rem;
    color: #94a3b8;
}
.tw-link-modal__picked {
    margin-top: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.84rem;
}

.tc-modal .form-group:has(.tc-field-queue) {
    margin-bottom: 0.85rem !important;
}
.tc-modal .tc-field-queue + .ts-wrapper,
.tc-modal select.tc-field-queue {
    min-height: 42px;
}
.tc-modal .form-group:has(.tc-field-queue) .ts-control {
    min-height: 42px !important;
    border: 1.5px solid #93c5fd !important;
    background: #f8fbff !important;
}

.tw-composer__editor-wrap .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid #eef2f7;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
}

.tw-composer__editor-wrap .ql-container.ql-snow {
    border: 0;
    font-size: 0.92rem;
}

.tw-composer__editor-wrap .ql-editor {
    min-height: 72px;
    max-height: 180px;
    overflow-y: auto;
}

.tw-composer__editor-wrap .ql-editor.ql-blank::before {
    color: #94a3b8;
    font-style: normal;
}

.tw-composer__bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.tw-composer__attach {
    display: none;
}

.tw-composer__clip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}

.tw-composer__clip:hover { background: #f8fafc; color: #0f172a; }
.tw-composer__clip svg { width: 18px; height: 18px; }
.tw-composer__clip input { display: none; }

.tw-composer__send { margin-left: auto; }

.tw-composer__editor-wrap .ql-container.ql-snow {
    border: 0;
    font-size: 0.92rem;
    min-height: 96px;
}

.tw-composer__editor-wrap .ql-editor {
    min-height: 96px;
    max-height: none !important;
    overflow-y: auto;
}

.tw-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tw-related-empty {
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0.35rem 0;
}

.tw-related-item {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    padding: 0.55rem 0.6rem;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #f8fafc;
}

.tw-related-item__main { min-width: 0; flex: 1; }

.tw-related-item__top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
    margin-bottom: 0.15rem;
}

.tw-related-item__key {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.02em;
}

.tw-related-item__rel {
    font-size: 0.7rem;
    color: #64748b;
    background: #eef2f7;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}

.tw-related-item__name {
    display: block;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.3;
}

.tw-related-item__name:hover { color: #2563eb; }

.tw-related-item__status {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #fff;
    background: var(--st, #94a3b8);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.tw-related-item__rm {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
    cursor: pointer;
}

.tw-related-item__rm:hover { color: #ef4444; }

.tw-related-add {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.tw-msg__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.tw-msg__image {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    line-height: 0;
}

.tw-msg__image img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
}

.tw-msg__file-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 220px;
    padding: 0.35rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    text-decoration: none;
    color: #334155;
    font-size: 0.78rem;
}

.tw-msg__file-ext {
    flex-shrink: 0;
    text-transform: uppercase;
    font-size: 0.62rem;
    font-weight: 700;
    background: #e2e8f0;
    border-radius: 4px;
    padding: 0.15rem 0.3rem;
}

.tw-msg__file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tw-lightbox__bg {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tw-lightbox img {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1100px);
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.tw-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--tw-line);
}

.tw-commits-empty {
    padding: 1rem 0.25rem 0.5rem;
}

.tw-meta__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--tw-line);
    font-size: 0.875rem;
}

.tw-meta__row:last-child {
    border-bottom: 0;
}

.tw-meta__row span {
    color: var(--tw-muted);
}

.tw-description-card .tw-description {
    max-height: none;
    overflow: visible;
}

.tw-discussion {
    display: flex;
    flex-direction: column;
}

.tw-feed {
    max-height: min(48vh, 480px);
    overflow: auto;
    padding: 0.15rem 0.25rem 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    scroll-behavior: smooth;
}

.tw-msg {
    border: 1px solid var(--tw-line);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    background: var(--tw-soft);
}

.tw-msg--mine {
    background: var(--tw-accent-soft);
    border-color: #c9d9ff;
}

.tw-msg--system {
    background: #fff8e8;
    border-color: #f1dfaa;
}

.tw-msg__reply-to {
    font-size: 0.75rem;
    color: var(--tw-muted);
    border-left: 3px solid #94a3b8;
    padding-left: 0.5rem;
    margin-bottom: 0.35rem;
}

.tw-msg__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.tw-msg__body {
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
    color: var(--tw-ink);
    -webkit-user-select: text;
    user-select: text;
}

.tw-msg__body p {
    margin: 0 0 0.4rem;
}

.tw-msg__body p:last-child {
    margin-bottom: 0;
}

.tw-msg__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.tw-msg__actions {
    margin-top: 0.15rem;
}

.tw-msg__actions .btn-link {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
}

/* Status pipeline */
.tw-status {
    overflow: visible;
}

.tw-pipeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.45rem 0.1rem 0.25rem;
}

.tw-pipeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 3.2rem;
    flex: 1;
    opacity: 0.45;
}

.tw-pipeline__step--done,
.tw-pipeline__step--current {
    opacity: 1;
}

.tw-pipeline__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot, #94a3b8);
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--tw-line);
    flex-shrink: 0;
}

.tw-pipeline__step--current .tw-pipeline__dot {
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--dot, #2563eb);
    transform: scale(1.15);
}

.tw-pipeline__label {
    font-size: 0.68rem;
    line-height: 1.15;
    text-align: center;
    color: var(--tw-muted);
}

.tw-pipeline__step--current .tw-pipeline__label {
    color: var(--tw-ink);
    font-weight: 600;
}

.tw-pipeline__line {
    height: 2px;
    flex: 0 0 8px;
    align-self: flex-start;
    margin-top: 0.85rem;
    background: var(--tw-line);
}

.tw-pipeline__line.is-done {
    background: #94a3b8;
}

.tw-status__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tw-status__actions .btn,
.tw-status__btn {
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.7rem !important;
}

/* Code blocks */
.tw-codeblock {
    margin: 0.55rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #334155;
    background: #0f172a;
}

.tw-codeblock__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
}

.tw-code-copy {
    border: 1px solid #475569;
    background: transparent;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    cursor: pointer;
}

.tw-code-copy:hover {
    background: #334155;
}

.tw-codeblock pre {
    margin: 0;
    padding: 0.75rem 0.85rem;
    overflow: auto;
    max-height: 360px;
}

.tw-codeblock code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #e2e8f0;
    white-space: pre;
}

.tw-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.05rem 0.3rem;
}

.tw-msg__body pre,
.tw-composer-shell .ql-editor pre.ql-syntax {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    overflow: auto;
}

/* Composer compact */
.tw-composer-wrap {
    margin-top: 0.5rem;
}

.tw-reply-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: var(--tw-accent-soft);
    border: 1px solid #bfd0ff;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.5rem;
}

.tw-composer-shell {
    border: 1px solid var(--tw-line);
    border-radius: 12px;
    background: #fff;
    padding: 0.75rem 0.9rem 0.5rem;
    margin-top: 0.75rem;
}

.tw-composer-shell__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tw-composer-shell .bg-white {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
}

.tw-composer-shell .form-group {
    margin-bottom: 0.45rem !important;
}

.tw-composer-shell label {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
}

.tw-composer-shell .ql-toolbar {
    border-radius: 8px 8px 0 0;
    padding: 4px !important;
}

.tw-composer-shell .ql-container {
    border-radius: 0 0 8px 8px;
    min-height: 96px !important;
    max-height: 150px;
    overflow-y: auto;
}

.tw-composer-shell .ql-editor {
    min-height: 84px !important;
    max-height: 130px;
    font-size: 0.92rem;
}

/* ????? + ????????? ? ???? ??????? */
.tw-composer-shell .row {
    --bs-gutter-x: 0.75rem;
    align-items: flex-start;
}

.tw-composer-shell .row > [class*="col"] {
    margin-bottom: 0 !important;
}

.tw-composer-shell .upload-container,
.tw-composer-shell .dropzone {
    min-height: 44px !important;
    max-height: 72px;
    overflow: auto;
    padding: 0.35rem 0.5rem !important;
}

.tw-composer-shell .ts-wrapper,
.tw-composer-shell .select2-container,
.tw-composer-shell select.form-control {
    min-height: 38px;
}

@media (max-width: 768px) {
    .tw-composer-shell .row > [class*="col"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .tw-feed {
        max-height: 360px;
    }
}

/* Create / edit task modal ? modern dense form */
#screen-modal-createTaskModal .modal-dialog,
#screen-modal-editTaskModal .modal-dialog {
    max-width: min(820px, 94vw);
    margin: 1.5rem auto;
}

#screen-modal-createTaskModal .modal-content,
#screen-modal-editTaskModal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

#screen-modal-createTaskModal .modal-header,
#screen-modal-editTaskModal .modal-header {
    padding: 0.9rem 1.15rem 0.55rem;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: #fff;
}

#screen-modal-createTaskModal .modal-title,
#screen-modal-editTaskModal .modal-title {
    font-size: 0.95rem;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    color: #64748b;
}

#screen-modal-createTaskModal .modal-body,
#screen-modal-editTaskModal .modal-body {
    max-height: none;
    overflow: visible;
    padding: 0 1.15rem 0.35rem;
}

#screen-modal-createTaskModal .modal-footer,
#screen-modal-editTaskModal .modal-footer {
    padding: 0.7rem 1.15rem 0.95rem;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
    border-radius: 0 0 16px 16px;
}

#screen-modal-createTaskModal .modal-footer .btn-default,
#screen-modal-editTaskModal .modal-footer .btn-default {
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    transition: background-color .15s ease, transform .15s ease;
}

#screen-modal-createTaskModal .modal-footer .btn-link,
#screen-modal-editTaskModal .modal-footer .btn-link {
    text-decoration: none;
    color: #64748b;
}

.tc-modal {
    --tc-line: #e8edf3;
    --tc-soft: #f4f6f9;
    --tc-ink: #0f172a;
    --tc-muted: #64748b;
    --tc-accent: #2563eb;
    --tc-accent-soft: #eff4ff;
    max-height: min(68vh, 640px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
    scroll-behavior: smooth;
}

.tc-modal__intro {
    font-size: 0.78rem;
    color: var(--tc-muted);
    margin-bottom: 0.65rem;
}

.tc-modal .bg-white,
.tc-modal .wrapper-md,
.tc-modal .layout > .bg-white {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tc-modal .form-group {
    margin-bottom: 0.55rem !important;
}

.tc-modal .form-group:has(> input[type="hidden"]:only-child) {
    display: none !important;
    margin: 0 !important;
    height: 0 !important;
    overflow: hidden;
}

.tc-modal .form-group > label,
.tc-modal label.form-label {
    display: block;
    font-size: 0.68rem !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tc-muted) !important;
    margin-bottom: 0.2rem !important;
}

.tc-modal .form-text,
.tc-modal .help-block,
.tc-modal small.text-muted {
    display: none !important;
}

/* Title like Linear */
.tc-modal .form-group:has(.tc-field-title) {
    margin-bottom: 0.75rem !important;
}

.tc-modal .form-group:has(.tc-field-title) > label {
    display: none !important;
}

.tc-modal .tc-field-title,
.tc-modal input[name="task[name]"] {
    font-size: 1.35rem !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
    color: var(--tc-ink) !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--tc-line) !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.15rem 0 0.55rem !important;
    min-height: auto !important;
    transition: border-color .15s ease;
}

.tc-modal .tc-field-title:focus,
.tc-modal input[name="task[name]"]:focus {
    border-bottom-color: var(--tc-accent) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Meta chips row */
.tc-modal .row {
    --bs-gutter-x: 0.45rem;
    --bs-gutter-y: 0.45rem;
    align-items: stretch !important;
    margin-bottom: 0.55rem;
    padding: 0.55rem;
    background: var(--tc-soft);
    border: 1px solid var(--tc-line);
    border-radius: 12px;
    overflow: visible;
}

.tc-modal .row > [class*="col"] {
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    overflow: visible;
}

.tc-modal .row .form-group {
    margin-bottom: 0 !important;
    overflow: visible;
}

.tc-modal .row .flatpickr-input,
.tc-modal .row input.form-control:not(.ts-hidden-accessible) {
    border-radius: 8px !important;
    border: 1px solid #dbe3ec !important;
    background: #fff !important;
    min-height: 34px !important;
    font-size: 0.84rem !important;
    padding: 0.25rem 0.55rem !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* ??????? (DateTimer / input-group) ? ??? ???????? ??????? */
.tc-modal .row .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 34px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.tc-modal .row .input-group:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tc-modal .row .input-group > .form-control,
.tc-modal .row .input-group > input[data-datetime-target],
.tc-modal .row .input-group .flatpickr-input {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 32px !important;
    background: transparent !important;
    font-size: 0.84rem !important;
    padding: 0.25rem 0.55rem !important;
}

.tc-modal .row .input-group > .form-control:focus,
.tc-modal .row .input-group > input[data-datetime-target]:focus {
    box-shadow: none !important;
    outline: none !important;
}

.tc-modal .row .input-group-append,
.tc-modal .row .input-group-text {
    background: transparent !important;
    border: 0 !important;
    color: #94a3b8 !important;
    padding: 0 0.45rem !important;
}

.tc-modal .row .input-group .btn,
.tc-modal .row .input-group label.btn {
    display: none !important;
}

.tc-modal .row p,
.tc-modal .row .form-control-plaintext,
.tc-modal .row .text-muted {
    margin: 0;
    font-size: 0.84rem;
    color: var(--tc-ink);
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    min-height: 34px;
}

/* ?? Tom Select: closed ?? */
.tc-modal .ts-wrapper {
    position: relative;
    z-index: 1;
}

.tc-modal .ts-wrapper.dropdown-active {
    z-index: 30;
}

.tc-modal .ts-wrapper .ts-control {
    border-radius: 8px !important;
    border: 1px solid #dbe3ec !important;
    background: #fff !important;
    min-height: 34px !important;
    font-size: 0.84rem !important;
    padding: 0.2rem 0.55rem !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tc-modal .ts-wrapper.focus .ts-control,
.tc-modal .ts-wrapper.dropdown-active .ts-control {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    background: #fff !important;
}

.tc-modal .ts-wrapper.single .ts-control:after {
    border-color: #94a3b8 transparent transparent transparent;
    margin-top: -2px;
    transition: transform .15s ease;
}

.tc-modal .ts-wrapper.dropdown-active.single .ts-control:after {
    transform: rotate(180deg);
    margin-top: 2px;
}

/* ?? Tom Select: open dropdown ?? */
.tc-modal .ts-dropdown,
#screen-modal-createTaskModal .ts-dropdown,
#screen-modal-editTaskModal .ts-dropdown,
.ts-dropdown.tc-ts-dropdown {
    z-index: 2000 !important;
    margin: 6px 0 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    padding: 6px !important;
    overflow: hidden;
    animation: tc-drop-in .16s ease;
}

.tc-modal .ts-dropdown-content,
#screen-modal-createTaskModal .ts-dropdown-content,
#screen-modal-editTaskModal .ts-dropdown-content,
.ts-dropdown.tc-ts-dropdown .ts-dropdown-content {
    max-height: 220px;
    padding: 0 !important;
    scroll-behavior: smooth;
}

.tc-modal .ts-dropdown .option,
#screen-modal-createTaskModal .ts-dropdown .option,
#screen-modal-editTaskModal .ts-dropdown .option,
.ts-dropdown.tc-ts-dropdown .option {
    border-radius: 8px !important;
    padding: 0.45rem 0.65rem !important;
    margin: 1px 0;
    font-size: 0.875rem !important;
    line-height: 1.35;
    color: #0f172a !important;
    background: transparent !important;
    transition: background-color .12s ease, color .12s ease;
}

.tc-modal .ts-dropdown .option:hover,
.tc-modal .ts-dropdown .option.active,
#screen-modal-createTaskModal .ts-dropdown .option.active,
#screen-modal-editTaskModal .ts-dropdown .option.active,
.ts-dropdown.tc-ts-dropdown .option:hover,
.ts-dropdown.tc-ts-dropdown .option.active {
    background: #eff4ff !important;
    color: #1d4ed8 !important;
}

.tc-modal .ts-dropdown .option.selected,
#screen-modal-createTaskModal .ts-dropdown .option.selected,
#screen-modal-editTaskModal .ts-dropdown .option.selected,
.ts-dropdown.tc-ts-dropdown .option.selected {
    font-weight: 600;
}

.tc-modal .ts-dropdown .no-results,
#screen-modal-createTaskModal .ts-dropdown .no-results,
.ts-dropdown.tc-ts-dropdown .no-results {
    padding: 0.55rem 0.65rem;
    color: #94a3b8;
    font-size: 0.84rem;
}

/* Flatpickr calendar */
.flatpickr-calendar {
    z-index: 2100 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14) !important;
    overflow: hidden;
    animation: tc-drop-in .16s ease;
}

.flatpickr-calendar .flatpickr-months,
.flatpickr-calendar .flatpickr-weekdays {
    background: #f8fafc;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.flatpickr-day:hover {
    background: #eff4ff !important;
    border-color: #eff4ff !important;
}

@keyframes tc-drop-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Description */
.tc-modal .ql-toolbar {
    border: 1px solid var(--tc-line) !important;
    border-bottom: 0 !important;
    border-radius: 10px 10px 0 0 !important;
    background: var(--tc-soft) !important;
    padding: 0.25rem 0.35rem !important;
}

.tc-modal .ql-container {
    border: 1px solid var(--tc-line) !important;
    border-radius: 0 0 10px 10px !important;
    min-height: 140px !important;
    max-height: 220px;
    background: #fff !important;
}

.tc-modal .ql-editor {
    min-height: 120px !important;
    max-height: 200px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--tc-ink);
}

.tc-modal .ql-editor.ql-blank::before {
    color: #94a3b8;
    font-style: normal;
}

/* Attachments */
.tc-modal .upload-container,
.tc-modal .dropzone {
    min-height: 52px !important;
    max-height: 88px;
    overflow: auto;
    border-radius: 10px !important;
    border: 1px dashed #cbd5e1 !important;
    background: var(--tc-soft) !important;
    padding: 0.45rem 0.6rem !important;
    transition: border-color .15s ease, background-color .15s ease;
}

.tc-modal .upload-container:hover,
.tc-modal .dropzone:hover {
    border-color: #93c5fd !important;
    background: #f8fbff !important;
}

@media (max-width: 768px) {
    .tc-modal .row > [class*="col"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 520px) {
    .tc-modal .row > [class*="col"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Messenger full-bleed page (рядом с боковым меню Orchid) */
html.bx-messenger-page,
body.bx-messenger-page {
    overflow: hidden;
}
body.bx-messenger-page .breadcrumb,
body.bx-messenger-page nav[aria-label="breadcrumb"],
body.bx-messenger-page .page-header,
body.bx-messenger-page .header-tittle,
body.bx-messenger-page .header-bar,
body.bx-messenger-page .workspace > h1,
body.bx-messenger-page .command-bar-wrapper + .layout,
body.bx-messenger-page .task-manager-footer {
    display: none !important;
}
/* Command bar скрыт визуально, но остаётся в DOM для ModalToggle */
body.bx-messenger-page .command-bar-wrapper,
body.bx-messenger-page .command-bar {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (min-width: 1200px) {
    /* Колонка контента на всю оставшуюся ширину — без page-scroll */
    body.bx-messenger-page > .container-fluid > .row > .col-xxl,
    body.bx-messenger-page > .container-fluid > .row > .col-xl-9 {
        flex: 1 1 0% !important;
        max-width: none !important;
        width: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
    }

    body.bx-messenger-page .bx-messenger-workspace-wrap,
    body.bx-messenger-page .workspace,
    body.bx-messenger-page #post-form {
        flex: 1 1 auto;
        min-height: 0;
        height: 100% !important;
        max-height: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
    }

    body.bx-messenger-page .bx-messenger {
        flex: 1 1 auto;
        width: 100%;
        height: auto !important;
        max-height: none !important;
        min-height: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: none;
        margin: 0;
    }
}

/* Мобилка: на всю ширину и высоту без боковых полей Orchid */
@media (max-width: 1199.98px) {
    body.bx-messenger-page > .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: none !important;
    }
    body.bx-messenger-page > .container-fluid > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    body.bx-messenger-page > .container-fluid > .row > [class*="col-"] {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    body.bx-messenger-page .bx-messenger-workspace-wrap,
    body.bx-messenger-page .workspace,
    body.bx-messenger-page #post-form,
    body.bx-messenger-page .container-xl {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }
    body.bx-messenger-page .bx-messenger {
        width: 100% !important;
        max-width: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* ?? Messenger (Bitrix-like) ?? */
.bx-messenger {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    gap: 0;
    height: 70vh;
    max-height: 70vh;
    min-height: 0;
    border: 1px solid #e6eaf0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 0.75rem;
}
.bx-messenger > * {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.bx-messenger__sidebar {
    border-right: 1px solid #dfe3e8;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.bx-messenger__sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem 0.35rem;
    flex-shrink: 0;
}
.bx-messenger__sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.bx-messenger__sidebar-title strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.bx-messenger__sidebar-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}
.bx-sidebar-icon {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.bx-sidebar-icon:hover {
    background: #f1f5f9;
    color: #2563eb;
}
.bx-sidebar-icon .bx-icon { width: 20px; height: 20px; }

.bx-sidebar-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 9px;
    padding: 0.32rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.bx-sidebar-action .bx-icon { width: 14px; height: 14px; }
.bx-sidebar-action:hover { background: #f8fafc; }
.bx-sidebar-action--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.bx-sidebar-action--primary:hover { background: #1d4ed8; }

.bx-header-menu__sep {
    height: 1px;
    background: #eef2f7;
    margin: 0.25rem 0.35rem;
}
.bx-push-status {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}
.bx-push-status[data-state="Включены"] {
    color: #166534;
    background: #dcfce7;
}
.bx-push-status[data-state="Ошибка"],
.bx-push-status[data-state="Запрещено"] {
    color: #991b1b;
    background: #fee2e2;
}
.bx-push-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    padding: 0.15rem 0.65rem 0.45rem;
    line-height: 1.35;
}

.bx-messenger__search {
    padding: 0.35rem 0.75rem 0.65rem;
    flex-shrink: 0;
}
.bx-messenger__search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.bx-messenger__search-ico {
    position: absolute;
    left: 0.7rem;
    width: 15px;
    height: 15px;
    color: #94a3b8;
    pointer-events: none;
}
.bx-messenger__search-input {
    width: 100%;
    border: 0;
    border-radius: 22px;
    padding: 0.55rem 0.85rem 0.55rem 2.1rem;
    font-size: 0.9rem;
    background: #f4f4f5;
    outline: none;
    color: #0f172a;
}
.bx-messenger__search-input::placeholder { color: #94a3b8; }
.bx-messenger__search-input:focus {
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.bx-search-panel {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}
.bx-search-panel__section {
    padding: 0.5rem 0 0.35rem;
}
.bx-search-panel__title {
    padding: 0.25rem 0.95rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.bx-search-panel__list {
    background: #fff;
    border-top: 1px solid #e8edf3;
    border-bottom: 1px solid #e8edf3;
}
.bx-search-panel__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}
.bx-search-hit {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.85rem;
    text-decoration: none !important;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}
.bx-search-hit:last-child { border-bottom: 0; }
.bx-search-hit:hover,
.bx-search-hit:focus-visible {
    background: #eef5ff;
    outline: none;
}
.bx-search-hit .bx-avatar {
    flex-shrink: 0;
}
.bx-search-hit__body {
    min-width: 0;
    flex: 1 1 auto;
}
.bx-search-hit__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}
.bx-search-hit__title {
    font-weight: 650;
    font-size: 0.92rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-search-hit__time {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #94a3b8;
}
.bx-search-hit__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.bx-search-hit__kind,
.bx-search-hit__tag {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 6px;
    line-height: 1.2;
}
.bx-search-hit__kind {
    color: #475569;
    background: #e2e8f0;
}
.bx-search-hit--msg .bx-search-hit__tag {
    color: #1d4ed8;
    background: #dbeafe;
}
.bx-search-hit__preview {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-search-hit__from {
    color: #2563eb;
    font-weight: 600;
}
.bx-search-hit__badge {
    flex-shrink: 0;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bx-search-mark {
    background: #fde68a;
    color: inherit;
    border-radius: 2px;
    padding: 0 0.05em;
}
.bx-msg--highlight .bx-msg__bubble {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    animation: bx-msg-flash 1.2s ease;
}
@keyframes bx-msg-flash {
    0%, 100% { background: inherit; }
    30% { background: #dbeafe; }
}

.bx-mic-select {
    max-width: 160px;
    font-size: 0.75rem;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 0.2rem 0.35rem;
    background: #fff;
}
.bx-voice-record__mic {
    display: flex;
    align-items: center;
    margin: 0;
}
.bx-mic-gate__device {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: #475569;
}
.bx-mic-gate__device .bx-mic-select {
    max-width: none;
    width: 100%;
    font-size: 0.88rem;
    padding: 0.4rem 0.5rem;
}

.bx-messenger__list {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.bx-chat-list-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.bx-chat-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    text-decoration: none !important;
    color: inherit;
    border: 0;
    border-radius: 0;
    transition: background .1s ease;
    min-height: 68px;
    position: relative;
}
.bx-chat-item::after {
    content: '';
    position: absolute;
    left: calc(0.75rem + 44px + 0.7rem);
    right: 0;
    bottom: 0;
    height: 1px;
    background: #f1f5f9;
}
.bx-chat-item:last-child::after { display: none; }

.bx-chat-item:hover { background: #f4f4f5; }
.bx-chat-item.is-active {
    background: #3390ec;
    color: #fff;
}
.bx-chat-item.is-active::after { display: none; }
.bx-chat-item.is-active .bx-chat-item__preview,
.bx-chat-item.is-active .bx-chat-item__time,
.bx-chat-item.is-active .bx-chat-item__mute,
.bx-chat-item.is-active .bx-chat-item__pin {
    color: rgba(255, 255, 255, 0.78);
}
.bx-chat-item.is-active .bx-chat-item__badge {
    background: #fff;
    color: #3390ec;
}
.bx-chat-item.is-active .bx-chat-item__badge.is-muted {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.bx-chat-item__avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.bx-chat-item__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.bx-chat-item__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.bx-chat-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.bx-chat-item__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.bx-chat-item__time {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    font-weight: 500;
}
.bx-chat-item__pin {
    width: 12px;
    height: 12px;
    color: #94a3b8;
}
.bx-chat-item__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.bx-chat-item__preview {
    font-size: 0.84rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}
.bx-chat-item__trail {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.bx-chat-item__mute {
    width: 14px;
    height: 14px;
    color: #94a3b8;
}
.bx-chat-item__badge {
    background: #3390ec;
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.12rem 0.42rem;
    min-width: 1.25rem;
    text-align: center;
    line-height: 1.2;
}
.bx-chat-item__badge.is-muted {
    background: #b0b7c3;
}

.bx-messenger__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.bx-messenger__header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e6eaf0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bx-mute-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.bx-mute-btn:hover { background: #f8fafc; }
.bx-messenger__header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.bx-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
}
.bx-icon-btn:hover { background: #f8fafc; color: #0f172a; }
.bx-icon-btn .bx-icon { width: 18px; height: 18px; }

.bx-chat-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 0;
    background: transparent;
    padding: 0.15rem 0.35rem 0.15rem 0;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    min-width: 0;
}
.bx-chat-identity:hover { background: #f8fafc; }
.bx-chat-identity__text { min-width: 0; }
.bx-chat-identity__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 280px);
}
.bx-chat-identity .bx-chat-subtitle {
    display: block;
    border: 0;
    background: transparent;
    padding: 0;
    color: #64748b;
    font-size: 0.78rem;
}

.bx-header-menu { position: relative; }
.bx-header-menu__drop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.bx-header-menu__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #334155;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    font-size: 0.86rem;
    text-align: left;
    cursor: pointer;
}
.bx-header-menu__item:hover { background: #f1f5f9; }
.bx-header-menu__item.is-active { color: #1d4ed8; background: #eff6ff; }
.bx-header-menu__item--static { cursor: default; flex-wrap: wrap; }
.bx-header-menu__item--static:hover { background: transparent; }
.bx-header-menu__range { width: 90px; margin-left: auto; }
.bx-header-menu__pct { font-size: 0.75rem; color: #64748b; min-width: 2.5rem; }

.bx-chat-info__panel {
    width: min(420px, 100%) !important;
    max-height: min(88vh, 780px) !important;
    height: min(88vh, 780px);
    display: flex !important;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden !important; /* не скроллить всю панель — иначе табы «съедает» медиа */
    border-radius: 16px !important;
}
.bx-chat-info__top {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.85rem 0.85rem 0.65rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
}
.bx-chat-info__back {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.15rem;
}
.bx-chat-info__back:hover { background: #f1f5f9; color: #0f172a; }
.bx-chat-info__profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}
.bx-chat-info__profile-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.bx-chat-info__profile-meta strong {
    font-size: 1.05rem;
    line-height: 1.25;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-chat-info__subtitle {
    font-size: 0.82rem;
    color: #64748b;
}
.bx-chat-info__tabs {
    display: flex;
    gap: 0;
    padding: 0 0.35rem;
    border-bottom: 1px solid #eef2f7;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    background: #fff;
    isolation: isolate;
}
.bx-chat-info__tabs::-webkit-scrollbar { display: none; }
.bx-chat-info__tabs button {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.7rem 0.85rem;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    white-space: nowrap;
    cursor: pointer;
    margin-bottom: -1px;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}
.bx-chat-info__tabs button.is-active {
    background: transparent;
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.bx-chat-info__body {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 0;
    background: #fff;
}
.bx-chat-info__pane {
    padding: 0.35rem 0 0.75rem;
}
.bx-chat-info__pane[data-info-pane="gallery"] {
    padding: 0;
    min-height: 12rem;
}
.bx-chat-info__pane .bx-members-modal__list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.5rem;
}
.bx-members-modal__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    transition: background .12s ease;
}
.bx-members-modal__item:hover { background: #f8fafc; }

.bx-chat-info__avatar-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
}
.bx-chat-info__avatar-wrap.is-editable { cursor: pointer; }
.bx-chat-info__avatar-edit {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #3390ec;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.bx-chat-info__avatar-edit:hover { background: #2b7fd4; }
.bx-chat-info__actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.35rem 1rem 0.85rem;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
}
.bx-chat-info__action {
    border: 0;
    background: transparent;
    color: #3390ec;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 64px;
    padding: 0;
}
.bx-chat-info__action-ico {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eff6ff;
    color: #3390ec;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bx-chat-info__action:hover .bx-chat-info__action-ico { background: #dbeafe; }
.bx-chat-info__about {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
    background: #fff;
}
.bx-chat-info__about-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3390ec;
    margin-bottom: 0.25rem;
}
.bx-chat-info__about-text {
    font-size: 0.9rem;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}
.bx-chat-info__about--empty .bx-chat-info__about-text { color: #94a3b8; }
.bx-members-modal__meta { min-width: 0; flex: 1; }
.bx-members-modal__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-members-modal__status {
    font-size: 0.78rem;
    color: #94a3b8;
}
.bx-members-modal__status.is-online { color: #16a34a; }
.bx-members-modal__remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .12s ease, background .12s ease, color .12s ease;
}
.bx-members-modal__item:hover .bx-members-modal__remove,
.bx-members-modal__remove:focus-visible {
    opacity: 1;
}
.bx-members-modal__remove:hover {
    background: #fef2f2;
    color: #dc2626;
}
@media (pointer: coarse) {
    .bx-members-modal__remove { opacity: 1; }
}
.bx-chat-info__danger {
    padding: 0.75rem 0.85rem 1rem;
}
.bx-chat-info__danger-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
}
.bx-chat-info__danger-btn:hover { background: #fee2e2; }
.bx-header-menu__item--danger { color: #dc2626; }
.bx-header-menu__item--danger:hover { background: #fef2f2; }

.bx-chat-edit__panel,
.bx-chat-add__panel {
    width: min(420px, 100%) !important;
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
}
.bx-chat-edit__form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.bx-chat-edit__avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}
.bx-chat-edit__avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    background: #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 1.6rem;
}
.bx-chat-edit__avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bx-chat-edit__avatar-label {
    color: #3390ec;
    font-size: 0.88rem;
    font-weight: 600;
}
.bx-chat-edit__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}
.bx-chat-edit__field input,
.bx-chat-edit__field textarea,
.bx-chat-add__search {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    background: #f8fafc;
}
.bx-chat-edit__field input:focus,
.bx-chat-edit__field textarea:focus,
.bx-chat-add__search:focus {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bx-chat-edit__save {
    border: 0;
    border-radius: 12px;
    background: #3390ec;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
}
.bx-chat-edit__save:hover { background: #2b7fd4; }
.bx-chat-edit__save:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.bx-chat-add__list {
    flex: 1;
    overflow: auto;
    min-height: 180px;
    max-height: 42vh;
    margin: 0.65rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.bx-chat-add__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.45rem;
    border-radius: 10px;
    cursor: pointer;
    border: 0;
    background: transparent;
    text-align: left;
    width: 100%;
}
.bx-chat-add__item:hover { background: #f8fafc; }
.bx-chat-add__item.is-on { background: #eff6ff; }
.bx-chat-add__item-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-chat-add__check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    flex-shrink: 0;
}
.bx-chat-add__item.is-on .bx-chat-add__check {
    border-color: #3390ec;
    background: #3390ec;
    box-shadow: inset 0 0 0 3px #fff;
}

.bx-media-content {
    min-height: 4rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.bx-media-content--grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: #e2e8f0;
    padding: 2px;
    overflow: hidden;
}
.bx-media-content--list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem 0.5rem;
}
.bx-shared-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    grid-column: 1 / -1;
    background: #fff;
}
.bx-shared-media__cell {
    position: relative;
    aspect-ratio: 1;
    background: #cbd5e1;
    overflow: hidden;
}
.bx-shared-media__thumb {
    display: block;
    width: 100%;
    height: 100%;
}
.bx-shared-media__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .18s ease;
}
.bx-shared-media__cell:hover .bx-shared-media__thumb img {
    transform: scale(1.04);
}
.bx-shared-media__goto {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease, background .14s ease;
    cursor: pointer;
}
.bx-shared-media__cell:hover .bx-shared-media__goto,
.bx-shared-media__goto:focus-visible {
    opacity: 1;
    transform: none;
}
.bx-shared-media__goto:hover { background: rgba(37, 99, 235, 0.92); }

.bx-shared-row {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    border-radius: 12px;
    transition: background .12s ease;
}
.bx-shared-row:hover { background: #f8fafc; }
.bx-shared-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.45rem 0.55rem 0.55rem;
    text-decoration: none;
    color: inherit;
}
.bx-shared-row__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.bx-shared-row__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-shared-row__url {
    font-size: 0.78rem;
    color: #2563eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-shared-row__meta {
    font-size: 0.75rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-shared-row__goto {
    flex-shrink: 0;
    align-self: center;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.bx-shared-row__goto:hover { background: #eff6ff; }
.bx-shared-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bx-file-bg, #64748b);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}
.bx-shared-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: hsl(var(--bx-link-hue, 210) 55% 42%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
    flex-shrink: 0;
}
.bx-media-more {
    display: block;
    width: calc(100% - 1rem);
    margin: 0.35rem 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}
.bx-media-more:hover { background: #f8fafc; border-color: #cbd5e1; }
.bx-media-more.d-none { display: none !important; }

@media (pointer: coarse) {
    .bx-shared-media__goto {
        opacity: 1;
        transform: none;
        background: rgba(15, 23, 42, 0.55);
    }
}

.bx-composer.is-sending {
    opacity: 0.72;
    pointer-events: none;
    position: relative;
}
.bx-composer.is-sending::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.35);
    border-radius: 12px;
}
.bx-composer.is-drop {
    outline: 2px dashed #93c5fd;
    outline-offset: 2px;
}
.bx-composer__send.is-loading {
    min-width: 7.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.bx-send-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: bx-spin 0.7s linear infinite;
}
@keyframes bx-spin { to { transform: rotate(360deg); } }

.tw-composer.is-sending { opacity: 0.7; pointer-events: none; }
.tw-composer__preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0;
}
.tw-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.25rem 0.4rem;
    background: #f8fafc;
    font-size: 0.75rem;
}
.tw-file-chip img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
}
.tw-file-chip button {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.tw-history-head {
    margin-bottom: 0.85rem;
}
.tw-event {
    padding: 0.75rem 0.85rem;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 0.65rem;
}
.tw-event__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.tw-event__user { font-size: 0.9rem; }
.tw-event__time { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; }
.tw-event__body p { margin-bottom: 0.25rem; }
.tw-event__body p:last-child { margin-bottom: 0; }

.bx-mute-btn.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.bx-chat-item.is-pinned {
    background: transparent;
}
.bx-chat-item.is-pinned:hover { background: #f4f4f5; }
.bx-chat-item.is-pinned.is-active { background: #3390ec; }
.bx-pin { color: #2563eb; margin-right: 0.15rem; }

.bx-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.bx-icon--xs {
    width: 13px;
    height: 13px;
    vertical-align: -1px;
    margin-left: 0.2rem;
    color: #94a3b8;
}

.bx-chat-item.is-muted .bx-chat-item__preview { opacity: 0.85; }

.bx-chat-actions-sheet .bx-chat-actions__panel {
    width: min(360px, 100%) !important;
}
.bx-chat-actions__preview {
    margin-bottom: 0.55rem;
}
@media (pointer: coarse) {
    .bx-chat-actions-sheet .bx-chat-actions__panel {
        width: 100% !important;
        max-width: none !important;
        border-radius: 18px 18px 0 0 !important;
    }
}

.bx-mention {
    display: inline;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 4px;
    padding: 0.05em 0.28em;
    font-weight: 600;
}

.bx-composer__input-wrap {
    position: relative;
    min-height: 40px;
}

.bx-composer__input {
    position: relative;
    z-index: 1;
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    resize: none;
    min-height: 40px;
    max-height: 160px;
    overflow-y: auto;
    padding: 0.35rem 0.35rem 0.45rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #0f172a;
    caret-color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}
.bx-composer__input:empty:before,
.bx-composer__input.is-empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.bx-composer__menu--task {
    min-width: 280px;
    max-width: 360px;
}

.bx-task-results {
    margin-top: 0.4rem;
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bx-task-results__empty {
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0.45rem 0.35rem;
}

.bx-task-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.4rem 0.45rem;
    border-radius: 8px;
    cursor: pointer;
    color: #0f172a;
}
.bx-task-result:hover { background: #eff6ff; }
.bx-task-result strong {
    font-size: 0.78rem;
    color: #2563eb;
}
.bx-task-result span {
    font-size: 0.84rem;
    line-height: 1.3;
}

.bx-task-picked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 0.82rem;
    color: #1e40af;
}

.bx-mention-menu {
    position: absolute;
    left: 0.55rem;
    bottom: calc(100% - 0.2rem);
    min-width: 220px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 0.35rem;
    z-index: 30;
}

.bx-composer { position: relative; }

.bx-mention-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #0f172a;
    cursor: pointer;
}
.bx-mention-item:hover,
.bx-mention-item.is-active {
    background: #eff6ff;
}
.bx-mention-item__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.bx-mention-item__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bx-unread-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 0.75rem 0.55rem;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    user-select: none;
}
.bx-unread-divider::before,
.bx-unread-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #93c5fd, transparent);
}
.bx-unread-divider span {
    flex: 0 0 auto;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.bx-selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    background: #0f172a;
    color: #f8fafc;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    animation: bx-sel-bar-in .16s ease;
}
.bx-selection-bar[hidden] { display: none !important; }
@keyframes bx-sel-bar-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.bx-selection-bar__info {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.bx-selection-bar__close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.bx-selection-bar__close:hover { background: rgba(255,255,255,0.14); }
.bx-selection-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bx-selection-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s ease, transform .12s ease;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
}
.bx-selection-bar__btn[hidden] { display: none !important; }
.bx-selection-bar__btn:hover { background: rgba(255,255,255,0.14); }
.bx-selection-bar__btn:active { transform: scale(0.98); }
.bx-selection-bar__btn--primary {
    background: #2563eb;
    color: #fff;
}
.bx-selection-bar__btn--primary:hover { background: #1d4ed8; }
.bx-selection-bar__btn--danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}
.bx-selection-bar__btn--danger:hover { background: rgba(239, 68, 68, 0.28); }
.bx-selection-bar__count {
    font-style: normal;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.bx-messenger__feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.55rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    background: linear-gradient(180deg, #fbfcfd, #f5f7fa);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.bx-messenger__empty {
    margin: auto;
    text-align: center;
    padding: 2rem;
}

.bx-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bx-avatar-bg, #64748b);
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    user-select: none;
}
.bx-avatar--round { border-radius: 50%; }
.bx-avatar--square { border-radius: 10px; }
.bx-avatar--xs { width: 22px; height: 22px; font-size: 0.58rem; }
.bx-avatar--sm { width: 34px; height: 34px; font-size: 0.72rem; }
.bx-avatar--md { width: 40px; height: 40px; font-size: 0.82rem; }
.bx-avatar--lg { width: 44px; height: 44px; font-size: 0.9rem; }
.bx-avatar__initials { line-height: 1; }
.bx-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bx-msg--bot .bx-msg__bubble {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}
.bx-msg__body--bot {
    font-size: 0.92rem;
    line-height: 1.55;
}
.bx-msg__body--bot p { margin: 0 0 0.55em; }
.bx-msg__body--bot p:last-child { margin-bottom: 0; }
.bx-msg__body--bot pre,
.bx-bot-pre {
    margin: 0.55em 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.82rem;
}
.bx-msg__body--bot code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86em;
    padding: 0.05em 0.3em;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.06);
}
.bx-msg__body--bot pre code { background: transparent; padding: 0; color: inherit; }
.bx-msg__body--bot a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.bx-bot-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.55rem;
}
.bx-bot-keyboard__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.bx-bot-btn {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #fff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    transition: background .12s ease, border-color .12s ease;
}
.bx-bot-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}
.bx-bot-btn:disabled { opacity: 0.6; cursor: wait; }
.bx-bot-btn--url::after {
    content: '';
    width: 10px;
    height: 10px;
    opacity: 0.7;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.5 3H3.75A.75.75 0 003 3.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 00.75-.75V9.5a.75.75 0 00-1.5 0v2.75h-7v-7H6.5a.75.75 0 000-1.5z'/%3E%3Cpath fill='black' d='M9.25 2.5a.75.75 0 000 1.5h1.69L6.72 8.22a.75.75 0 101.06 1.06l4.22-4.22v1.69a.75.75 0 001.5 0V3.25a.75.75 0 00-.75-.75H9.25z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.5 3H3.75A.75.75 0 003 3.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 00.75-.75V9.5a.75.75 0 00-1.5 0v2.75h-7v-7H6.5a.75.75 0 000-1.5z'/%3E%3Cpath fill='black' d='M9.25 2.5a.75.75 0 000 1.5h1.69L6.72 8.22a.75.75 0 101.06 1.06l4.22-4.22v1.69a.75.75 0 001.5 0V3.25a.75.75 0 00-.75-.75H9.25z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bx-bot-reply-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 0.45rem;
    padding: 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.bx-bot-reply-keyboard__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.bx-bot-reply-keyboard__btn {
    flex: 1 1 auto;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.bx-bot-reply-keyboard__btn:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.bx-bot-cmd-menu {
    margin: 0 0 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    max-height: 220px;
    overflow-y: auto;
}
.bx-bot-cmd-menu__item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.bx-bot-cmd-menu__item:last-child { border-bottom: 0; }
.bx-bot-cmd-menu__item:hover { background: #f8fafc; }
.bx-bot-cmd-menu__item strong { color: #2563eb; font-size: 0.86rem; }
.bx-bot-cmd-menu__item span { color: #64748b; font-size: 0.75rem; }

.bx-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}
.bx-bot-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: 2px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    z-index: 3;
    pointer-events: none;
}
.bx-avatar-wrap:has(.bx-avatar--xs) .bx-bot-badge,
.bx-avatar-wrap .bx-avatar--xs ~ .bx-bot-badge {
    width: 12px;
    height: 12px;
    right: -1px;
    bottom: -1px;
    border-width: 1.5px;
}
.bx-avatar-wrap:has(.bx-avatar--xs) .bx-bot-badge svg,
.bx-avatar-wrap .bx-avatar--xs ~ .bx-bot-badge svg {
    width: 7px;
    height: 7px;
}
.bx-avatar-wrap:has(.bx-avatar--sm) .bx-bot-badge,
.bx-avatar-wrap .bx-avatar--sm ~ .bx-bot-badge {
    width: 15px;
    height: 15px;
}
.bx-msg__bot-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    vertical-align: middle;
    line-height: 1.3;
}
.bx-online-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity .15s ease, transform .15s ease;
    pointer-events: none;
    z-index: 2;
}
.bx-avatar-wrap.is-online .bx-online-dot {
    opacity: 1;
    transform: scale(1);
}
.bx-avatar-wrap .bx-avatar--lg + .bx-online-dot,
.bx-avatar-wrap:has(.bx-avatar--lg) .bx-online-dot {
    width: 12px;
    height: 12px;
}

.bx-members-modal__status {
    margin-top: 0.1rem;
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-members-modal__status.is-online {
    color: #16a34a;
    font-weight: 500;
}

.bx-typing {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.35rem;
    padding: 0.15rem 1rem 0.35rem;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.3;
}
.bx-typing.d-none { display: none !important; }
.bx-typing__dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.bx-typing__dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
    animation: bx-typing-bounce 1.2s infinite ease-in-out;
}
.bx-typing__dots span:nth-child(2) { animation-delay: 0.15s; }
.bx-typing__dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bx-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-3px); opacity: 1; }
}

.bx-chat-subtitle.is-typing {
    color: #2563eb;
}

.bx-messenger__header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.bx-chat-subtitle {
    display: block;
    margin: 0.1rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
    text-align: left;
}
.bx-chat-subtitle:hover {
    color: #2563eb;
}

.bx-members-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.bx-members-modal[hidden] { display: none !important; }
.bx-members-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
}
.bx-members-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(380px, 100%);
    max-height: min(72vh, 520px);
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bx-members-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eef1f5;
    font-size: 0.95rem;
}
.bx-members-modal__close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.bx-members-modal__close:hover {
    background: #f1f5f9;
    color: #475569;
}
.bx-members-modal__list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    overflow: auto;
}
.bx-members-modal__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1rem;
}
.bx-members-modal__item:hover {
    background: #f8fafc;
}
.bx-members-modal__meta { min-width: 0; }
.bx-members-modal__name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-members-modal__role {
    color: #94a3b8;
    font-size: 0.75rem;
}

.bx-composer__tool.is-recording {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.bx-voice-record__meter {
    display: inline-block;
    width: 72px;
    height: 8px;
    margin-left: 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    vertical-align: middle;
}
.bx-voice-record__meter-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #94a3b8;
    transition: width 0.05s linear;
}
.bx-voice-record__meter-fill.is-hot { background: #22c55e; }

.bx-notify-vol {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}
.bx-notify-vol input[type="range"] {
    width: 84px;
    accent-color: #2563eb;
}
.bx-notify-vol--empty {
    display: flex;
    margin-top: 1.25rem;
    justify-content: center;
}

.bx-mic-gate {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}
.bx-mic-gate[hidden] { display: none !important; }
.bx-mic-gate__card {
    width: min(420px, 94vw);
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
}
.bx-mic-gate__title { margin: 0 0 0.5rem; font-size: 1.1rem; }
.bx-mic-gate__text {
    margin: 0 0 0.85rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.45;
}
.bx-mic-gate__meter {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.55rem;
}
.bx-mic-gate__meter span {
    display: block;
    height: 100%;
    width: 0;
    background: #94a3b8;
}
.bx-mic-gate__meter span.is-hot { background: #22c55e; }
.bx-mic-gate__hint {
    min-height: 1.2em;
    margin: 0 0 0.9rem;
    font-size: 0.82rem;
    color: #b45309;
}
.bx-mic-gate__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.bx-composer.is-voice-recording .bx-composer__box {
    display: none;
}
.bx-composer.is-voice-recording .bx-voice-record {
    display: flex !important;
}

.bx-voice-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.bx-voice-record.d-none { display: none !important; }
.bx-voice-record__main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.9rem;
}
.bx-voice-record__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: bx-voice-pulse 1s ease-in-out infinite;
}
@keyframes bx-voice-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.bx-voice-record__timer {
    font-variant-numeric: tabular-nums;
    min-width: 2.6rem;
}
.bx-voice-record__limit {
    color: #f87171;
    font-weight: 500;
    font-size: 0.8rem;
}
.bx-voice-record__actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.bx-voice-record__btn {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #64748b;
    min-height: 40px;
}
.bx-voice-record__btn--send {
    background: #2563eb;
    color: #fff;
}
.bx-voice-record__btn--send:active,
.bx-voice-record__btn:active {
    transform: scale(0.98);
}

.bx-msg__voices {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Telegram / VK style voice message */
.bx-voice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 200px;
    max-width: 280px;
    user-select: none;
}
.bx-voice__play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #3390ec;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .12s ease, transform .12s ease;
}
.bx-voice__play:hover { background: #2a7fd4; }
.bx-voice__play:active { transform: scale(0.96); }
.bx-voice--mine .bx-voice__play {
    background: #4fae4e;
}
.bx-voice--mine .bx-voice__play:hover { background: #3f9a3e; }
.bx-voice__icon { width: 16px; height: 16px; display: block; }
.bx-voice__icon--play { margin-left: 2px; }
.bx-voice.is-playing .bx-voice__icon--play { display: none; }
.bx-voice.is-playing .bx-voice__icon--pause { display: block !important; }
.bx-voice:not(.is-playing) .bx-voice__icon--pause { display: none !important; }

.bx-voice__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.bx-voice__wave {
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    outline: none;
}
.bx-voice__bars {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}
.bx-voice__bar {
    flex: 1 1 0;
    min-width: 2px;
    max-width: 3px;
    height: 20%;
    border-radius: 2px;
    background: rgba(51, 144, 236, 0.35);
    transition: background .08s linear;
}
.bx-voice--mine .bx-voice__bar {
    background: rgba(79, 174, 78, 0.35);
}
.bx-voice__bar.is-played {
    background: #3390ec;
}
.bx-voice--mine .bx-voice__bar.is-played {
    background: #4fae4e;
}
.bx-voice__time {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    line-height: 1;
}
.bx-voice--mine .bx-voice__time { color: #5a8f5a; }
.bx-voice audio { display: none; }


.bx-chat-item__avatar--lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.bx-msg {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    align-self: stretch;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0.32rem 0.75rem 0.32rem 2.55rem;
    box-sizing: border-box;
    border-radius: 0;
    transition: background .12s ease, transform .18s ease;
}
.bx-msg:not(.bx-msg--system):hover {
    background: rgba(37, 99, 235, 0.055);
}
.bx-msg.is-selected {
    background: rgba(37, 99, 235, 0.12) !important;
}
.bx-msg.is-selected:hover {
    background: rgba(37, 99, 235, 0.15) !important;
}

/* Галочка выбора как в VK — слева на всю строку */
.bx-msg__check {
    position: absolute;
    left: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
}
.bx-msg:not(.bx-msg--system):hover .bx-msg__check,
.bx-msg.is-selected .bx-msg__check,
.bx-messenger.is-selecting .bx-msg__check {
    opacity: 1;
    pointer-events: auto;
}
.bx-msg__check-box {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    background: #fff;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.bx-msg__check:hover .bx-msg__check-box {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bx-msg__check.is-on .bx-msg__check-box,
.bx-msg.is-selected .bx-msg__check-box {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.bx-msg__check svg {
    display: block;
}

.bx-msg__bubble {
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    padding: 0.65rem 0.8rem;
    min-width: 0;
    max-width: min(720px, calc(100% - 2.5rem));
    transition: box-shadow .12s ease, background .12s ease, transform .12s ease;
}

.bx-msg--mine {
    align-self: stretch;
    flex-direction: row-reverse;
    padding-left: 2.55rem;
    padding-right: 0.75rem;
}
.bx-msg--mine .bx-msg__bubble {
    background: #eef5ff;
    border-color: #cfe0ff;
}

.bx-msg--system {
    align-self: center;
    background: transparent !important;
    border: 0;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
    max-width: 100%;
    padding: 0.35rem 0.75rem;
    justify-content: center;
}
.bx-msg--system:hover {
    background: transparent !important;
}
.bx-msg--system .bx-msg__bubble {
    background: transparent;
    border: 0;
    padding: 0.2rem 0.5rem;
    max-width: 100%;
}

.bx-msg__avatar { flex-shrink: 0; padding-bottom: 0.15rem; }

.bx-msg__meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.25rem 0.45rem;
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
    color: #64748b;
}
.bx-msg__meta strong {
    font-weight: 600;
    color: #2563eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.bx-msg--mine .bx-msg__meta strong { color: #1d4ed8; }

.bx-msg__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.25rem;
    min-height: 1.1rem;
}
.bx-msg__footer .bx-msg__actions {
    margin-right: auto;
}

.bx-msg__receipt {
    position: relative;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    cursor: default;
}
.bx-msg__receipt--partial { color: #64748b; }
.bx-msg__receipt--read { color: #2563eb; }
.bx-msg__checks {
    display: inline-flex;
    line-height: 0;
}
.bx-msg__receipt-tip {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 220px;
    max-width: 280px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    z-index: 40;
    font-size: 0.78rem;
}
.bx-msg__receipt:hover .bx-msg__receipt-tip,
.bx-msg__receipt:focus-within .bx-msg__receipt-tip {
    display: block;
}
.bx-msg__receipt-tip-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #fff;
}
.bx-msg__receipt-empty { color: #94a3b8; }
.bx-msg__receipt-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.bx-msg__receipt-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.bx-msg__receipt-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-msg__receipt-time {
    color: #94a3b8;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.bx-msg__reply {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    margin: 0 0 0.4rem;
    padding: 0.35rem 0.45rem 0.35rem 0;
    border: 0;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.06);
    text-align: left;
    cursor: pointer;
    transition: background .12s ease;
}
.bx-msg__reply:hover {
    background: rgba(37, 99, 235, 0.12);
}
.bx-msg--mine .bx-msg__reply {
    background: rgba(37, 99, 235, 0.1);
}
.bx-msg--mine .bx-msg__reply:hover {
    background: rgba(37, 99, 235, 0.16);
}
.bx-msg__reply--deleted {
    cursor: default;
    opacity: 0.75;
    background: rgba(100, 116, 139, 0.08);
}
.bx-msg__reply-bar {
    width: 3px;
    border-radius: 3px;
    background: #2563eb;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 100%;
}
.bx-msg--mine .bx-msg__reply-bar { background: #1d4ed8; }
.bx-msg__reply--deleted .bx-msg__reply-bar { background: #94a3b8; }
.bx-msg__reply-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    padding: 0.05rem 0.2rem 0.05rem 0;
}
.bx-msg__reply-author {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-msg--mine .bx-msg__reply-author { color: #1d4ed8; }
.bx-msg__reply-text {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-msg__forwarded {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0 0.3rem;
    padding: 0;
    color: #5b8def;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25;
}
.bx-msg--mine .bx-msg__forwarded { color: #4a7fd4; }
.bx-msg__forwarded svg {
    flex-shrink: 0;
    opacity: 0.75;
}
.bx-msg__forwarded-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-msg__forwarded-name {
    font-weight: 600;
    color: inherit;
}
.bx-msg__time {
    margin-left: auto;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 400;
    white-space: nowrap;
    padding-top: 0.15rem;
}
.bx-msg--mine .bx-msg__time { color: #7a93b0; }

.bx-msg-actions-sheet .bx-msg-actions__panel {
    width: min(380px, 100%) !important;
    padding: 0.75rem !important;
    border-radius: 16px !important;
    max-height: min(80vh, 560px);
}
.bx-msg-actions__preview {
    margin-bottom: 0.55rem;
}
.bx-msg-actions__preview-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}
.bx-msg-actions__preview-card strong {
    font-size: 0.82rem;
    color: #2563eb;
}
.bx-msg-actions__preview-card span {
    font-size: 0.86rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-msg-actions__list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.bx-msg-actions__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.75rem 0.7rem;
    border-radius: 12px;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.bx-msg-actions__item:hover { background: #f1f5f9; }
.bx-msg-actions__item svg { color: #64748b; flex-shrink: 0; }
.bx-msg-actions__item--danger { color: #dc2626; }
.bx-msg-actions__item--danger svg { color: #dc2626; }
.bx-msg-actions__item--danger:hover { background: #fef2f2; }
.bx-msg-actions__cancel {
    width: 100%;
    margin-top: 0.45rem;
    border: 0;
    border-radius: 12px;
    padding: 0.75rem;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}
.bx-msg-actions__cancel:hover { background: #e2e8f0; }

@media (max-width: 640px) {
    .bx-msg-actions-sheet {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .bx-msg-actions-sheet .bx-msg-actions__panel {
        width: 100% !important;
        max-width: none !important;
        border-radius: 18px 18px 0 0 !important;
        padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}
.bx-msg.is-selected .bx-msg__bubble {
    box-shadow: none;
}
.bx-msg--mine.is-selected .bx-msg__bubble {
    background: #e0edff;
}
.bx-msg--replying .bx-msg__bubble {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}
.bx-msg.is-swiping {
    transition: none !important;
}

.bx-msg__actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .14s ease, transform .14s ease;
    pointer-events: none;
}
.bx-msg:hover .bx-msg__actions,
.bx-msg:focus-within .bx-msg__actions {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
@media (pointer: coarse) {
    .bx-msg__actions {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
    .bx-msg__action span { display: none; }
}
.bx-msg__action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    cursor: pointer;
}
.bx-msg__action:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.bx-msg__files { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; align-items: flex-start; }

.bx-msg__video {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: min(100%, 360px);
    width: 100%;
}
.bx-msg__video video {
    display: block;
    width: 100%;
    max-height: 280px;
    border-radius: 12px;
    background: #0f172a;
    object-fit: contain;
}
.bx-msg__video-name {
    font-size: 0.78rem;
    color: inherit;
    opacity: 0.75;
    text-decoration: none;
    word-break: break-word;
}
.bx-msg__video-name:hover { opacity: 1; text-decoration: underline; }

.bx-messenger .bx-msg__image,
.bx-msg__image {
    display: block !important;
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    flex: 0 0 96px !important;
    border-radius: 10px;
    overflow: hidden !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #e8eef5;
    line-height: 0;
    cursor: zoom-in;
    box-sizing: border-box;
}
.bx-messenger .bx-msg__image img,
.bx-msg__image img {
    display: block !important;
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    object-fit: cover !important;
    object-position: center !important;
}
.bx-msg--mine .bx-msg__image {
    border-color: rgba(34, 197, 94, 0.25);
    background: #e8f5e9;
}

.bx-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.bx-lightbox[hidden] { display: none !important; }
.bx-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.82);
    cursor: zoom-out;
}
.bx-lightbox__panel {
    position: relative;
    z-index: 1;
    max-width: min(960px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}
.bx-lightbox__img {
    max-width: 100%;
    max-height: calc(92vh - 2.5rem);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    background: #0b1220;
}
.bx-lightbox__close {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.bx-lightbox__open {
    color: #e2e8f0;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
}
.bx-lightbox__open:hover { background: rgba(255,255,255,0.14); }
.bx-lightbox__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
}
.bx-lightbox__goto {
    border: 0;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: #2563eb;
    cursor: pointer;
}
.bx-lightbox__goto:hover { background: #1d4ed8; }
.bx-lightbox__goto.d-none { display: none !important; }
body.bx-lightbox-open { overflow: hidden; }

.bx-voice.is-error {
    outline: 1px solid #f87171;
    outline-offset: 2px;
}
.bx-voice.is-error::after {
    content: 'не воспроизводится';
    display: block;
    font-size: 0.68rem;
    color: #b91c1c;
    margin-top: 0.2rem;
}

.bx-sheet {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.bx-sheet[hidden] { display: none !important; }
.bx-sheet__backdrop { position: absolute; inset: 0; border: 0; background: rgba(15, 23, 42, 0.5); }
.bx-sheet__panel {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: min(680px, 90vh);
    overflow: auto;
    padding: 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.3);
}
.bx-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.bx-sheet__close { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: #64748b; }

.bx-msg.is-hold .bx-msg__bubble {
    transform: scale(0.98);
    transition: transform .12s ease;
}
/* Long-press на тач-устройствах: без callout; текст в bubble можно выделять */
.bx-messenger__feed .bx-msg:not(.bx-msg--system) {
    -webkit-touch-callout: default;
    touch-action: pan-y;
}
.bx-msg__body,
.bx-msg__body *,
.bx-msg__meta,
.bx-msg__meta *,
.bx-msg__forwarded,
.bx-msg__forwarded *,
.bx-msg__time,
.tw-msg__body,
.tw-msg__body *,
.tw-description,
.tw-description *,
.tw-codeblock,
.tw-codeblock *,
pre.ql-syntax,
.tw-inline-code {
    -webkit-user-select: text !important;
    user-select: text !important;
    cursor: text;
}
.bx-messenger__feed.is-press-hold {
    touch-action: none;
    overflow: hidden;
}
.bx-messenger__feed.is-press-hold .bx-msg:not(.bx-msg--system) {
    touch-action: none;
}
.bx-messenger.is-selecting .bx-msg:not(.bx-msg--system) {
    cursor: pointer;
}
@media (pointer: coarse) {
    .bx-msg__check {
        opacity: 0.35;
        pointer-events: auto;
    }
    .bx-messenger.is-selecting .bx-msg__check,
    .bx-msg.is-selected .bx-msg__check {
        opacity: 1;
    }
    .bx-selection-bar {
        position: sticky;
        bottom: 0;
        z-index: 5;
        padding: 0.65rem 0.8rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    }
    .bx-selection-bar .btn,
    .bx-selection-bar__btn {
        min-height: 44px;
    }
}
.bx-messenger.is-selecting .bx-msg,
.bx-messenger.is-selecting .bx-msg__body,
.bx-messenger.is-selecting .bx-msg__body *,
.bx-msg.is-hold,
.bx-msg.is-hold .bx-msg__body,
.bx-msg.is-hold .bx-msg__body * {
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: pointer;
}

.bx-forward-search {
    padding: 0 0 0.65rem;
}
.bx-forward-search__input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
}
.bx-forward-search__input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.bx-forward-sheet__panel {
    width: min(420px, 100%) !important;
    max-height: min(78vh, 640px);
    display: flex;
    flex-direction: column;
}
.bx-forward-preview {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    max-height: 140px;
    overflow: auto;
}
.bx-forward-preview[hidden] { display: none !important; }
.bx-forward-preview__item {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eef2f7;
}
.bx-forward-preview__item:last-child { border-bottom: 0; }
.bx-forward-preview__item strong {
    font-size: 0.75rem;
    color: #2563eb;
}
.bx-forward-preview__item span {
    font-size: 0.8rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-forward-preview__more {
    font-size: 0.75rem;
    color: #94a3b8;
    padding-top: 0.15rem;
}
.bx-forward-chats {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow: auto;
    flex: 1 1 auto;
}
.bx-forward-chat {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 0.55rem 0.65rem;
    text-align: left;
    width: 100%;
    cursor: pointer;
}
.bx-forward-chat:hover {
    background: #f8fafc;
    border-color: #93c5fd;
}
.bx-forward-chat__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.bx-forward-chat__title {
    font-weight: 650;
    font-size: 0.92rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-forward-chat__sub {
    font-size: 0.78rem;
    color: #64748b;
}
.bx-forward-empty {
    color: #94a3b8;
    font-size: 0.88rem;
    padding: 1rem 0.25rem;
    text-align: center;
}

.bx-media-sheet__panel { width: min(760px, 100%); }
/* legacy media classes kept for safety — UI uses .bx-shared-* */

.bx-task-card {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.45rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
    color: inherit;
}

.bx-task-card__id {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.8rem;
}

.bx-task-card__name { font-size: 0.85rem; }
.bx-task-card--locked {
    opacity: 0.72;
    cursor: not-allowed;
}
.bx-task-card__lock {
    margin-left: auto;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Custom chat composer */
.bx-composer {
    flex-shrink: 0;
    border-top: 1px solid #e6eaf0;
    background: #fff;
    padding: 0.65rem 0.85rem 0.8rem;
}

.bx-composer__reply {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    background: #f1f5f9;
    border: 0;
    border-radius: 12px;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.45rem;
    animation: bx-reply-in .16s ease;
}
@keyframes bx-reply-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.bx-composer__reply.d-none { display: none !important; }
.bx-composer__reply-bar {
    width: 3px;
    border-radius: 3px;
    background: #2563eb;
    flex-shrink: 0;
}
.bx-composer__reply-jump {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.bx-composer__reply-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}
.bx-composer__reply-label strong { font-weight: 800; }
.bx-composer__reply-preview {
    font-size: 0.8rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}
.bx-composer.is-dimmed {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.15);
}

.bx-composer__box {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.45rem 0.55rem 0.4rem;
    transition: border-color .15s ease, box-shadow .15s ease;
    position: relative;
}

.bx-composer__box:focus-within {
    border-color: #e2e8f0;
    box-shadow: none;
    background: #f8fafc;
}

.bx-composer__input:focus,
.bx-composer__input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.bx-composer__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.15rem;
}

.bx-composer__tools {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    position: relative;
}

.bx-composer__tool,
.bx-composer__icon-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
}

.bx-composer__tool:hover,
.bx-composer__icon-btn:hover {
    background: #e8eef7;
    color: #1e293b;
}

.bx-composer__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.bx-composer__files-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: min(100%, 420px);
    justify-content: flex-end;
}

.bx-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 140px;
    padding: 0.15rem 0.35rem 0.15rem 0.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.72rem;
    color: #334155;
}

.bx-file-chip img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.bx-file-chip__ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    background: #e2e8f0;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.bx-file-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bx-file-chip__rm {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.1rem;
}

.bx-file-chip__rm:hover { color: #ef4444; }

.bx-composer__files-label {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.bx-composer__send {
    border: 0;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    cursor: pointer;
    transition: background .15s ease;
}

.bx-composer__send:hover {
    background: #1d4ed8;
}

.bx-composer__dropdown {
    position: relative;
}

.bx-composer__menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 0.55rem;
    z-index: 20;
}

.bx-composer__menu.is-open { display: block; }

.bx-composer__menu-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.bx-composer__select {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.84rem;
    padding: 0.35rem 0.45rem;
    background: #fff;
}

.bx-composer__hint {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

/* Code blocks - dark readable */
.tw-codeblock {
    margin: 0.55rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1e293b;
    background: #0b1220;
}

.tw-codeblock__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    background: #111827;
    color: #94a3b8;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tw-code-copy {
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
}

.tw-codeblock pre {
    margin: 0 !important;
    padding: 0.85rem 1rem !important;
    overflow: auto;
    max-height: 420px;
    background: #0b1220 !important;
}

.tw-codeblock code,
.tw-codeblock .hljs {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #e5e7eb !important;
    background: transparent !important;
    white-space: pre !important;
    padding: 0 !important;
}

.tw-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.05rem 0.3rem;
    color: #b91c1c;
}

.bx-msg__deleted {
    color: #94a3b8;
    font-style: italic;
}

/* Quill editor code preview */
.ql-editor pre.ql-syntax {
    background: #0b1220 !important;
    color: #e5e7eb !important;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    overflow: auto;
}

@media (max-width: 520px) {
    .bx-sidebar-action span { display: none; }
    .bx-sidebar-action { padding: 0.4rem; }
    .bx-sidebar-action .bx-icon { width: 16px; height: 16px; }
}

@media (max-width: 900px) {
    body.bx-messenger-mobile .command-bar-wrapper,
    body.bx-messenger-mobile .command-bar {
        display: none !important;
    }
    body.bx-messenger-mobile:not(.bx-messenger-page) main .container-fluid,
    body.bx-messenger-mobile:not(.bx-messenger-page) .layout .wrapper > .content,
    body.bx-messenger-mobile:not(.bx-messenger-page) .workspace {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }
    body.bx-messenger-page.bx-messenger-mobile .workspace,
    body.bx-messenger-page.bx-messenger-mobile .bx-messenger-workspace-wrap,
    body.bx-messenger-page.bx-messenger-mobile #post-form,
    body.bx-messenger-page.bx-messenger-mobile > .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.bx-messenger-mobile h1,
    body.bx-messenger-mobile .page-header,
    body.bx-messenger-mobile .header-bar .btn-link {
        font-size: 1rem;
    }

    .bx-messenger {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
        height: calc(100dvh - 56px);
        max-height: calc(100dvh - 56px);
        min-height: 0;
        border-radius: 10px;
        margin-bottom: 0;
    }
    body.bx-messenger-page .bx-messenger {
        height: calc(100dvh - 48px);
        max-height: calc(100dvh - 48px);
        width: 100%;
        max-width: none;
        border-radius: 0;
    }
    .bx-messenger.is-chat-open .bx-messenger__sidebar {
        display: none !important;
    }
    .bx-messenger.is-list-open .bx-messenger__main {
        display: none !important;
    }
    .bx-messenger__sidebar {
        max-height: none;
        height: 100%;
        border-right: 0;
        border-bottom: 0;
    }
    .bx-messenger__header {
        flex-wrap: nowrap;
        gap: 0.4rem;
        padding: 0.55rem 0.65rem;
        align-items: center;
        overflow: visible;
        position: relative;
        z-index: 60;
    }
    .bx-messenger__header-main {
        min-width: 0;
        flex: 1 1 auto;
        gap: 0.45rem;
    }
    .bx-messenger__header-main h2,
    .bx-messenger__header-main .h5 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 46vw;
    }
    .bx-back-chat {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        color: #334155;
        background: #f1f5f9;
        flex-shrink: 0;
        text-decoration: none !important;
    }
    .bx-messenger__header-actions {
        width: auto;
        flex-shrink: 0;
        gap: 0.25rem;
        overflow: visible;
        max-width: none;
    }
    .bx-header-menu {
        position: static;
    }
    .bx-header-menu__drop {
        position: absolute;
        top: calc(100% + 4px);
        right: 0.55rem;
        left: auto;
        z-index: 80;
        min-width: min(260px, calc(100vw - 1.2rem));
        max-height: min(70dvh, 420px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bx-notify-vol span:last-child,
    .bx-mute-btn span { display: none; }
    .bx-notify-vol input[type="range"] { width: 64px; }
    .bx-composer {
        padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
    }
    .bx-composer__input {
        font-size: 16px; /* без автозума iOS */
        min-height: 40px;
    }
    .bx-composer__toolbar {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }
    .bx-composer__send {
        min-height: 42px;
        padding: 0.45rem 0.85rem;
    }
    .bx-composer__tool {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    .bx-messenger__feed {
        padding: 0.35rem 0 0.55rem;
    }
    .bx-msg {
        max-width: 100%;
        padding-left: 2.35rem;
        padding-right: 0.45rem;
    }
    .bx-msg--mine {
        padding-left: 2.35rem;
        padding-right: 0.45rem;
    }
    .bx-msg__bubble {
        max-width: min(100%, calc(100vw - 4.5rem));
    }
    .bx-voice {
        max-width: 100%;
        min-width: 0;
    }
    .bx-voice-record {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }
    .bx-voice-record__mic .bx-mic-select {
        max-width: none;
        width: 100%;
    }
    .bx-voice-record__actions {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
    }
    .bx-voice-record__btn {
        width: 100%;
        min-height: 44px;
    }
    .bx-mic-gate__card {
        width: min(100%, 94vw);
        max-height: 90dvh;
        overflow: auto;
    }
    .bx-members-modal__dialog {
        width: min(100%, 96vw);
        max-height: 88dvh;
    }
    .bx-feed-older {
        padding: 0.35rem 0 0.55rem;
    }
}

.bx-back-chat {
    display: none;
    align-items: center;
    justify-content: center;
}

.bx-feed-older {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0 0.65rem;
}
.bx-feed-newer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0 0.35rem;
}
.bx-feed-newer.d-none { display: none !important; }
.bx-feed-newer__spin {
    font-size: 0.8rem;
    color: #94a3b8;
}
.bx-feed-older__btn {
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.bx-feed-older__btn:active { transform: scale(0.98); }
.bx-feed-older__spin {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ===== Calls (LiveKit) ===== */
.bx-incoming-call {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2200;
}
.bx-incoming-call[hidden] { display: none !important; }
.bx-incoming-call__card {
    width: min(360px, calc(100vw - 2rem));
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    animation: bx-call-pop 0.28s ease;
}
@keyframes bx-call-pop {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.bx-incoming-call__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.bx-incoming-call__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: #334155;
}
.bx-incoming-call__avatar img,
.bx-incoming-call__avatar span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.bx-incoming-call__title { font-weight: 700; font-size: 1rem; }
.bx-incoming-call__sub { margin-top: 0.25rem; color: #94a3b8; font-size: 0.86rem; }
.bx-incoming-call__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.bx-active-call-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.86rem;
}
.bx-active-call-bar[hidden] { display: none !important; }
.bx-active-call-bar__actions { display: flex; gap: 0.4rem; }

.bx-call-stage {
    position: fixed;
    inset: 0;
    z-index: 2300;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(34, 197, 94, 0.08), transparent 50%),
        #0b1220;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
}
.bx-call-stage[hidden] { display: none !important; }
.bx-call-stage__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.bx-call-stage__title { font-weight: 700; }
.bx-call-stage__secure {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #86efac;
}
.bx-call-stage__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.bx-call-stage__count {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    font-size: 0.8rem;
}
.bx-call-stage__timer { font-size: 0.95rem; }
.bx-call-stage__body {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}
.bx-call-focus {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.65rem;
}
.bx-call-stage.screen-expanded .bx-call-focus {
    display: block;
}
.bx-call-stage.screen-expanded .bx-call-stage__grid {
    display: none;
}
.bx-call-focus .bx-call-tile.is-screen {
    width: 100%;
    height: 100%;
    min-height: 220px;
    aspect-ratio: auto;
}
.bx-call-pip-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}
.bx-call-tile.is-pip {
    position: absolute;
    width: min(220px, 42vw);
    aspect-ratio: 16 / 10;
    min-height: 0;
    pointer-events: auto;
    cursor: grab;
    z-index: 7;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(226, 232, 240, 0.35);
}
.bx-call-tile.is-pip.is-dragging { cursor: grabbing; }
.bx-call-strip-wrap {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.55);
    padding: 0.45rem 0.65rem 0.55rem;
}
.bx-call-strip-wrap[hidden] { display: none !important; }
.bx-call-strip-wrap.is-collapsed .bx-call-strip { display: none; }
.bx-call-strip-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    cursor: pointer;
    margin-bottom: 0.4rem;
}
.bx-call-strip {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}
.bx-call-strip .bx-call-tile {
    flex: 0 0 auto;
    width: 150px;
    min-height: 96px;
    aspect-ratio: 16 / 10;
}
.bx-call-stage__grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
    overflow: auto;
    align-content: center;
}
.bx-call-stage.has-screen .bx-call-stage__grid {
    display: grid;
}
.bx-call-tile {
    position: relative;
    background: linear-gradient(160deg, #1e293b, #0f172a);
    border-radius: 16px;
    overflow: hidden;
    min-height: 180px;
    aspect-ratio: 16 / 10;
    border: 2px solid transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.bx-call-tile.is-speaking {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25), 0 8px 28px rgba(34, 197, 94, 0.15);
}
.bx-call-tile.is-speaking .bx-call-tile__pulse {
    opacity: 1;
}
.bx-call-tile__pulse {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    opacity: 0;
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.45);
    transition: opacity 0.2s ease;
}
.bx-call-tile__avatar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.bx-call-tile__avatar img,
.bx-call-tile__avatar span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.bx-call-tile__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.2s ease;
}
.bx-call-tile__video.is-on { opacity: 1; }
.bx-call-tile.has-video .bx-call-tile__avatar { opacity: 0; pointer-events: none; }
.bx-call-tile__audio { display: none; }
.bx-call-tile__shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(transparent, rgba(2, 6, 23, 0.75));
    z-index: 3;
    pointer-events: none;
}
.bx-call-tile__name {
    background: rgba(15, 23, 42, 0.72);
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.8rem;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bx-call-tile__footer {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.45rem;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.bx-call-tile__vol {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    padding: 0.15rem 0.45rem 0.15rem 0.35rem;
    margin: 0;
    cursor: pointer;
}
.bx-call-tile__vol[hidden] { display: none !important; }
.bx-call-tile__vol-ico {
    font-size: 0.72rem;
    opacity: 0.85;
}
.bx-call-tile__vol-range {
    width: 72px;
    accent-color: #22c55e;
    cursor: pointer;
}
.bx-call-tile__vol-val {
    font-size: 0.68rem;
    color: #cbd5e1;
    min-width: 2.2rem;
    text-align: right;
}
.bx-call-tile.is-screen {
    aspect-ratio: 16 / 10;
    min-height: 160px;
    order: 0;
    grid-column: auto;
}
.bx-call-tile__fs {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.bx-call-tile__fs[hidden] { display: none !important; }
.bx-call-tile__fs:hover { background: rgba(30, 41, 59, 0.95); }
.bx-call-tile__screen-ico {
    width: 88px !important;
    height: 88px !important;
    border-radius: 20px !important;
    background: #1e293b;
    font-size: 2rem !important;
    color: #94a3b8 !important;
}
.bx-call-devices {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
}
.bx-call-devices[hidden] { display: none !important; }
.bx-call-devices__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.bx-call-devices__head strong { font-size: 0.95rem; }
.bx-call-devices__close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.bx-call-devices__close:hover { background: rgba(148, 163, 184, 0.12); color: #e2e8f0; }
.bx-call-devices__row {
    display: grid;
    grid-template-columns: 36px 88px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.84rem;
    color: #cbd5e1;
}
.bx-call-devices__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
}
.bx-call-devices__label { color: #94a3b8; }
.bx-call-devices__row select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
}
.bx-call-devices__guest {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.bx-call-devices__guest[hidden] { display: none !important; }
.bx-call-devices__guest-title { font-weight: 650; margin-bottom: 0.25rem; }
.bx-call-devices__guest-hint {
    margin: 0 0 0.65rem;
    color: #94a3b8;
    font-size: 0.8rem;
}
.bx-call-devices__guest-row {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}
.bx-call-devices__guest-row input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
}
.bx-call-devices__guest-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.bx-call-devices__btn {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.8rem;
    cursor: pointer;
}
.bx-call-devices__btn--accent { background: #15803d; }
.bx-call-devices__btn--mute { background: #7f1d1d; }
.bx-call-stage__bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.95rem 1rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(10px);
}
.bx-call-ctrl {
    border: 0;
    border-radius: 999px;
    width: 52px;
    height: 52px;
    padding: 0;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    position: relative;
}
.bx-call-ctrl__ico { display: none; line-height: 0; }
.bx-call-ctrl__ico--on { display: inline-flex; }
.bx-call-ctrl.is-off .bx-call-ctrl__ico--on { display: none; }
.bx-call-ctrl.is-off .bx-call-ctrl__ico--off { display: inline-flex; }
.bx-call-ctrl:hover { background: #334155; }
.bx-call-ctrl:active { transform: scale(0.96); }
.bx-call-ctrl.is-off { background: #7f1d1d; box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.25); }
.bx-call-ctrl.is-on { background: #15803d; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.bx-call-ctrl--danger { background: #dc2626; width: auto; min-width: 52px; padding: 0 1rem; }
.bx-call-ctrl--danger:hover { background: #ef4444; }
.bx-call-ctrl--end-all {
    background: #9a3412;
    width: auto;
    padding: 0 0.9rem;
}
.bx-call-ctrl__txt { font-size: 0.78rem; font-weight: 650; }
body.bx-call-open { overflow: hidden; }

@media (max-width: 900px) {
    .bx-incoming-call { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
    .bx-call-stage__grid { grid-template-columns: 1fr; }
    .bx-call-tile { min-height: 200px; aspect-ratio: 4 / 3; }
    .bx-call-tile__vol-range { width: 56px; }
    .bx-call-devices__row { grid-template-columns: 36px 1fr; }
    .bx-call-devices__label { grid-column: 2; }
    .bx-call-devices__row select { grid-column: 1 / -1; }
    .bx-call-ctrl { width: 48px; height: 48px; min-height: 48px; }
}
@media (min-width: 901px) {
    .bx-call-stage__grid:has(.bx-call-tile:only-child) {
        grid-template-columns: minmax(280px, 640px);
        justify-content: center;
    }
    .bx-call-stage__grid:has(.bx-call-tile:nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

/* ========== Yandex Tracker–like: issue / board / sprints / workflow ========== */
.yt-issue-head {
    margin-bottom: 1rem;
    padding: 0.15rem 0 0.85rem;
    border-bottom: 1px solid var(--tw-line, #e6eaf0);
}
.yt-issue-head__top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.45rem;
}
.yt-issue-key {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    text-transform: uppercase;
}
.yt-issue-queue,
.yt-issue-sprint {
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.yt-issue-head__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}
.yt-issue-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    margin: 0;
    flex: 1 1 240px;
}
.yt-status-dd { position: relative; }
.yt-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.84rem;
    font-weight: 650;
    color: #fff;
    background: var(--st, #64748b);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.yt-status-pill.is-interactive { cursor: pointer; }
.yt-status-pill:disabled { opacity: 0.95; cursor: default; }
.yt-status-pill__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.85);
}
.yt-status-pill__caret { opacity: .85; font-size: 0.7rem; }
.yt-status-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    padding: 0.4rem;
}
.yt-status-menu__label {
    font-size: 0.72rem;
    color: #64748b;
    padding: 0.35rem 0.55rem 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.yt-status-menu__item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border-radius: 7px;
    font-size: 0.86rem;
    color: #0f172a;
}
.yt-status-menu__item:hover { background: #f1f5f9; }
.yt-status-menu__dot {
    width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
}
.yt-inline-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 650;
}
.yt-inline-status::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--st, #64748b);
}

.yt-board { margin: 0 0 1rem; }
.yt-board__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}
.yt-board__board-switch,
.yt-board__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.yt-board__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.yt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    text-decoration: none;
}
.yt-chip:hover { background: #f8fafc; color: #0f172a; }
.yt-chip.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 650;
}
.yt-chip__meta {
    font-size: 0.7rem;
    color: #64748b;
}

/* Горизонтальный скролл колонок — полоса внизу как в Трекере */
.yt-board__viewport {
    width: 100%;
    max-width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #e2e8f0;
}
.yt-board__viewport::-webkit-scrollbar {
    height: 10px;
}
.yt-board__viewport::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
}
.yt-board__viewport::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
}
.yt-board__viewport::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.yt-board__cols {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: max-content;
    min-width: 100%;
    min-height: 58vh;
    align-items: stretch;
    padding: 0.15rem 0.15rem 0.35rem;
    box-sizing: border-box;
}
.yt-col {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
    background: #f1f5f9;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
    min-height: 320px;
}
.yt-col__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.75rem 0.45rem;
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 2;
    border-radius: 12px 12px 0 0;
}
.yt-col__dot {
    width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
}
.yt-col__title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    flex: 1 1 auto;
}
.yt-col__count,
.yt-col__wip {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 650;
}
.yt-col__list {
    padding: 0.35rem 0.55rem 0.75rem;
    overflow-y: auto;
    min-height: 120px;
    flex: 1 1 auto;
}
.yt-col__list.is-over {
    outline: 2px dashed #60a5fa;
    outline-offset: -4px;
    background: #e0f2fe;
}
.yt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.7rem 0.55rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: grab;
}
.yt-card.is-dragging { opacity: 0.55; }
.yt-card__key {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}
.yt-card__title {
    display: block;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.55rem;
}
.yt-card__title:hover,
.yt-card__key:hover { color: #1d4ed8; }
.yt-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}
.yt-card__prio {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}
.yt-card__prio--critical,
.yt-card__prio--high { color: #dc2626; }
.yt-card__assignee {
    width: 24px; height: 24px; border-radius: 50%;
    background: #dbeafe; color: #1d4ed8;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700;
}
.yt-empty, .yt-empty-sm {
    color: #64748b;
    padding: 1.5rem;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.yt-empty-sm { padding: 1rem; font-size: 0.86rem; }

.yt-sprints__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 260px);
    gap: 0.85rem;
    align-items: start;
}
@media (max-width: 1100px) {
    .yt-sprints__grid { grid-template-columns: 1fr; }
}
.yt-sprint-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}
.yt-sprint-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.55rem;
    border-bottom: 1px solid #e2e8f0;
}
.yt-sprint-panel__head h3 {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.yt-sprint-panel__list {
    padding: 0.65rem;
    flex: 1 1 auto;
    min-height: 240px;
}
.yt-sprint-panel__list.is-over {
    background: #e0f2fe;
    outline: 2px dashed #60a5fa;
    outline-offset: -6px;
}
.yt-sprint-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #15803d;
    background: #dcfce7;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}
.yt-sprint-task {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.45rem;
    cursor: grab;
}
.yt-sprint-task.is-dragging { opacity: 0.5; }
.yt-sprint-task__key {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
}
.yt-sprint-task__name {
    display: block;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    margin: 0.15rem 0 0.35rem;
}
.yt-sprint-task__status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #475569;
}
.yt-sprint-task__status::before {
    content: "";
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--st, #64748b);
}
.yt-sprint-task__user {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.yt-sprint-side h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 0 0 0.55rem;
}
.yt-sprint-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.55rem;
}
.yt-sprint-card--closed { opacity: 0.72; }
.yt-sprint-card__name { font-weight: 700; font-size: 0.9rem; }
.yt-muted { color: #64748b; margin: 0; }

.yt-workflow__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.yt-workflow__canvas-wrap {
    position: relative;
    min-height: 620px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(148,163,184,.12) 1px, transparent 1px),
        linear-gradient(rgba(148,163,184,.12) 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: #f8fafc;
    overflow: auto;
}
.yt-workflow__edges {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.yt-workflow__edges .yt-wf-edge {
    fill: none;
    stroke: #64748b;
    stroke-width: 2;
    pointer-events: stroke;
    cursor: pointer;
}
.yt-workflow__canvas {
    position: relative;
    min-width: 900px;
    min-height: 620px;
    z-index: 2;
}
.yt-wf-node {
    position: absolute;
    width: 168px;
    min-height: 64px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}
.yt-wf-node.is-initial { box-shadow: 0 0 0 2px #93c5fd; }
.yt-wf-node.is-final { box-shadow: 0 0 0 2px #86efac; }
.yt-wf-node.is-link-from { outline: 2px solid #f59e0b; }
.yt-workflow.is-link-mode .yt-wf-node { cursor: crosshair; }
.yt-wf-node__bar {
    height: 6px;
    background: var(--c, #64748b);
}
.yt-wf-node__name {
    padding: 0.45rem 0.55rem 0.2rem;
    font-size: 0.84rem;
    font-weight: 700;
    outline: none;
}
.yt-wf-node__meta {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0.45rem 0.45rem;
    align-items: center;
}
.yt-wf-node__cat {
    flex: 1 1 auto;
    font-size: 0.68rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.15rem;
    background: #f8fafc;
}
.yt-wf-node__color {
    width: 22px; height: 22px; padding: 0; border: 0; background: transparent;
}
.yt-wf-node__del {
    border: 0; background: transparent; color: #94a3b8; font-size: 1rem; line-height: 1;
    padding: 0 0.2rem; cursor: pointer;
}
.yt-wf-node__del:hover { color: #dc2626; }

/* ===== Board filters (Tracker-like) ===== */
.yt-board__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}
.yt-board__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    color: #64748b;
}
.yt-board__count { font-weight: 650; color: #334155; }
.yt-board__hint {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
}
.yt-filters {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.9rem 0.85rem;
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.yt-board__gap {
    height: 1.75rem;
    flex: 0 0 auto;
}
.yt-filters__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}
.yt-filters__search {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 360px;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #64748b;
}
.yt-filters__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #0f172a;
}
.yt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #475569;
    cursor: pointer;
    padding: 0;
}
.yt-icon-btn:hover { background: #f8fafc; color: #0f172a; }
.yt-icon-btn.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.yt-icon-btn--sm { width: 32px; height: 32px; }
.yt-filters__params {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0 0.65rem;
    border-top: 1px solid #f1f5f9;
}
.yt-filters__params[hidden] { display: none !important; }
.yt-fchip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.15rem 0.25rem 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
}
.yt-fchip.has-value {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.yt-fchip__name {
    white-space: nowrap;
    opacity: 0.85;
}
.yt-fchip__select {
    max-width: 140px;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 650;
    color: inherit;
    outline: none;
    cursor: pointer;
    padding: 0.2rem 0.15rem;
}
.yt-fchip__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}
.yt-fchip__clear:hover { opacity: 1; background: rgba(15, 23, 42, 0.06); }
.yt-filters__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.7rem;
    margin-top: 0.15rem;
    border-top: 1px solid #f1f5f9;
}
.yt-filters__bottom-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    flex: 0 0 auto;
}
.yt-sprint-select select {
    min-width: 180px;
    max-width: 280px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    padding: 0.4rem 0.85rem;
    font-size: 0.84rem;
    color: #0f172a;
}
.yt-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 240px;
}
.yt-qf {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yt-qf:hover { background: #f8fafc; color: #0f172a; }
.yt-qf.is-active {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}
.yt-manage-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.yt-manage-filter-row:last-child { border-bottom: 0; }
.yt-manage-filter-row__name { font-weight: 650; color: #0f172a; }
.yt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 8px;
    padding: 0.42rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 650;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}
.yt-btn--sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 999px;
}
.yt-btn--primary {
    background: #2563eb;
    color: #fff;
}
.yt-btn--primary:hover { background: #1d4ed8; color: #fff; }
.yt-btn--ghost {
    background: #fff;
    border-color: #dbe3ef;
    color: #475569;
}
.yt-btn--ghost:hover { background: #f8fafc; color: #0f172a; }
.yt-btn--flat {
    background: transparent;
    border-color: transparent;
    color: #475569;
}
.yt-btn--flat:hover { background: #f1f5f9; color: #0f172a; }
.yt-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.yt-filter-chip:hover { background: #fff; color: #0f172a; }
.yt-filter-chip.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.yt-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}
.yt-card__type {
    font-size: 0.62rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.03em;
}
.yt-card__type--bug { color: #dc2626; }
.yt-card__type--feature { color: #2563eb; }
.yt-card__assignee.bx-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}
.yt-board--readonly .yt-card { cursor: default; }
