:root {
        --sb-width: 268px;
        --sb-width-collapsed: 76px;
        /* дизайн-система EK-office (#448): тёмные панели #5f6266, зелёный акцент */
        --oo-radius-sm: 4px;
        --oo-radius: 6px;
        --oo-radius-lg: 8px;
        --oo-brand-400: #059669;
        --oo-brand-500: #059669;
        --oo-brand-600: #047857;
        --oo-brand-bg: rgba(5, 150, 105, .1);
        --oo-sidebar: #5f6266;
        --oo-topbar: #5f6266;
        --oo-topbar-h: 56px;
        --oo-panel-border: #6a6d75;
        --oo-danger: #dc2626;
        --oo-text-muted: #9ca3af;
        --oo-mono: 'Roboto Mono', 'JetBrains Mono', ui-monospace, monospace;
        --grad: linear-gradient(135deg, #059669, #047857);
        --sb-bg: var(--oo-sidebar);
        --sb-bg-soft: #6a6d75;
        --sb-fg: #cbd5e1;
        --sb-fg-muted: #9ca3af;
        --sb-active: rgba(5, 150, 105, .2);
        --sb-accent: #34d399;
    }

    .app-shell {
        display: flex;
        min-height: 100vh;
    }

    /* ── сайдбар ─────────────────────────────────────────────────────────── */
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--sb-width);
        display: flex;
        flex-direction: column;
        background: var(--sb-bg);
        color: var(--sb-fg);
        z-index: 1045;
        transition: width .18s ease, transform .22s ease;
    }

    .app-sidebar__brand {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: 0 .9rem;
        border-bottom: 1px solid var(--oo-panel-border);
        height: var(--oo-topbar-h);
        min-height: var(--oo-topbar-h);
    }

    .app-sidebar__brand .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        flex: 0 0 auto;
        background: var(--grad);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 800;
        font-size: 13px;
        letter-spacing: -.5px;
    }

    .app-sidebar__brand-text {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
        overflow: hidden;
        white-space: nowrap;
    }

    .app-sidebar__brand-text strong {
        color: #fff;
        font-size: 1rem;
    }

    .app-sidebar__brand-text small {
        color: var(--sb-fg-muted);
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .app-sidebar__collapse {
        margin-left: auto;
        border: 0;
        background: transparent;
        color: var(--sb-fg-muted);
        padding: .25rem .35rem;
        border-radius: 6px;
        line-height: 1;
    }

    .app-sidebar__collapse:hover {
        color: #fff;
        background: rgba(255, 255, 255, .06);
    }

    .app-sidebar__nav {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        padding: .5rem .45rem 1rem;
        scrollbar-width: thin;
    }

    .app-sidebar__nav::-webkit-scrollbar {
        width: 6px;
    }

    .app-sidebar__nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, .12);
        border-radius: 3px;
    }

    .app-nav-link,
    .app-nav-toggle {
        display: flex;
        align-items: center;
        gap: .65rem;
        width: 100%;
        padding: .55rem .7rem;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--sb-fg);
        font-size: .92rem;
        text-align: left;
        text-decoration: none;
        line-height: 1.25;
        white-space: nowrap;
    }

    .app-nav-link:hover,
    .app-nav-toggle:hover {
        background: rgba(255, 255, 255, .05);
        color: #fff;
    }

    .app-nav-link.is-active {
        background: var(--sb-active);
        color: #34d399;
        box-shadow: inset 3px 0 0 var(--sb-accent);
    }

    .app-nav-link i,
    .app-nav-toggle i.bi {
        font-size: 1.05rem;
        width: 1.3rem;
        text-align: center;
        flex: 0 0 auto;
        color: var(--sb-fg-muted);
    }

    .app-nav-link:hover i,
    .app-nav-toggle:hover i.bi {
        color: #34d399;
    }

    .app-nav-link.is-active i {
        color: #34d399;
    }

    .app-nav-toggle__chevron {
        margin-left: auto;
        font-size: .8rem !important;
        transition: transform .18s ease;
        opacity: .65;
    }

    .app-nav-group.is-open > .app-nav-toggle .app-nav-toggle__chevron {
        transform: rotate(90deg);
    }

    .app-nav-group.is-open > .app-nav-toggle {
        color: #fff;
    }

    .app-nav-sub {
        display: none;
        padding: .1rem 0 .35rem .35rem;
        margin-left: .55rem;
        border-left: 1px solid rgba(255, 255, 255, .08);
    }

    .app-nav-group.is-open > .app-nav-sub {
        display: block;
    }

    .app-nav-link--sub {
        font-size: .88rem;
        padding: .4rem .6rem;
        color: var(--sb-fg-muted);
    }

    .app-nav-link--sub:hover {
        color: #fff;
    }

    .app-nav-link--sub.is-active {
        color: #34d399;
        background: var(--sb-active);
        box-shadow: inset 3px 0 0 var(--sb-accent);
    }

    .app-nav-sub__title {
        padding: .35rem .6rem .2rem;
        font-size: .72rem;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #8b979f;
    }

    .app-sidebar__footer {
        padding: .6rem .7rem 1rem;
        border-top: 1px solid var(--oo-panel-border);
        font-size: .85rem;
    }

    .app-sidebar__footer a {
        display: flex;
        align-items: center;
        gap: .6rem;
        color: var(--sb-fg-muted);
        text-decoration: none;
        padding: .45rem .55rem;
        border-radius: 8px;
        white-space: nowrap;
    }

    .app-sidebar__footer a:hover {
        color: #fff;
        background: rgba(255, 255, 255, .05);
    }

    /* Профиль и «Выход» — только в правом верхнем углу: дубль в левом нижнем убран. */

    /* ── контент ─────────────────────────────────────────────────────────── */
    .app-main {
        flex: 1 1 auto;
        min-width: 0;
        margin-left: var(--sb-width);
        transition: margin-left .18s ease;
        display: flex;
        flex-direction: column;
    }

    .app-main__inner {
        flex: 1 1 auto;
        min-width: 0;
        min-height: calc(100vh - 57px);
    }

    /* Контентная область. Раньше контент лежал в «белом листе» m-5 p-5 bg-white shadow
       внутри big-form.blade.php — лист убран 01.11.2026, отступы даёт этот класс.
       Фон страницы (--oo-bg) приходит из дизайн-системы, тело уже окрашено. */
    .ek-main {
        padding: 20px 24px 40px;
        min-height: calc(100vh - var(--oo-topbar-h));
    }

    @media (max-width: 767.98px) {
        .ek-main {
            padding: 14px 14px 28px;
        }
    }

    /* Панель быстрых действий дублировала навигацию — её пункты теперь в сайдбаре,
       а поиск и колокольчик переехали в верхнюю панель. */
    .app-main__inner > .bg-secondary {
        display: none !important;
    }

    /* ── topbar: тёмная панель, крошки, поиск, колокольчик ─────────────── */
    .app-topbar {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: 0 1.25rem;
        height: var(--oo-topbar-h);
        background: var(--oo-topbar);
        border-bottom: 1px solid var(--oo-panel-border);
        color: var(--sb-fg);
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .app-topbar__crumbs {
        display: flex;
        align-items: center;
        gap: .4rem;
        font-size: 13px;
        color: var(--sb-fg-muted);
        min-width: 0;
    }

    .app-topbar__crumbs-sep {
        color: var(--sb-fg-muted);
        opacity: .7;
    }

    .app-topbar__title {
        margin: 0;
        color: #fff;
        font-weight: 700;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .app-topbar__actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: .5rem;
    }

    /* ── вход в ИИ-ассистент: «живой» значок ────────────────────────────────── */
    .app-topbar__ai {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        text-decoration: none;
        color: #fff;
        flex: 0 0 auto;
        transition: transform .18s ease, box-shadow .18s ease;
    }

    .app-topbar__ai-orb {
        position: relative;
        z-index: 1;
        width: 30px;
        height: 30px;
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        background-image: linear-gradient(135deg, #34d399, #047857);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 12px rgba(5, 150, 105, .35);
        animation: ai-orb-breathe 4.2s ease-in-out infinite;
    }

    .app-topbar__ai-orb i {
        animation: ai-orb-twinkle 4.2s ease-in-out infinite;
    }

    /* «маячок» — расходящееся кольцо, но не поверх интерфейса: только внутри кнопки */
    .app-topbar__ai::after {
        content: '';
        position: absolute;
        inset: 2px;
        border-radius: 10px;
        border: 1px solid rgba(52, 211, 153, .55);
        opacity: 0;
        animation: ai-orb-ping 4.2s ease-out infinite;
        pointer-events: none;
    }

    .app-topbar__ai:hover {
        transform: translateY(-1px);
    }

    .app-topbar__ai:hover .app-topbar__ai-orb {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 6px 16px rgba(5, 150, 105, .5);
    }

    .app-topbar__ai.is-active {
        background: rgba(52, 211, 153, .14);
    }

    .app-topbar__ai.is-active::after {
        opacity: 1;
        animation: none;
        border-color: rgba(52, 211, 153, .8);
    }

    @keyframes ai-orb-breathe {
        0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 12px rgba(5, 150, 105, .3); }
        50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .26), 0 4px 18px rgba(52, 211, 153, .55); }
    }

    @keyframes ai-orb-twinkle {
        0%, 88%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
        92% { transform: scale(1.12) rotate(8deg); opacity: .85; }
        96% { transform: scale(1) rotate(-6deg); }
    }

    @keyframes ai-orb-ping {
        0% { opacity: 0; transform: scale(.9); }
        55% { opacity: .55; }
        100% { opacity: 0; transform: scale(1.25); }
    }

    /* Анимация — украшение: тем, кто просил меньше движения, оставляем статичный значок. */
    @media (prefers-reduced-motion: reduce) {
        .app-topbar__ai-orb,
        .app-topbar__ai-orb i,
        .app-topbar__ai::after {
            animation: none;
        }
    }

    .app-topbar__search {
        align-items: center;
        gap: 8px;
        width: 340px;
        max-width: 40vw;
        background: rgba(255, 255, 255, .06);
        border: 1px solid var(--oo-panel-border);
        border-radius: 6px;
        padding: 6px 10px;
        color: var(--sb-fg-muted);
    }

    .app-topbar__search input {
        border: 0;
        background: transparent;
        outline: none;
        flex: 1;
        font-size: 13px;
        color: #fff;
        min-width: 0;
    }

    .app-topbar__search input::placeholder {
        color: var(--sb-fg-muted);
    }

    .app-topbar__bell {
        position: relative;
        border: 0;
        background: transparent;
        color: var(--sb-fg-muted);
        font-size: 1.15rem;
        line-height: 1;
        padding: .35rem .45rem;
        border-radius: 8px;
    }

    .app-topbar__bell:hover {
        background: rgba(255, 255, 255, .06);
        color: #fff;
    }

    .app-topbar__bell-dot {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--oo-danger);
        border: 2px solid var(--oo-topbar);
    }

    .app-topbar__burger {
        display: none;
        border: 0;
        background: transparent;
        font-size: 1.3rem;
        line-height: 1;
        color: var(--sb-fg);
    }

    .app-topbar .navbar-nav {
        flex-direction: row;
        align-items: center;
    }

    .app-topbar .navbar-nav .nav-link {
        color: var(--sb-fg);
        display: flex;
        align-items: center;
        gap: .35rem;
    }

    .app-topbar .navbar-nav .nav-link:hover {
        color: #fff;
    }

    .app-sidebar__overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 14, 17, .45);
        z-index: 1040;
    }

    /* ── свёрнутый режим ─────────────────────────────────────────────────── */
    @media (min-width: 992px) {
        body.sidebar-collapsed .app-sidebar {
            width: var(--sb-width-collapsed);
        }

        body.sidebar-collapsed .app-main {
            margin-left: var(--sb-width-collapsed);
        }

        body.sidebar-collapsed .app-sidebar__brand-text,
        body.sidebar-collapsed .app-nav-toggle__label,
        body.sidebar-collapsed .app-nav-toggle__chevron,
        body.sidebar-collapsed .app-nav-sub,
        body.sidebar-collapsed .app-nav-group.is-open > .app-nav-sub,
        body.sidebar-collapsed .app-sidebar__footer span,
        body.sidebar-collapsed .app-nav-link span,
        body.sidebar-collapsed .side-user .min-0 {
            display: none;
        }

        body.sidebar-collapsed .app-sidebar__brand {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }

        body.sidebar-collapsed .app-sidebar__collapse {
            position: absolute;
            right: .35rem;
            top: .35rem;
            padding: .1rem .2rem;
            opacity: .5;
        }

        body.sidebar-collapsed .app-sidebar__collapse:hover {
            opacity: 1;
        }

        body.sidebar-collapsed .app-nav-link,
        body.sidebar-collapsed .app-nav-toggle {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }

        body.sidebar-collapsed .side-user {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }

        body.sidebar-collapsed .app-sidebar__footer a {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }
    }

    /* ── мобильный режим ─────────────────────────────────────────────────── */
    @media (max-width: 991.98px) {
        .app-sidebar {
            transform: translateX(-100%);
            /* 268px на телефоне 320px — это 84% ширины: оставляем полоску страницы,
               по которой можно закрыть шторку. На узких экранах ширина ужимается. */
            width: min(var(--sb-width), 88vw);
        }

        .app-main {
            margin-left: 0;
        }

        /* Цели нажатия на телефоне — минимум 44×44 (Apple HIG / Material): иконка
           бургера и колокольчика сама по себе ~33×23, пальцем в неё не попасть. */
        .app-topbar__burger,
        .app-topbar__bell {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 44px;
            min-height: 44px;
            padding: 0;
        }

        /* Кнопка «свернуть меню» — режим только для десктопа: на телефоне шторка
           и так узкая, а клик по этой кнопке ничего не делал. */
        .app-sidebar__collapse {
            display: none;
        }

        body.sidebar-mobile-open .app-sidebar {
            transform: translateX(0);
        }

        body.sidebar-mobile-open .app-sidebar__overlay {
            display: block;
        }

        /* Пока шторка открыта, страница под ней не прокручивается — иначе меню
           «уезжает» вместе с контентом и палец попадает не туда. */
        body.sidebar-mobile-open {
            overflow: hidden;
        }
    }

@media (max-width: 575.98px) {
    .app-topbar {
        gap: .5rem;
        padding: 0 .6rem;
    }

    .app-topbar__crumbs > span {
        /* «Главная ›» на 360px отъедает место у заголовка: оставляем только его. */
        display: none;
    }

    .app-topbar__crumbs {
        font-size: 12px;
    }

    .app-topbar__title {
        font-size: 12px;
        max-width: 46vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-topbar .navbar-nav .nav-link {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ============ Панель «Последняя активность» ============ */
.act-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    width: 440px;
    max-width: 94vw;
    height: 100vh;
    height: 100dvh;
    border-left: 1px solid var(--oo-border);
    background: var(--oo-bg);
    box-shadow: -18px 0 44px rgba(16, 24, 40, .14);
    /* 100%, не 102%: перелёт в 2 % (≈7 px) Chrome включает в scrollWidth страницы,
       и на мобиле появлялся горизонтальный скролл на всех экранах (issue #675).
       Тень всё равно не видна — панель при закрытом состоянии visibility: hidden. */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
}

.act-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.act-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1990;
    background: rgba(16, 24, 40, .34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.act-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.act-locked {
    overflow: hidden;
}

.act-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px 12px;
    background: #fff;
    border-bottom: 1px solid var(--oo-border);
}

.act-title {
    font-size: 15px;
    font-weight: 650;
    line-height: 1.2;
    color: var(--oo-text);
}

.act-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: var(--oo-muted);
}

.act-close {
    margin-left: auto;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--oo-muted);
    font-size: 13px;
    line-height: 1;
}

.act-close:hover {
    background: var(--oo-neutral-bg);
    color: var(--oo-text);
}

.act-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #fff;
    border-bottom: 1px solid var(--oo-border);
    flex-wrap: wrap;
}

.act-selectall {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12.5px;
    color: var(--oo-muted);
    cursor: pointer;
}

.act-bulk {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--oo-border);
    border-radius: 7px;
    background: #fff;
    font-size: 12.5px;
    color: var(--oo-text);
    white-space: nowrap;
}

.act-bulk:hover {
    background: var(--oo-neutral-bg);
    border-color: var(--oo-border);
}

.act-bulk[value="unread"]:hover {
    color: var(--oo-warning);
}

.act-allread button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(5, 150, 105, .35);
    border-radius: 7px;
    background: var(--oo-success-bg);
    font-size: 12.5px;
    color: var(--oo-brand-500);
    font-weight: 550;
    white-space: nowrap;
}

.act-allread button:hover {
    background: #e6f6ef;
}

.act-body {
    padding: 10px 16px 28px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.act-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 12px 0 6px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--oo-faint);
}

.act-group-count {
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--oo-faint);
}

.act-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--oo-border);
    border-radius: 10px;
    overflow: hidden;
}

.act-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--oo-border);
}

.act-item:first-child {
    border-top: 0;
}

.act-item:hover {
    background: #fafbfc;
}

.act-item.is-unread {
    background: #f6fbf8;
}

.act-check {
    margin: 2px 0 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.act-check input {
    margin: 0;
}

.act-main {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.act-main:hover {
    color: inherit;
    text-decoration: none;
}

.act-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: transparent;
}

.act-item.is-unread .act-dot {
    background: var(--oo-brand-500);
}

.act-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.act-subject {
    font-size: 13px;
    line-height: 1.35;
    color: var(--oo-text);
    overflow-wrap: anywhere;
}

.act-item.is-unread .act-subject {
    font-weight: 600;
}

.act-list.is-read .act-subject {
    color: var(--oo-muted);
}

.act-meta {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--oo-faint);
}

.act-toggle {
    flex: 0 0 auto;
    opacity: 0;
    transition: opacity .12s ease;
}

.act-item:hover .act-toggle,
.act-toggle:focus-within,
.act-item.is-unread .act-toggle {
    opacity: 1;
}

.act-toggle button {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--oo-muted);
    font-size: 12.5px;
    line-height: 1;
}

.act-toggle button:hover {
    background: var(--oo-neutral-bg);
    color: var(--oo-text);
}

.act-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 56px 24px;
    text-align: center;
    color: var(--oo-muted);
    font-size: 13px;
}

.act-empty i {
    font-size: 26px;
    color: var(--oo-faint);
}

.act-empty span {
    font-size: 12px;
    color: var(--oo-faint);
    max-width: 260px;
}

.act-nothing-unread {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed var(--oo-border);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--oo-success);
    background: var(--oo-success-bg);
}

@media (max-width: 520px) {
    .act-panel {
        width: 100vw;
        max-width: 100vw;
        border-left: 0;
    }
}

/* ============ Карточка задачи: вкладки, описание, обсуждение ============ */
.tc-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--oo-border);
    margin: 0 0 18px;
}

.tc-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    margin-bottom: -1px;
    font-size: 13px;
    font-weight: 500;
    color: var(--oo-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.tc-tab:hover {
    color: var(--oo-text);
    text-decoration: none;
}

.tc-tab.is-active {
    color: var(--oo-text);
    font-weight: 600;
    border-bottom-color: var(--oo-brand-500);
}

.tc-tab .cnt {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--oo-neutral-bg);
    color: var(--oo-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.tc-tab.is-active .cnt {
    background: var(--oo-success-bg);
    color: var(--oo-brand-500);
}

.task-desc {
    position: relative;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--oo-text-muted);
    white-space: pre-line;
}

.task-desc.is-clamped {
    max-height: 76px;
    overflow: hidden;
}

.task-desc.is-clamped::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 84%);
}

.task-desc__more {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--oo-brand-500);
    text-decoration: none;
}

.task-desc__more:hover {
    text-decoration: underline;
}

.cmt-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmt {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--oo-border);
}

.cmt:first-child {
    border-top: 0;
    padding-top: 0;
}

.cmt.is-target {
    background: var(--oo-success-bg);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}

.cmt__body {
    flex: 1 1 auto;
    min-width: 0;
}

.cmt__head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.cmt__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--oo-text);
}

.cmt__time {
    font-size: 11.5px;
    color: var(--oo-faint);
}

.cmt__text {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--oo-text);
}

.cmt__text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cmt__acts {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-top: 6px;
    font-size: 12px;
}

.cmt__acts a {
    color: var(--oo-text-muted);
    text-decoration: none;
}

.cmt__acts a:hover {
    color: var(--oo-brand-500);
}

.cmt-more {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed var(--oo-border);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--oo-text-muted);
    background: #fcfdfc;
}

.cmt-more .grow {
    flex: 1 1 auto;
}

.disc-empty {
    text-align: center;
    padding: 22px 16px;
    border: 1px dashed var(--oo-border);
    border-radius: 10px;
    background: #fcfdfc;
}

.disc-empty i {
    font-size: 22px;
    color: var(--oo-faint);
}

.disc-empty b {
    display: block;
    margin: 6px 0 2px;
    font-size: 13px;
    color: var(--oo-text);
}

.disc-empty span {
    font-size: 12px;
    color: var(--oo-faint);
}

.rel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rel__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12.5px;
    min-width: 0;
}

.rel__row a {
    color: var(--oo-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rel__row a:hover {
    color: var(--oo-brand-500);
}

.rel__k {
    color: var(--oo-faint);
    font-size: 11.5px;
    min-width: 70px;
    flex: 0 0 auto;
}

.rel .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--oo-neutral-bg);
    color: var(--oo-text-muted);
    font-size: 11px;
    font-weight: 600;
}

/* Ответ на комментарий */
.quote-block {
    padding: 12px 14px;
    border-left: 3px solid var(--oo-brand-500);
    background: #f7faf8;
    border-radius: 0 8px 8px 0;
}

.quote-block__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-block__text {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--oo-text);
}

.ed-wrap {
    border: 1px solid var(--oo-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.ed-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--oo-border);
    background: #fcfdfc;
    flex-wrap: wrap;
}

.ed-sep {
    width: 1px;
    height: 18px;
    background: var(--oo-border);
    margin: 0 5px;
}

.ed-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--oo-text-muted);
    font-size: 13px;
    line-height: 1;
}

.ed-btn:hover {
    background: var(--oo-neutral-bg);
    color: var(--oo-text);
}

.dropzone-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 10px;
    padding: 20px 16px;
    text-align: center;
    border: 1px dashed var(--oo-border);
    border-radius: 10px;
    background: #fcfdfc;
}

.dropzone-box i {
    font-size: 20px;
    color: var(--oo-faint);
}

.dropzone-box b {
    font-size: 13px;
    font-weight: 600;
    color: var(--oo-text);
}

.dropzone-box span {
    font-size: 12px;
    color: var(--oo-faint);
}


/* CKEditor внутри рамки редактора ответа */
.ed-wrap .ck.ck-toolbar {
    border: 0;
    border-bottom: 1px solid var(--oo-border);
    background: #fcfdfc;
    border-radius: 0;
}

.ed-wrap .ck.ck-editor__main > .ck-editor__editable {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    min-height: 200px;
    font-size: 13px;
    line-height: 1.55;
}

.ed-wrap .ck.ck-editor__main > .ck-editor__editable.ck-focused {
    box-shadow: none;
    border: 0;
}

/* ============ Экран входа и второй фактор (issue #665) ============ */
body.auth-body {
    margin: 0;
    background: var(--oo-bg);
    color: var(--oo-text);
    font-family: var(--oo-font);
}

.auth {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 100vh;
}

/* ---------- Брендовая половина ---------- */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 46px;
    background: linear-gradient(160deg, var(--oo-sidebar) 0%, #4b4e52 100%);
    color: #e7ebef;
    overflow: hidden;
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(52, 211, 153, .28), rgba(5, 150, 105, 0) 65%);
}

.auth-brand__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--oo-brand-500);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .02em;
}

.auth-brand__name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.auth-brand__tag {
    margin-top: 2px;
    font-size: 11.5px;
    color: #a9b0b8;
}

.auth-brand__mid {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-brand__mid h2 {
    margin: 0 0 14px;
    font-size: 27px;
    line-height: 1.25;
    font-weight: 650;
    color: #fff;
}

.auth-brand__mid p {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.6;
    color: #b9c0c7;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #cfd6dc;
}

.auth-points i {
    margin-top: 1px;
    font-size: 14px;
    color: #34d399;
}

.auth-brand__foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 11.5px;
    color: #8d959d;
}

/* ---------- Карточка формы ---------- */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 26px 26px 22px;
    background: #fff;
    border: 1px solid var(--oo-border);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(16, 24, 40, .07);
}

.auth-card__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 650;
    color: var(--oo-text);
}

.auth-card__sub {
    margin: 0 0 20px;
    font-size: 12.5px;
    color: var(--oo-text-muted);
}

.fld {
    margin-bottom: 13px;
}

.fld label {
    display: block;
    margin-bottom: 5px;
    font-size: 11.5px;
    font-weight: 550;
    color: var(--oo-text-muted);
}

.fld input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--oo-border);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--oo-text);
}

.fld input:focus {
    outline: none;
    border-color: var(--oo-brand-500);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .12);
}

.fld input.is-invalid {
    border-color: #ef4444;
}

.fld__error {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #b91c1c;
}

.fld--pass {
    position: relative;
}

.fld--pass input {
    padding-right: 42px;
}

.fld__eye {
    position: absolute;
    right: 6px;
    top: 25px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--oo-text-faint);
    font-size: 14px;
}

.fld__eye:hover {
    background: var(--oo-neutral-bg);
    color: var(--oo-text);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 18px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 12.5px;
    color: var(--oo-text-muted);
    cursor: pointer;
}

.auth-remember input {
    margin: 0;
}

.auth-link {
    font-size: 12.5px;
    color: var(--oo-brand-500);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 9px;
    background: var(--oo-brand-500);
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
}

.btn-login:hover {
    background: var(--oo-brand-600);
}

.auth-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 14px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--oo-text-faint);
}

.auth-sep::before,
.auth-sep::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--oo-border);
}

.auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-oauth a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    border: 1px solid var(--oo-border);
    border-radius: 9px;
    background: #fff;
    color: var(--oo-text);
    font-size: 13px;
    text-decoration: none;
}

.auth-oauth a:hover {
    background: var(--oo-neutral-bg);
    color: var(--oo-text);
}

.auth-oauth__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.auth-oauth__mark--ya {
    background: #fc3f1d;
}

.auth-oauth__mark--vk {
    background: #0077ff;
}

.auth-alert,
.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 12.5px;
}

.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-note {
    background: var(--oo-success-bg);
    border: 1px solid rgba(5, 150, 105, .25);
    color: var(--oo-brand-600);
}

.auth-2fa {
    display: flex;
    gap: 8px;
    margin: 4px 0 16px;
}

.auth-2fa input {
    width: 46px;
    height: 52px;
    text-align: center;
    border: 1px solid var(--oo-border);
    border-radius: 9px;
    font-family: var(--oo-mono);
    font-size: 19px;
    color: var(--oo-text);
}

.auth-2fa input:focus {
    outline: none;
    border-color: var(--oo-brand-500);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .12);
}

.auth-foot {
    margin-top: 16px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--oo-text-faint);
    text-align: center;
}

@media (max-width: 900px) {
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        gap: 18px;
        padding: 26px 22px;
    }

    .auth-brand__mid h2 {
        font-size: 20px;
    }

    .auth-brand__mid p,
    .auth-points,
    .auth-brand__foot {
        display: none;
    }

    .auth-form-wrap {
        padding: 22px 16px 34px;
        align-items: flex-start;
    }

    .auth-card {
        max-width: 100%;
        box-shadow: none;
    }
}
