html {
    font-size: 120%;
}

/* Светлая тема — шапка и раздел «Задачи» */
:root {
    /* чернила (текст/границы), лесенка непрозрачности */
    --ink: oklch(0.22 0.015 265);
    --ink-strong: oklch(0.22 0.015 265 / 0.82);
    --ink-secondary: oklch(0.22 0.015 265 / 0.70);
    --ink-tertiary: oklch(0.22 0.015 265 / 0.64);
    --ink-muted: oklch(0.22 0.015 265 / 0.46);
    --ink-faint: oklch(0.22 0.015 265 / 0.36);
    --ink-glyph: oklch(0.22 0.015 265 / 0.30);
    --ink-border-strong: oklch(0.22 0.015 265 / 0.16);
    --ink-border: oklch(0.22 0.015 265 / 0.14);
    --ink-border-soft: oklch(0.22 0.015 265 / 0.12);
    --ink-border-input: oklch(0.22 0.015 265 / 0.10);
    --ink-hairline: oklch(0.22 0.015 265 / 0.09);
    --ink-divider: oklch(0.22 0.015 265 / 0.06);
    --ink-wash: oklch(0.22 0.015 265 / 0.055);

    /* поверхности — один тон, ступени светлоты */
    --surface-canvas: oklch(0.93 0.006 265);
    --surface-content: oklch(0.95 0.006 265);
    --surface-panel: oklch(0.98 0.005 265);
    --surface-panel-2: oklch(0.99 0.004 265);
    --surface-card: #ffffff;

    /* акцент H275 */
    --accent-strong: oklch(0.52 0.16 275);
    --accent-solid: oklch(0.66 0.15 275);
    --accent-border: oklch(0.86 0.06 275);
    --accent-tint: oklch(0.96 0.03 275);

    /* внимание H70 */
    --warn-strong: oklch(0.52 0.16 70);
    --warn-solid: oklch(0.66 0.15 70);
    --warn-border: oklch(0.86 0.06 70);
    --warn-tint: oklch(0.96 0.03 70);

    /* успех H150 */
    --success-strong: oklch(0.52 0.16 150);
    --success-solid: oklch(0.66 0.15 150);
    --success-border: oklch(0.86 0.06 150);
    --success-tint: oklch(0.96 0.03 150);

    /* вопросы H300 */
    --question-strong: oklch(0.52 0.16 300);
    --question-solid: oklch(0.66 0.15 300);
    --question-border: oklch(0.86 0.06 300);
    --question-tint: oklch(0.96 0.03 300);

    /* инфо H250 / опасность H25 */
    --info-solid: oklch(0.66 0.15 250);
    --info-tint: oklch(0.96 0.03 250);
    --danger-strong: oklch(0.52 0.16 25);
    --danger-border: oklch(0.86 0.06 25);
    --danger-tint: oklch(0.96 0.03 25);

    /* тени */
    --shadow-hairline: 0 0 0 0.5px var(--ink-hairline);
    --shadow-button: 0 1px 2px oklch(0.22 0.015 265 / 0.06);
    --shadow-card: 0 1px 2px oklch(0.22 0.015 265 / 0.05), 0 6px 18px -10px oklch(0.22 0.015 265 / 0.14);
    --shadow-popover: 0 12px 32px -8px oklch(0.22 0.015 265 / 0.16);
    --shadow-popover-lg: 0 0 0 0.5px oklch(0.22 0.015 265 / 0.04), 0 32px 64px -16px oklch(0.22 0.015 265 / 0.28), 0 4px 12px oklch(0.22 0.015 265 / 0.08);
    --shadow-inset: inset 0 1px 2px oklch(0.22 0.015 265 / 0.05);

    --font-ui: 'Inter Tight', -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #1a3060 transparent;
}
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #1a3060; border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: #2a5090; }

body {
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    background: #0f0f11;
    color: #e8e8ea;
    min-height: 100vh;
}
/* Раздел «Задачи» — светлая тема, фон-«холст» на всю ширину (не только
   колонку .layout шириной 1200px), пока открыта эта вкладка. */
body.body--tasks-canvas {
    background: var(--surface-canvas);
}
/* Полосы прокрутки в разделе «Задачи» — светлые, из палитры редизайна,
   а не тёмно-синие из общей темы (см. *::-webkit-scrollbar-thumb выше).
   Полоса прокрутки самого окна визуально принадлежит <html> (родителю
   body), поэтому его тоже нужно переопределить отдельно через :has() —
   правило для body и его потомков ниже до него не «дотягивается». */
html:has(body.body--tasks-canvas) {
    scrollbar-color: var(--ink-border-strong) transparent;
}
html:has(body.body--tasks-canvas)::-webkit-scrollbar-thumb {
    background: var(--ink-border-strong);
}
html:has(body.body--tasks-canvas)::-webkit-scrollbar-thumb:hover {
    background: var(--ink-muted);
}
body.body--tasks-canvas,
body.body--tasks-canvas * {
    scrollbar-color: var(--ink-border-strong) transparent;
}
body.body--tasks-canvas::-webkit-scrollbar-thumb,
body.body--tasks-canvas *::-webkit-scrollbar-thumb {
    background: var(--ink-border-strong);
}
body.body--tasks-canvas::-webkit-scrollbar-thumb:hover,
body.body--tasks-canvas *::-webkit-scrollbar-thumb:hover {
    background: var(--ink-muted);
}

.layout {
    /* 1240px как в макете «Задачник» — calc() держит ровно 1240px «нетто»
       независимо от бокового padding ниже. */
    max-width: calc(1240px + 3rem);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}
.layout--embed {
    padding-top: 1.25rem;
}

/* Header */
.header {
    /* position+z-index — не для плавания при скролле (шапка статичная), а
       чтобы её выпадающее меню «···» (z-index внутри) не пряталось под
       контентом ниже: backdrop-filter сам создаёт stacking context, и без
       явного z-index на самой шапке она проигрывает по порядку в DOM
       следующим за ней блокам, даже если у её потомков z-index больше. */
    position: relative;
    z-index: 10;
    padding: 16px 20px;
    margin: 0 0 2rem;
    display: flex;
    align-items: center;
    gap: 20px;
    background: oklch(0.98 0.005 265 / 0.86);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--ink-hairline);
    font-family: var(--font-ui);
}
/* Раздел «Задачи» — шапка той же ширины, что и колонка с фильтрами под ней
   (никакого bleed за пределы .layout), читается как верх одной светлой
   карточки со страницей: скруглена только сверху, без зазора и без нижней
   границы до статус-бара ниже. На остальных вкладках (тёмных) шапка не
   меняется — этот блок их не задевает. */
body.body--tasks-canvas .header {
    /* В макете холст даёт карточке 40px сверху (padding: 40px 28px 64px
       у обёртки canvas) — раньше тут стояли произвольные 16px. */
    margin: 40px 0 0;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    box-shadow: var(--shadow-popover), var(--shadow-hairline);
}
.header__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    cursor: default;
    user-select: none;
}
.header__title--adv::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-strong);
}

/* Dropzone */
.dropzone {
    border: 1.5px dashed #2e2e38;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    background: #13131a;
    user-select: none;
}
.dropzone:hover,
.dropzone--over {
    border-color: #5b5bd6;
    background: #17172a;
}
.dropzone--loading {
    cursor: default;
}
.dropzone--compact {
    padding: 0.75rem 1.5rem;
}

.dropzone__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.dropzone__text {
    font-size: 0.95rem;
    color: #b0b0c0;
    margin-bottom: 0.4rem;
}
.dropzone__text--sm {
    font-size: 0.82rem;
    color: #6060a0;
    margin: 0;
}
.dropzone__hint {
    font-size: 0.8rem;
    color: #555568;
}

/* ── Upload queue ─────────────────────────────────────────────────── */
.upload-queue {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.uq-item {
    background: #13131e;
    border: 1px solid #1e1e32;
    border-radius: 10px;
    overflow: hidden;
}
.uq-item__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: #17172a;
    border-bottom: 1px solid #1e1e32;
}
.uq-item__icon { font-size: 0.95rem; flex-shrink: 0; }
.uq-item__name {
    flex: 1;
    font-size: 0.83rem;
    color: #b0b0d0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.uq-item__remove {
    background: none;
    border: none;
    color: #555580;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
    flex-shrink: 0;
    transition: color 0.15s;
}
.uq-item__remove:hover { color: #e06060; }

.uq-item__row {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #1a1a2a;
}
.uq-input {
    background: #0e0e18;
    border: 1px solid #252540;
    border-radius: 5px;
    color: #d0d0e8;
    padding: 0.3rem 0.6rem;
    font-size: 0.82rem;
    min-width: 0;
}
.uq-input:focus { outline: none; border-color: #4a4aaa; }
.uq-input--desc { flex: 1; }
.uq-select {
    background: #0e0e18;
    border: 1px solid #252540;
    border-radius: 5px;
    color: #d0d0e8;
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    cursor: pointer;
    max-width: 180px;
    flex-shrink: 0;
}
.uq-select:focus { outline: none; border-color: #4a4aaa; }
.uq-select--add { max-width: 160px; }

.uq-projects {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex-shrink: 0;
}
.uq-project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: #6666aa;
    background: #1a1a2e;
    border: 1px solid #2a2a44;
    border-radius: 4px;
    padding: 0.15rem 0.35rem 0.15rem 0.5rem;
    white-space: nowrap;
}
.uq-project-tag__remove {
    background: none;
    border: none;
    color: #4a4a6a;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}
.uq-project-tag__remove:hover { color: #e06060; }

.uq-item__settings {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.uq-setting {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid #141420;
}
.uq-setting:last-child { border-bottom: none; }
.uq-setting__label {
    font-size: 0.75rem;
    color: #50508a;
    width: 80px;
    flex-shrink: 0;
}
.uq-setting .mode-toggle { margin: 0; }

.uq-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.5rem 0;
}
.uq-process-btn {
    background: #3a3a8a;
    border: none;
    border-radius: 8px;
    color: #d0d0ff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    transition: background 0.15s;
}
.uq-process-btn:hover:not(:disabled) { background: #5050aa; }
.uq-process-btn:disabled { opacity: 0.5; cursor: default; }

/* Spinner */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #2e2e38;
    border-top-color: #5b5bd6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 0.75rem;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.description-input {
    width: 100%;
    margin-top: 0.75rem;
    background: #13131a;
    border: 1px solid #2e2e38;
    border-radius: 8px;
    color: #c8c8d8;
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.6rem 0.85rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.description-input:focus {
    border-color: #5b5bd6;
}
.description-input:disabled {
    opacity: 0.4;
}

.error-msg {
    margin-top: 0.75rem;
    color: #f87171;
    font-size: 0.85rem;
}

/* Section title */
.section-title {
    font-size: 1rem;
    font-weight: 500;
    color: #888898;
    margin: 2rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}
/* Карточка секции (.project-card, светлая тема) сама залита видимым тоном
   (--surface-content — --surface-panel-2 практически неотличим от белого,
   разница в заливке не читалась). Заголовок — просто выделенная подпись с
   акцентной чёрточкой слева, без отдельной плашки-шапки. Строки списка
   (.sprint-item) — узкие белые плашки поверх этой заливки, как отдельные
   карточки чуть уже самого тела секции. */
.dir-section-title {
    display: flex;
    align-items: center;
    border-left: 3px solid var(--accent-strong);
    padding-left: 9px;
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #44444f;
}

/* Recording list */
.recording-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recording-card {
    background: #13131a;
    border: 1px solid #1e1e28;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.recording-card__top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.recording-card__name {
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recording-card__dates {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.rec-date {
    font-size: 0.78rem;
    color: #55556a;
    position: relative;
    cursor: default;
}
.rec-date[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    background: #1e1e32;
    color: #c0c0d8;
    font-size: 0.72rem;
    white-space: nowrap;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid #2e2e48;
    pointer-events: none;
    z-index: 10;
}
.rec-date--processed {
    color: #404058;
}
.rec-date--duration {
    color: #5a6a8a;
}
.rec-date--engine {
    color: #5a7a6a;
}

.recording-card__desc {
    margin-bottom: 0.5rem;
}

.desc-text {
    font-size: 0.85rem;
    color: #9090a8;
    cursor: pointer;
    border-radius: 4px;
    padding: 0.1rem 0.2rem;
    display: block;
    transition: background 0.12s;
}
.desc-text:hover {
    background: #1e1e28;
}
.desc-text--empty {
    color: #44445a;
    font-style: italic;
}

.desc-edit {
    width: 100%;
    background: #1a1a26;
    border: 1px solid #5b5bd6;
    border-radius: 6px;
    color: #e0e0f0;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    resize: none;
    outline: none;
}

/* Status badge */
.recording-card__badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.status--queued {
    background: #1e1e28;
    color: #6666aa;
}
.status--active {
    background: #1a1a2e;
    color: #8888ee;
}
.status--done {
    background: #0e2718;
    color: #4ade80;
}
.status--error {
    background: #2a1010;
    color: #f87171;
}
.status--cancelled {
    background: #1e1a10;
    color: #a0885a;
}

.btn-cancel {
    margin-left: auto;
    background: none;
    border: 1px solid #3a2020;
    color: #885555;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    transition:
        background 0.12s,
        color 0.12s;
}
.btn-cancel:hover {
    background: #2a1010;
    color: #f87171;
    border-color: #553333;
}

/* Links (legacy) */
.recording-card__links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}
.btn--outline {
    border: 1px solid #2e2e42;
    color: #9999dd;
    background: transparent;
}
.btn--outline:hover {
    background: #1a1a2e;
}

/* Preview text */
.rec-preview {
    font-size: 0.8rem;
    color: #8888a0;
    line-height: 1.55;
    margin-top: 0.5rem;
}
.rec-preview .preview-section {
    background: #16162a;
    border-left: 3px solid #4a90d9;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 6px;
}
.rec-preview .preview-section:first-child {
    margin-top: 0;
}
.rec-preview .preview-title {
    font-weight: 600;
    color: #7ab3e0;
    margin: 0 0 5px;
}
.rec-preview ul {
    margin: 0;
    padding-left: 1.2rem;
}
.rec-preview li {
    margin: 2px 0;
}

/* Download buttons */
.recording-card__downloads {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.65rem;
}
.processing-time {
    font-size: 0.75rem;
    color: #5a5a7a;
    margin-top: 0.1rem;
}

.btn--download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 7px;
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    background: #0e2718;
    border: 1px solid #1a4a2e;
    color: #4ade80;
    transition: background 0.15s;
}
.btn--download:hover {
    background: #122e1e;
}

.btn--download-secondary {
    background: #151528;
    border-color: #2a2a4a;
    color: #8888ee;
}
.btn--download-secondary:hover {
    background: #1a1a35;
}
.btn--download-source {
    background: #111820;
    border-color: #1e3040;
    color: #5599bb;
}
.btn--download-source:hover {
    background: #162030;
}

/* Кнопка результатов */
.results-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    color: var(--ink-strong);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-ui);
    box-shadow: var(--shadow-button);
    cursor: pointer;
    transition: all 0.15s;
}
.results-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent-strong);
}
.results-btn__count {
    min-width: 18px;
    text-align: center;
    background: var(--accent-strong);
    color: #fff;
    border-radius: 20px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
}

/* Кнопка выхода из аккаунта */
.header__logout {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    color: var(--ink-strong);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-ui);
    box-shadow: var(--shadow-button);
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 8px;
}
.header__logout:hover {
    border-color: var(--danger-strong, var(--accent-border));
    color: var(--danger-strong, var(--accent-strong));
}

/* Стрелка «наверх» */
.scroll-top-btn {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    color: var(--ink-tertiary);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    box-shadow: var(--shadow-popover);
    transition: all 0.15s;
}
.scroll-top-btn:hover {
    color: var(--accent-strong);
    border-color: var(--accent-border);
}

/* Overlay */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.panel-overlay--open {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in панель */
.results-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background: #0f0f11;
    border-left: 1px solid #1e1e28;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.results-panel--open {
    transform: translateX(0);
}

.results-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #1e1e28;
    flex-shrink: 0;
}
.results-panel__title {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f2;
}
.results-panel__close {
    background: none;
    border: none;
    color: #55556a;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.15s;
}
.results-panel__close:hover {
    color: #e0e0f0;
}

.results-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem 2rem;
}

@media (max-width: 700px) {
    .results-panel {
        width: 100%;
    }
}

/* Error detail */
.recording-card__error {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #f87171;
    word-break: break-word;
}

/* Log panel */
.log-panel {
    margin-top: 0.65rem;
}

.log-toggle {
    background: none;
    border: none;
    color: #55556a;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.log-toggle:hover {
    color: #8888aa;
}

.log-box {
    margin-top: 0.4rem;
    background: #0b0b10;
    border: 1px solid #1e1e28;
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    max-height: 360px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.log-line {
    font-family: "Cascadia Code", "Fira Code", monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    color: #6a6a82;
    white-space: pre-wrap;
    word-break: break-all;
}
.log--ok {
    color: #4ade80;
}
.log--err {
    color: #f87171;
}
.log--info {
    color: #818cf8;
}
.log--step {
    color: #94a3b8;
    font-weight: 500;
}

/* Progress bar */
.recording-card__progress {
    margin-top: 0.7rem;
}
.progress-bar {
    height: 3px;
    background: #1e1e28;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar__fill {
    height: 100%;
    border-radius: 4px;
    animation: progress-pulse 1.5s ease-in-out infinite;
}
.progress-bar__fill--queued {
    width: 10%;
    background: #5555aa;
}
.progress-bar__fill--transcribing {
    width: 40%;
    background: #7777dd;
}
.progress-bar__fill--summarizing {
    width: 75%;
    background: #8888ff;
}

@keyframes progress-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Mode toggle */
.mode-toggle {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.mode-btn {
    background: #13131a;
    border: 1px solid #2e2e38;
    color: #55556a;
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.mode-btn:hover {
    border-color: #5b5bd6;
    color: #9999dd;
}
.mode-btn--active {
    background: #1a1a2e;
    border-color: #5b5bd6;
    color: #8888ee;
}

.btn-clear-all {
    background: none;
    border: 1px solid #3a2020;
    color: #885555;
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-clear-all:hover {
    background: #2a1010;
    color: #f87171;
    border-color: #553333;
}

.btn-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: #44444f;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.btn-delete:hover {
    color: #f87171;
}

.btn-resume {
    background: none;
    border: none;
    color: #44444f;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.btn-resume:hover {
    color: #10b981;
}

/* ── Header tabs ─────────────────────────────────────────────────── */
.header-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    background: var(--ink-wash);
    border: none;
    border-radius: 9px;
    padding: 2px;
    box-shadow: inset 0 0 0 0.5px var(--ink-wash);
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--ink-secondary);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.tab-btn:hover {
    color: var(--ink-strong);
}
.tab-btn--active {
    background: var(--surface-card);
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 0.5px 0 0.5px var(--ink-divider), var(--shadow-button);
}
.tab-btn__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    background: var(--ink-hairline);
    color: var(--ink-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    vertical-align: middle;
    line-height: 1;
}
.tab-btn--active .tab-btn__badge {
    background: var(--ink-divider);
    color: var(--ink-secondary);
}
.tab-btn__badge--deploy { background: var(--warn-solid); color: #fff; }
.tab-btn--active .tab-btn__badge--deploy { background: var(--warn-solid); color: #fff; }

/* ── Tab more dropdown ───────────────────────────────────────────── */
.tab-more {
    position: relative;
}
.tab-btn--more {
    padding: 5px 10px;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
}
.tab-more__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    z-index: 200;
    box-shadow: var(--shadow-popover);
}
.tab-more__item {
    background: none;
    border: none;
    color: var(--ink-secondary);
    font-family: var(--font-ui);
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.tab-more__item:hover { background: var(--ink-divider); color: var(--ink); }
.tab-more__item--active { background: var(--accent-tint); color: var(--accent-strong); }

/* ── Upload project row ───────────────────────────────────────────── */
.upload-project-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.upload-select {
    flex: 1;
    min-width: 160px;
    background: #13131a;
    border: 1px solid #2e2e38;
    border-radius: 8px;
    color: #9090a8;
    font-family: inherit;
    font-size: 0.83rem;
    padding: 0.4rem 0.7rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.upload-select:focus {
    border-color: #5b5bd6;
}
.upload-select:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Projects toolbar ────────────────────────────────────────────── */
.projects-toolbar {
    margin: 1.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Category filter tabs ────────────────────────────────────────── */
/* Класс .category-filter общий с ProjectsTab.vue (тёмная, вне области
   редизайна) — базовая (тёмная) версия ниже, светлая переопределяет её
   только внутри /tasks (.tasks-main), у ProjectsTab она не задета. */
.category-filter {
    display: flex;
    gap: 0.25rem;
    background: #13131a;
    border: 1px solid #1e1e28;
    border-radius: 8px;
    padding: 0.2rem;
}
.category-filter__btn {
    background: none;
    border: none;
    color: #55556a;
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.28rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.category-filter__btn:hover {
    color: #9090a8;
    background: #1e1e28;
}
.category-filter__btn.active {
    background: #1e1e3a;
    color: #9090ee;
}
.category-filter__count {
    display: inline-block;
    margin-left: 0.35rem;
    background: #2a2a3a;
    color: #6060a0;
    border-radius: 8px;
    padding: 0.05rem 0.38rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}
.category-filter__btn.active .category-filter__count {
    background: #2a2a5a;
    color: #9090ee;
}
.tasks-main .category-filter {
    display: flex;
    gap: 2px;
    background: var(--ink-wash);
    border: none;
    border-radius: 8px;
    padding: 2px;
}
.tasks-main .category-filter__btn {
    background: none;
    border: none;
    color: var(--ink-secondary);
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.tasks-main .category-filter__btn:hover {
    color: var(--ink);
}
.tasks-main .category-filter__btn.active {
    background: var(--accent-tint);
    color: var(--accent-strong);
    font-weight: 600;
}
.tasks-main .category-filter__count {
    display: inline-block;
    margin-left: 6px;
    background: var(--ink-hairline);
    color: var(--ink-secondary);
    border-radius: 20px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}
.tasks-main .category-filter__btn.active .category-filter__count {
    background: rgba(255, 255, 255, 0.6);
    color: var(--accent-strong);
}

/* ── Category chip (toggles) ─────────────────────────────────────── */
.category-chip {
    background: none;
    border: 1px solid var(--ink-border-input);
    color: var(--ink-secondary);
    font-family: inherit;
    font-size: 0.75rem;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
}
.category-chip:hover {
    border-color: var(--ink-border-strong);
    color: var(--ink);
}
.category-chip.active {
    border-color: var(--accent-border);
    color: var(--accent-strong);
    background: var(--accent-tint);
}

.project-form__category {
    display: flex;
    gap: 0.4rem;
}

/* ── Category badge on project card ──────────────────────────────── */
.project-category-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.project-category-badge--personal {
    background: var(--accent-tint);
    color: var(--accent-strong);
    border: 1px solid var(--accent-border);
}
.project-category-badge--work {
    background: var(--success-tint);
    color: var(--success-strong);
    border: 1px solid var(--success-border);
}
.project-archived-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: var(--warn-tint);
    color: var(--warn-strong);
    border: 1px solid var(--warn-border);
}

.btn-new-project {
    background: var(--accent-tint);
    border: 1px solid var(--accent-border);
    color: var(--accent-strong);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-new-project:hover {
    border-color: var(--accent-strong);
    color: var(--accent-solid);
}

/* ── Project form ────────────────────────────────────────────────── */
.project-form {
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 10px;
    padding: 1.2rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: var(--shadow-card);
}
.project-form__input {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 7px;
    color: var(--ink-strong);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    outline: none;
    transition: border-color 0.15s;
    box-shadow: var(--shadow-inset);
}
.project-form__input:focus {
    border-color: var(--accent-border);
}
.project-form__dates {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.project-form__label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--ink-muted);
}
.project-form__date {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 7px;
    color: var(--ink-strong);
    font-family: inherit;
    font-size: 0.83rem;
    padding: 0.38rem 0.6rem;
    outline: none;
    transition: border-color 0.15s;
    box-shadow: var(--shadow-inset);
    color-scheme: light;
}
.project-form__date:focus {
    border-color: var(--accent-border);
}
.project-form__actions {
    display: flex;
    gap: 0.5rem;
}
.btn-primary {
    background: #1a1a2e;
    border: 1px solid #5b5bd6;
    color: #9090ee;
    font-family: inherit;
    font-size: 0.83rem;
    padding: 0.4rem 1rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-primary:hover {
    background: #22224a;
    color: #aaaaf0;
}
.btn-secondary {
    background: none;
    border: 1px solid #2e2e38;
    color: #55556a;
    font-family: inherit;
    font-size: 0.83rem;
    padding: 0.4rem 0.9rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-secondary:hover {
    border-color: #44444f;
    color: #9090a8;
}

/* ── Project card ────────────────────────────────────────────────── */
.project-card {
    background: #13131a;
    border: 1px solid #1e1e28;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}
.project-card__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.project-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-strong);
    cursor: pointer;
    border-radius: 4px;
    padding: 0.1rem 0.2rem;
    transition: background 0.12s;
    flex: 1;
}
.project-card__name:hover {
    background: var(--ink-wash);
}
.project-card__dates {
    font-size: 0.78rem;
    color: var(--ink-muted);
}
.project-edit-input {
    flex: 1;
    background: var(--surface-card);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    color: var(--ink-strong);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.35rem 0.6rem;
    outline: none;
    box-shadow: var(--shadow-inset);
}
.project-dates-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.dates-sep {
    color: var(--ink-faint);
    font-size: 0.85rem;
}

/* ── Project section (contacts / sprints) ────────────────────────── */
.project-section {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    /* Разделитель — box-shadow, а не border-top: border рядом с другой
       гранью (рамка карточки, скругление) даёт диагональный срез на стыке. */
    box-shadow: inset 0 1px 0 var(--ink-divider);
}
.project-section__title {
    display: flex;
    align-items: center;
    border-left: 3px solid var(--accent-strong);
    padding-left: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ── Contacts ────────────────────────────────────────────────────── */
.contacts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    align-items: center;
}
.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface-panel);
    border: 1px solid var(--ink-border-input);
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
}
.contact-chip__name {
    color: var(--ink-secondary);
}
.contact-chip__role {
    color: var(--accent-strong);
    font-style: italic;
}
.contact-chip__del {
    background: none;
    border: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0 0.1rem;
    transition: color 0.12s;
}
.contact-chip__del:hover {
    color: var(--danger-strong);
}
.contact-add-form {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.4rem;
}
.contact-input {
    flex: 1;
    background: #0f0f16;
    border: 1px solid #2e2e38;
    border-radius: 6px;
    color: #e0e0f0;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
    outline: none;
    transition: border-color 0.15s;
    min-width: 220px;
    max-width: 360px;
}
.contact-input:focus {
    border-color: #5b5bd6;
}
.empty-inline {
    font-size: 0.78rem;
    color: #33333f;
    font-style: italic;
}

/* ── Sprints ─────────────────────────────────────────────────────── */
.sprints-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.sprint-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sprint-item--editing {
    display: block !important;
}
.sprint-edit-container {
    display: block;
    width: 100%;
}
.sprint-edit-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.sprint-edit-row + .sprint-edit-row {
    margin-top: 0.35rem;
}
.sprint-edit-label {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    min-width: 3.5rem;
}
.sprint-date-input {
    width: 130px;
}
.sprint-num {
    font-size: 0.72rem;
    color: #44444f;
    font-family: monospace;
    min-width: 22px;
}
.sprint-name {
    font-size: 0.85rem;
    color: var(--ink-strong);
    cursor: pointer;
    border-radius: 4px;
    padding: 0.1rem 0.25rem;
    flex: 1;
    border: 1px solid transparent;
    transition: border-color 0.12s;
}
.sprint-name:hover {
    border-color: var(--ink-border-input);
}
.sprint-name--overdue {
    color: #e05c5c;
}
.sprint-name--overdue:hover {
    color: #f07070;
}
.sprint-edit-input {
    flex: 1;
    background: var(--surface-card);
    max-width: 140px;
    border: 1px solid var(--accent-border);
    border-radius: 5px;
    color: var(--ink-strong);
    font-family: inherit;
    font-size: 0.83rem;
    padding: 0.25rem 0.5rem;
    outline: none;
    min-width: 0;
    box-shadow: var(--shadow-inset);
}

/* ── Generic icon buttons ────────────────────────────────────────── */
.btn-icon {
    background: none;
    border: none;
    color: #44444f;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    transition: color 0.12s;
    line-height: 1;
    flex-shrink: 0;
}
.btn-icon:hover {
    color: #9090a8;
}
.btn-icon--ok:hover {
    color: #4ade80;
}
.btn-icon--del {
    color: #9898aa;
}
.btn-icon--del:hover {
    color: #f87171;
}
.btn-icon--sort {
    color: var(--ink-glyph);
    opacity: 0.65;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.1rem 0.25rem;
    line-height: 1;
}
.btn-icon--sort:hover:not(:disabled) {
    color: var(--ink-tertiary);
    opacity: 1;
}
.btn-icon--sort:disabled {
    color: var(--ink-glyph);
    opacity: 0.18;
    cursor: default;
}
.btn-icon--archive {
    color: var(--ink-glyph);
    transition: color 0.12s;
}
.btn-icon--archive:hover {
    color: var(--ink-tertiary);
}
.btn-icon--restore {
    color: var(--ink-glyph);
    transition: color 0.12s;
}
.btn-icon--restore:hover {
    color: var(--success-strong);
}

.btn-link {
    background: none;
    border: none;
    color: #5555aa;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.12s;
}
.btn-link:hover {
    color: #8888ee;
}
.btn-link--muted {
    color: #33333f;
}
.btn-link--muted:hover {
    color: #5555aa;
}

/* ── Recording card sprint assignment ────────────────────────────── */
.recording-card__sprint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}
.sprint-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6666aa;
    background: #1a1a2e;
    border: 1px solid #2a2a44;
    border-radius: 5px;
    padding: 0.15rem 0.35rem 0.15rem 0.55rem;
    transition: background 0.12s;
}
.sprint-tag:hover {
    background: #22224a;
    color: #9999dd;
}
.sprint-tag__remove {
    background: none;
    border: none;
    color: #4a4a6a;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}
.sprint-tag__remove:hover { color: #e06060; }
.sprint-assign-select {
    background: #13131a;
    border: 1px solid #2e2e38;
    border-radius: 6px;
    color: #9090a8;
    font-family: inherit;
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.sprint-assign-select:focus {
    border-color: #5b5bd6;
}

/* ── Transcript download button ──────────────────────────────────── */
.btn--download-transcript {
    background: #1a1a3a;
    border-color: #3a3a6a;
    color: #9090ee;
    cursor: pointer;
    font-family: inherit;
}
.btn--download-transcript:hover {
    background: #22224a;
    border-color: #5b5bd6;
}

/* ── Transcript Modal ────────────────────────────────────────────── */
.transcript-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.transcript-modal {
    background: #0f0f16;
    border: 1px solid #2a2a3a;
    border-radius: 14px;
    width: 100%;
    max-width: 820px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}
.transcript-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #1e1e28;
    flex-shrink: 0;
}
.transcript-modal__title {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f2;
    margin-bottom: 0.2rem;
}
.transcript-modal__subtitle {
    font-size: 0.78rem;
    color: #55556a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 540px;
}
.transcript-modal__filters {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid #1a1a28;
    flex-shrink: 0;
    background: #0d0d14;
}
.filter-label {
    font-size: 0.72rem;
    color: #44444f;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.2rem;
}
.speaker-chip {
    background: #13131a;
    border: 1px solid #2e2e38;
    color: #55556a;
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.speaker-chip:hover {
    border-color: #44445a;
    color: #9090a8;
}
.speaker-chip--active {
    border-color: #5b5bd6 !important;
    color: #9090ee !important;
    background: #1a1a2e !important;
}
.transcript-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem 1.5rem 1.5rem;
}
.transcript-loading {
    text-align: center;
    padding: 2.5rem;
    color: #55556a;
}
.transcript-loading p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.transcript-error {
    color: #f87171;
    padding: 1rem;
    font-size: 0.85rem;
}
.transcript-segments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.transcript-segment {
    padding: 0.55rem 0.85rem;
    border-left: 3px solid #2a2a38;
    border-radius: 0 7px 7px 0;
    background: #13131a;
    transition: background 0.12s;
}
.transcript-segment:hover {
    background: #16161e;
}
.transcript-segment__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.transcript-segment__speaker {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.12rem 0.55rem;
    border-radius: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.transcript-segment__time {
    font-size: 0.68rem;
    color: #44444f;
    font-family: "Cascadia Code", "Fira Code", monospace;
}
.transcript-segment__text {
    font-size: 0.875rem;
    color: #c8c8d8;
    line-height: 1.65;
    margin: 0;
}
.transcript-segment--active {
    background: #1a1a2e !important;
    border-left-color: #5b5bd6 !important;
}
.transcript-segment--active .transcript-segment__text {
    color: #e8e8f8;
}
.transcript-segment[title] {
    cursor: pointer;
}

/* ── Teleprompter controls ───────────────────────────────────────── */
.transcript-modal__controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.teleprompter-btn {
    background: #1a1a2e;
    border: 1px solid #3a3a6a;
    color: #8888ee;
    font-size: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.teleprompter-btn:hover {
    background: #22224a;
    border-color: #5b5bd6;
    color: #aaaaf0;
}
.teleprompter-btn--playing {
    background: #22224a;
    border-color: #5b5bd6;
    color: #5b5bd6;
    animation: pulse-play 2s ease-in-out infinite;
}
@keyframes pulse-play {
    0%, 100% { box-shadow: 0 0 0 0 rgba(91, 91, 214, 0.3); }
    50% { box-shadow: 0 0 0 5px rgba(91, 91, 214, 0); }
}
.teleprompter-scroll-btn {
    background: #13131a;
    border: 1px solid #2e2e38;
    color: #44444f;
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.teleprompter-scroll-btn:hover {
    border-color: #44445a;
    color: #9090a8;
}
.teleprompter-scroll-btn--active {
    background: #0e2718;
    border-color: #1a4a2e;
    color: #4ade80;
}

/* ── Speaker rename UI ───────────────────────────────────────────── */
.btn-rename-speakers {
    background: none;
    border: 1px solid #2a2a3a;
    color: #55556a;
    font-family: inherit;
    font-size: 0.72rem;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: auto;
}
.btn-rename-speakers:hover {
    border-color: #5b5bd6;
    color: #9090ee;
}
.speaker-rename-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    margin: 0.35rem 0;
}
.speaker-rename-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.speaker-rename-original {
    font-size: 0.75rem;
    color: #55556a;
    min-width: 120px;
    font-family: "Cascadia Code", "Fira Code", monospace;
}
.speaker-rename-arrow {
    color: #33333f;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.speaker-rename-input {
    flex: 1;
    background: #1a1a26;
    border: 1px solid #3a3a5a;
    border-radius: 5px;
    color: #e0e0f0;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.25rem 0.5rem;
    outline: none;
    transition: border-color 0.15s;
    min-width: 0;
}
.speaker-rename-input:focus {
    border-color: #5b5bd6;
}
.speaker-mode-btn {
    background: none;
    border: 1px solid #2a2a3a;
    color: #55556a;
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.speaker-mode-btn:hover {
    border-color: #5b5bd6;
    color: #9090ee;
}
.speaker-mode-btn--active {
    border-color: #5b5bd6;
    color: #9090ee;
    background: #1a1a30;
}
.speaker-rename-select {
    flex: 1;
    background: #1a1a26;
    border: 1px solid #3a3a5a;
    border-radius: 5px;
    color: #e0e0f0;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.25rem 0.5rem;
    outline: none;
    transition: border-color 0.15s;
    min-width: 0;
}
.speaker-rename-select:focus {
    border-color: #5b5bd6;
}

/* ── Transcript search bar ───────────────────────────────────────── */
.transcript-search-bar {
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid #1a1a28;
    background: #0d0d14;
    flex-shrink: 0;
}
.transcript-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #13131a;
    border: 1px solid #2e2e38;
    border-radius: 8px;
    padding: 0.15rem 0.5rem 0.15rem 0.75rem;
    transition: border-color 0.15s;
}
.transcript-search-wrap:focus-within {
    border-color: #5b5bd6;
}
.transcript-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #e0e0f0;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.3rem 0;
    min-width: 0;
}
.transcript-search-input::placeholder {
    color: #44444f;
}
.transcript-search-count {
    font-size: 0.72rem;
    color: #55556a;
    white-space: nowrap;
    padding: 0 0.2rem;
}
.transcript-search-nav {
    background: none;
    border: none;
    color: #55556a;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.12s;
    flex-shrink: 0;
}
.transcript-search-nav:hover {
    color: #9090ee;
}
.transcript-search-clear {
    background: none;
    border: none;
    color: #44444f;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.12s;
    flex-shrink: 0;
}
.transcript-search-clear:hover {
    color: #f87171;
}
.search-mark {
    background: #4a3a10;
    color: #f0c040;
    border-radius: 2px;
    padding: 0 1px;
}
.search-mark--active {
    background: #7a5a10;
    color: #ffe080;
    outline: 1px solid #f0c040;
}
.search-mark--fuzzy {
    background: #1a3a2a;
    color: #6ee7b7;
    border-radius: 2px;
    padding: 0 1px;
}
.search-mark--fuzzy.search-mark--active {
    background: #1a5a38;
    color: #a7f3d0;
    outline: 1px solid #4ade80;
}
.transcript-segment--search-active {
    outline: 1px solid #7a5a10;
}

/* ── Transcript modal footer ─────────────────────────────────────── */
.transcript-modal__footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #1e1e28;
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* ── Project page ────────────────────────────────────────────────── */
.project-page {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: #0d0d14;
    overflow: hidden;
}
/* Вкладка «Задачи» внутри проекта делит светлые карточки/блоки с /tasks
   (побочный эффект переиспользования компонентов) — фон-«холст» под ними
   меняется вместе, иначе сквозь них просвечивал бы тёмный фон .project-page. */
.project-page--tasks-light {
    background: var(--surface-canvas);
}
.project-page__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    height: 52px;
    border-bottom: 1px solid #1e1e30;
    background: #12121c;
    flex-shrink: 0;
}
.project-page__back {
    color: #6060a0;
    font-size: 0.85rem;
    white-space: nowrap;
}
.project-page__back:hover { color: #a0a0d0; }
.project-page__title {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: #e0e0f0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-page__tabs {
    display: flex;
    gap: 0.15rem;
}
.project-tab {
    background: none;
    border: none;
    border-radius: 6px;
    color: #6060a0;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.3rem 0.9rem;
    transition: color 0.15s, background 0.15s;
}
.project-tab:hover { color: #c0c0e0; background: #1a1a28; }
.project-tab--active { color: #c0c0ff; background: #1e1e32; }



/* ── Body ────────────────────────────────────────────────────────── */
.project-page__body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.project-page__map {
    align-items: center;
    justify-content: center;
}

/* ── Drill-down view ─────────────────────────────────────────────── */
.drill-view {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Навигация / хлебные крошки */
.drill-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid #1a1a2e;
    flex-shrink: 0;
    background: #0f0f1e;
}
.drill-back {
    background: none;
    border: none;
    color: #5050a0;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.drill-back:hover { color: #a0a0e0; background: #1a1a30; }
.drill-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    min-width: 0;
}
.drill-crumb {
    background: none;
    border: none;
    color: #5050a0;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
    white-space: nowrap;
}
.drill-crumb:hover { color: #b0b0e0; background: #1a1a30; }
.drill-crumb--active { color: #c0c0ff; cursor: default; }
.drill-crumb--active:hover { background: none; }
.drill-sep { color: #2a2a50; font-size: 0.8rem; }

/* Анимированный уровень */
.drill-level {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Transition: drill in */
.drill-in-enter-active { transition: opacity 0.22s ease, transform 0.22s ease; }
.drill-in-leave-active { transition: opacity 0.15s ease, transform 0.15s ease; }
.drill-in-enter-from  { opacity: 0; transform: scale(1.04) translateX(20px); }
.drill-in-leave-to    { opacity: 0; transform: scale(0.96) translateX(-20px); }

/* Transition: drill out */
.drill-out-enter-active { transition: opacity 0.22s ease, transform 0.22s ease; }
.drill-out-leave-active { transition: opacity 0.15s ease, transform 0.15s ease; }
.drill-out-enter-from  { opacity: 0; transform: scale(0.96) translateX(-20px); }
.drill-out-leave-to    { opacity: 0; transform: scale(1.04) translateX(20px); }

/* Сетка карточек блоков */
.drill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
    margin-bottom: 2rem;
}

/* Карточка блока */
.drill-card {
    position: relative;
    background: #13132a;
    border: 1px solid #1e1e3a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.18s, transform 0.15s, box-shadow 0.18s;
    user-select: none;
}
.drill-card:hover {
    border-color: #3a3a70;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.drill-card__accent {
    height: 4px;
    background: linear-gradient(90deg, #3a3aaa, #5050d0);
    flex-shrink: 0;
}
.drill-card__body {
    flex: 1;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.drill-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #d0d0f8;
    line-height: 1.3;
    word-break: break-word;
}
.drill-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}
.drill-stat {
    font-size: 0.72rem;
    color: #5050a0;
    background: #0e0e20;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}
.drill-stat--empty { color: #333360; }
.drill-card__arrow {
    position: absolute;
    bottom: 0.7rem;
    right: 0.9rem;
    font-size: 1.1rem;
    color: #303068;
    transition: color 0.15s, right 0.15s;
}
.drill-card:hover .drill-card__arrow { color: #7070c0; right: 0.65rem; }

.drill-card__del {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #2a2a50;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s, background 0.12s;
    z-index: 2;
}
.drill-card:hover .drill-card__del { opacity: 1; }
.drill-card__del:hover { color: #e06060; background: #2a1020; }

/* Карточка «+ Добавить» */
.drill-card--add {
    border-style: dashed;
    border-color: #1e1e3a;
    background: transparent;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-direction: column;
    min-height: 120px;
}
.drill-card--add:hover { border-color: #4040a0; background: #0f0f22; }
.drill-card__plus { font-size: 1.5rem; color: #303068; transition: color 0.15s; }
.drill-card--add:hover .drill-card__plus { color: #7070c0; }
.drill-card__add-label { font-size: 0.78rem; color: #353570; transition: color 0.15s; }
.drill-card--add:hover .drill-card__add-label { color: #8080c0; }

/* Форма добавления */
.drill-add-form {
    background: #0f0f22;
    border: 1px solid #1e1e40;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    max-width: 540px;
}

/* Задачи под карточками */
.drill-tasks { margin-top: 0.5rem; }
.drill-tasks__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #404070;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0.25rem 0.5rem;
}
.drill-task {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: background 0.1s;
}
.drill-task:hover { background: #13132a; }
.drill-task__check { accent-color: #5b5bd6; cursor: pointer; flex-shrink: 0; }
.drill-task__title { flex: 1; font-size: 0.87rem; color: #b0b0d8; }
.drill-task--done .drill-task__title { text-decoration: line-through; color: #404068; }
.drill-task__prio { color: #c06060; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }
.drill-task__del {
    background: none; border: none; color: #2a2a50;
    cursor: pointer; font-size: 0.85rem; padding: 0 0.15rem;
    opacity: 0; transition: opacity 0.12s, color 0.12s; flex-shrink: 0;
}
.drill-task:hover .drill-task__del { opacity: 1; }
.drill-task__del:hover { color: #e06060; }

/* ── Shared ──────────────────────────────────────────────────────── */
.btn-link--sm { font-size: 0.78rem; }
.btn-icon--sm { width: 20px; height: 20px; font-size: 0.72rem; }
.tree-add-form__type { display: flex; gap: 0.3rem; }
.tree-type-btn {
    background: #0e0e20; border: 1px solid #2a2a50; border-radius: 5px;
    color: #5050a0; cursor: pointer; font-size: 0.78rem; padding: 0.2rem 0.7rem;
    transition: all 0.12s;
}
.tree-type-btn:hover { color: #a0a0e0; border-color: #4040a0; }
.tree-type-btn--active { background: #1a1a40; border-color: #5b5bd6; color: #a0a0ff; }
.tree-add-textarea {
    background: #0e0e1e; border: 1px solid #2a2a50; border-radius: 6px;
    color: #d0d0f0; font-family: inherit; font-size: 0.85rem;
    padding: 0.5rem 0.65rem; resize: vertical; min-height: 72px;
}
.tree-add-textarea:focus { outline: none; border-color: #5b5bd6; }
.tree-add-form__hint { font-size: 0.72rem; color: #40406a; }
.tree-add-input {
    background: #0e0e1e; border: 1px solid #2a2a50; border-radius: 6px;
    color: #d0d0f0; font-family: inherit; font-size: 0.85rem;
    padding: 0.4rem 0.65rem; width: 100%;
}
.tree-add-input:focus { outline: none; border-color: #5b5bd6; }
.tree-add-form__actions { display: flex; gap: 0.5rem; align-items: center; }
.task-input {
    flex: 1; background: #1a1a2a; border: 1px solid #2e2e50;
    border-radius: 5px; color: #e0e0f0; padding: 0.35rem 0.65rem;
    font-size: 0.85rem; min-width: 0;
}
.task-input:focus { outline: none; border-color: #5b5bd6; }

/* ══ Hub viz ════════════════════════════════════════════════════════ */
.hub-view {
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, #090f28 0%, #050814 65%);
}
.hub-svg {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
}
.hub-line {
    stroke: #1e4a8a;
    stroke-width: 1.5;
    filter: url(#hub-glow);
    opacity: 0.55;
}

/* Core */
.hub-core {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px; height: 110px;
    pointer-events: none;
}
.hub-core__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid #00ccff;
    box-shadow: 0 0 14px #00ccff55, inset 0 0 14px #00ccff1a;
    animation: hub-pulse 3.5s ease-in-out infinite;
}
.hub-core__ring--outer {
    inset: -10px;
    border-color: #00ccff33;
    animation-delay: 0.8s;
}
.hub-core__name {
    position: relative;
    z-index: 2;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7ae8ff;
    text-align: center;
    max-width: 88px;
    line-height: 1.35;
    text-shadow: 0 0 12px #00ccffaa;
    word-break: break-word;
}
@keyframes hub-pulse {
    0%, 100% { opacity: 0.85; box-shadow: 0 0 14px #00ccff55, inset 0 0 14px #00ccff1a; }
    50%       { opacity: 1;    box-shadow: 0 0 28px #00ccff88, inset 0 0 24px #00ccff33; }
}

/* ── Hub nodes (base) ─────────────────────────────────────────────── */
.hub-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    cursor: pointer;
    width: 210px;
    border-radius: 9px;
    overflow: hidden;
}
.hub-node__inner {
    border-radius: 0 0 9px 9px;
    padding: 0.6rem 0.75rem 0.65rem;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.hub-node__title {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.hub-node__cover {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #1a3a30;
}

/* ── Block node ───────────────────────────────────────────────────── */
.hub-node--block .hub-node__inner {
    background: #0b1628;
    border: 1px solid #1c3f70;
}
.hub-node--block:hover .hub-node__inner {
    border-color: #4a90e8;
    box-shadow: 0 0 18px #1e4a8a66;
    background: #0d1e3a;
}
.hub-node--block .hub-node__title { color: #88b8f0; }

/* ── Task node ────────────────────────────────────────────────────── */
.hub-node--task .hub-node__inner {
    background: #091e18;
    border: 1px solid #1a4a38;
}
.hub-node--task:hover .hub-node__inner {
    border-color: #3a9a78;
    box-shadow: 0 0 18px #1a6a4866;
    background: #0c2820;
}
.hub-node--task .hub-node__title { color: #70dab0; }
.hub-node--done .hub-node__inner {
    border-color: #0f2a20;
    background: #060e0b;
}
.hub-node--done .hub-node__title {
    text-decoration: line-through;
    color: #2a5a48;
}
.hub-node--high .hub-node__inner {
    border-color: #5a2a20;
    box-shadow: 0 0 8px #5a1a0a44;
}
.hub-line--task {
    stroke: #1a5a40;
    stroke-width: 1.2;
    filter: url(#hub-glow);
    opacity: 0.45;
    stroke-dasharray: 4 4;
}
.hub-node__preview {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.hub-node__sub {
    font-size: 0.68rem;
    color: #385880;
    font-style: italic;
}
.hub-node__empty {
    font-size: 0.68rem;
    color: #1e3050;
    font-style: italic;
}
.hub-node__del {
    position: absolute;
    top: -7px; right: -7px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #120608;
    border: 1px solid #40202a;
    color: #7a3848;
    font-size: 0.7rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.15s;
}
.hub-node:hover .hub-node__del { display: flex; }
.hub-node__del:hover { color: #e06060; }

/* Add node */
.hub-node--add {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #080e1c;
    border: 1.5px dashed #1e3a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, background 0.18s;
}
.hub-node--add:hover {
    border-color: #4a8adf;
    background: #0c1828;
}
.hub-node__plus {
    font-size: 1.4rem;
    color: #1e3a5a;
    line-height: 1;
    transition: color 0.18s;
}
.hub-node--add:hover .hub-node__plus { color: #5a9af0; }

/* Add overlay / form */
.hub-add-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 18, 0.72);
    backdrop-filter: blur(5px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-add-form {
    background: #0c1728;
    border: 1px solid #1e4a8a;
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 0 50px #0c2050aa;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.hub-add-form__header { display: flex; gap: 0.4rem; }
.hub-type-btn {
    padding: 0.28rem 0.9rem;
    border-radius: 6px;
    background: transparent;
    border: 1px solid #1e3a5a;
    color: #4a70a0;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.14s;
}
.hub-type-btn:hover { color: #88b8f0; border-color: #4a8adf; }
.hub-type-btn--active { background: #142040; border-color: #3a7adf; color: #88c0f8; }
.hub-type-btn:disabled { cursor: default; }
.hub-add-input, .hub-add-textarea {
    width: 100%;
    background: #060d1c;
    border: 1px solid #1e3a5a;
    border-radius: 7px;
    color: #b0d0f0;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.14s;
}
.hub-add-input:focus, .hub-add-textarea:focus { border-color: #4a8adf; }
.hub-add-textarea { resize: vertical; min-height: 90px; }
.hub-add-hint { font-size: 0.72rem; color: #2a4a6a; }
.hub-add-form__actions { display: flex; gap: 0.6rem; align-items: center; }

/* ── Global Tasks Tab ──────────────────────────────────────────────────── */
.global-tasks {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #0d0d14;
}
.global-tasks__toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #14141f;
    flex-shrink: 0;
}
.global-tasks__projects {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}
.global-tasks__project {
    border-bottom: 1px solid #14141f;
}
.global-tasks__project--drag-over { background: rgba(60,80,160,0.07); }
.global-tasks__project-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: #0f0f1a;
    position: sticky;
    top: 0;
    z-index: 2;
}
.global-tasks__toggle {
    background: none;
    border: none;
    color: #3a3a5a;
    cursor: pointer;
    font-size: 0.65rem;
    padding: 0;
    width: 14px;
    flex-shrink: 0;
}
.global-tasks__toggle:hover { color: #8080b0; }
.global-tasks__project-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #8090c0;
    flex: 1;
    letter-spacing: 0.02em;
}
.global-tasks__project-count {
    font-size: 0.72rem;
    color: #2a3a5a;
}
.global-tasks__add-root {
    background: none;
    border: none;
    color: #2a3a6a;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.2rem;
    line-height: 1;
    transition: color 0.12s;
}
.global-tasks__add-root:hover { color: #6080c0; }
.global-tasks__outline { padding: 0.2rem 0 0.4rem; }
.global-outline-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    padding-right: 0.8rem;
    min-height: 28px;
    cursor: default;
    transition: background 0.1s;
    position: relative;
}
.global-outline-row:hover { background: #101018; }
.global-outline-row--task { cursor: pointer; }
.global-outline-row--done .global-outline-row__title { text-decoration: line-through; color: #2a3a50; }
.global-outline-row--dragging { opacity: 0.4; }
.global-outline-row--block { background: transparent; }
.global-outline-row__icon { font-size: 0.72rem; color: #2a4060; flex-shrink: 0; }
.global-outline-row__title { flex: 1; font-size: 0.82rem; color: #7090b8; }
.global-outline-row--block .global-outline-row__title { color: #5570a0; font-size: 0.8rem; }
.global-outline-row__badge {
    font-size: 0.68rem;
    color: #2a4060;
    background: #0d1525;
    border-radius: 8px;
    padding: 0 0.35rem;
    flex-shrink: 0;
}
.global-outline-row__add {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.2rem;
    line-height: 1;
    transition: color 0.12s;
    flex-shrink: 0;
}
.global-outline-row:hover .global-outline-row__add { color: #2a4060; }
.global-outline-row__add:hover { color: #6080c0 !important; }
.global-add-form {
    margin: 0.4rem 1.2rem 0.6rem;
    background: #0e0e1c;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.global-add-form__tabs { display: flex; gap: 0.3rem; }
.global-add-form__actions { display: flex; gap: 0.6rem; align-items: center; }
.global-tasks__empty { font-size: 0.78rem; color: #1e2a3a; padding: 0.4rem 1.4rem; }
.global-tasks__no-projects { color: #2a3a5a; font-size: 0.85rem; padding: 2rem; text-align: center; }

.outline-item--project {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem 0.45rem;
    background: #0f0f1a;
    border-top: 1px solid #1a1a2e;
    border-bottom: 1px solid #1a1a2e;
    margin-top: 3rem;
    position: sticky;
    top: 0;
    z-index: 3;
}
.outline-item--project:first-child { margin-top: 0; }
.goutline-project-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 1;
}

/* Tasks panel (bottom-center) */
.hub-tasks-panel {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 78%);
    background: #07101e;
    border: 1px solid #162840;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    z-index: 8;
    max-height: 220px;
    overflow-y: auto;
}
.hub-tasks-panel__title {
    font-size: 0.7rem;
    color: #2a4a6a;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}
.hub-task {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #0c1828;
}
.hub-task:last-child { border-bottom: none; }
.hub-task__check { accent-color: #4a8adf; cursor: pointer; flex-shrink: 0; }
.hub-task__title { flex: 1; font-size: 0.82rem; color: #6888b0; }
.hub-task--done .hub-task__title { text-decoration: line-through; color: #2a3a50; }
.hub-task__del {
    background: none; border: none; color: #2a3040; cursor: pointer;
    font-size: 0.9rem; padding: 0 0.15rem;
    opacity: 0; transition: opacity 0.12s;
}
.hub-task:hover .hub-task__del { opacity: 1; }
.hub-task__del:hover { color: #c04040; }

/* Metro navigation */
.metro-nav {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
}
.metro-track {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}
.metro-track::before {
    content: '';
    position: absolute;
    right: 4px;
    top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #1e4a8a55 20%, #1e4a8a55 80%, transparent);
}
.metro-stop {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    flex-direction: row-reverse;
    position: relative;
}
.metro-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #112038;
    border: 2px solid #1e4a8a;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.metro-stop--active .metro-dot {
    background: #00ccff;
    border-color: #00ccff;
    box-shadow: 0 0 10px #00ccff99;
}
.metro-stop:hover .metro-dot {
    background: #3a7adf;
    border-color: #6aaaf8;
}
.metro-label {
    font-size: 0.73rem;
    color: #2e5080;
    text-align: right;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.18s;
}
.metro-stop--active .metro-label {
    color: #60d8ff;
    font-weight: 600;
}
.metro-stop:hover .metro-label { color: #6090c0; }

/* ── Node icon ────────────────────────────────────────────────────── */
.hub-node__icon {
    font-size: 0.7rem;
    flex-shrink: 0;
    line-height: 1;
}
.hub-node__icon--block { color: #3a70c8; }
.hub-node__icon--task  { color: #3aaa80; }
.hub-node--done .hub-node__icon--task { color: #1a5040; }

/* ── Task node extras ─────────────────────────────────────────────── */
.hub-node__prio {
    font-size: 0.72rem;
    font-weight: 700;
    color: #d06040;
    flex-shrink: 0;
    line-height: 1;
}
.hub-node__desc {
    font-size: 0.67rem;
    color: #2a6a58;
    margin: 0.2rem 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hub-node--done .hub-node__desc { color: #1a3028; }
.hub-node__task-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}
.hub-node__task-cl {
    font-size: 0.62rem;
    color: #2a6a58;
}
.hub-node__due {
    font-size: 0.62rem;
    color: #4a7a60;
    background: #0c2018;
    border: 1px solid #1a4030;
    border-radius: 3px;
    padding: 0 0.2rem;
}

/* Task modal: meta row */
.task-modal__meta-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.task-modal__meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.task-modal__meta-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #2a4a6a;
}
.task-prio-btns {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 9px;
    background: var(--ink-wash);
    box-shadow: inset 0 0 0 0.5px var(--ink-wash);
}
.task-prio-btn {
    flex: 1;
    text-align: center;
    padding: 5px 0;
    border-radius: 7px;
    background: transparent;
    font-size: 12.5px;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.14s;
    border: 1px solid transparent;
    color: var(--ink-tertiary);
}
.task-prio-btn--low.task-prio-btn--active    { background: var(--success-tint); border-color: var(--success-border); color: var(--success-strong); font-weight: 600; }
.task-prio-btn--normal.task-prio-btn--active { background: var(--warn-tint); border-color: var(--warn-border); color: var(--warn-strong); font-weight: 600; }
.task-prio-btn--high.task-prio-btn--active   { background: var(--danger-tint); border-color: var(--danger-strong); color: var(--danger-strong); font-weight: 600; }
.task-prio-btn:not(.task-prio-btn--active):hover { color: var(--ink); }
.task-modal__due-input {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    padding: 8px 11px;
    font-size: 12.5px;
    font-family: var(--font-mono);
    box-shadow: var(--shadow-inset);
    outline: none;
    transition: border-color 0.14s;
    color-scheme: light;
}
.task-modal__due-input:focus { border-color: var(--accent-border); }
.task-time-remaining {
    margin-top: 0.4rem;
    font-size: 12px;
    color: var(--success-strong);
    font-weight: 500;
}
.task-time-remaining--overdue {
    color: var(--danger-strong);
}
.task-completion-duration {
    margin-top: 0.4rem;
    font-size: 12px;
    color: var(--success-strong);
    font-weight: 500;
}
.task-created-date {
    font-size: 13px;
    color: var(--ink-strong);
    font-family: var(--font-mono);
}

/* Hub core counter */
.hub-core__count {
    position: relative;
    z-index: 2;
    font-size: 0.68rem;
    color: #2a9aaa;
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
}

/* Hub node badge */
.hub-node__head {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
}
.hub-node__badge {
    font-size: 0.65rem;
    color: #2a7aaa;
    background: #091828;
    border: 1px solid #1a3858;
    border-radius: 4px;
    padding: 0 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
}
.hub-node__task {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    cursor: pointer;
}
.hub-node__task:hover .hub-node__task-title { color: #88b8f0; }
.hub-node__task-title {
    font-size: 0.68rem;
    color: #4a70a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    transition: color 0.14s;
}
.hub-node__task--done .hub-node__task-title {
    text-decoration: line-through;
    opacity: 0.4;
}
.hub-node__task-cl {
    font-size: 0.62rem;
    color: #2a5870;
    flex-shrink: 0;
}

/* Hub task cl badge */
.hub-task__cl {
    font-size: 0.72rem;
    color: #2a6a8a;
    background: #091828;
    border: 1px solid #142838;
    border-radius: 4px;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

/* ══ Task detail modal ══════════════════════════════════════════════ */
.task-modal-overlay {
    position: fixed;
    inset: 0;
    background: oklch(0.22 0.015 265 / 0.45);
    backdrop-filter: blur(6px);
    /* Выше хронологии (1200) и её тултипов (2000) — карточку задачи должно
       быть можно открыть поверх хронологии, не закрывая её под собой */
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
/* Fancybox по умолчанию открывается на z-index 1050 — ниже попапа задачи
   (2100), поэтому фото при клике оказывалось под попапом. Поднимаем выше. */
:root {
    --fancybox-zIndex: 2200;
}
.task-modal {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 14px;
    width: 520px;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-popover-lg);
    overflow: hidden;
    font-family: var(--font-ui);
    color: var(--ink);
}
.task-modal--large {
    width: 1000px;
    max-height: calc(100vh - 40px);
}
.task-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(180deg, oklch(0.99 0.004 265), oklch(0.97 0.005 265));
    border-bottom: 1px solid var(--ink-border-input);
    flex-shrink: 0;
}
.task-modal__check {
    background: none;
    border: 1.5px solid var(--ink-border-strong);
    border-radius: 6px;
    color: var(--ink-muted);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 12px;
    height: 22px;
    line-height: 1;
    padding: 0;
    transition: color 0.12s, border-color 0.12s;
    width: 22px;
}
.task-modal__check:hover { border-color: var(--accent-border); color: var(--accent-strong); }
.task-modal__title-input {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    outline: none;
    padding: 3px 6px;
    font-family: inherit;
    min-width: 0;
    transition: border-color 0.15s;
}
.task-modal__title-input:hover { border-color: var(--ink-border-input); }
.task-modal__title-input:focus { border-color: var(--accent-border); background: var(--surface-card); }
.task-modal__title-input--done {
    text-decoration: line-through;
    color: var(--ink-muted);
}
.task-modal__title-input--cancelled {
    text-decoration: line-through;
    color: var(--ink-faint);
}
.task-modal__close {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 14px;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 7px;
    transition: color 0.14s, background 0.14s;
    flex-shrink: 0;
}
.task-modal__close:hover { background: var(--ink-divider); color: var(--ink); }
.task-modal__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.task-modal__not-found {
    padding: 2rem 1.5rem;
    color: var(--ink-muted);
    font-size: 15px;
    text-align: center;
}
.task-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scrollbar-color: var(--ink-border-strong) transparent;
}
.task-modal__body::-webkit-scrollbar { width: 4px; }
.task-modal__body::-webkit-scrollbar-track { background: transparent; }
.task-modal__body::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.task-modal__body::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
.task-modal__body--cols {
    flex: 1;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    padding: 0;
}
.task-modal__col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding: 20px 22px 24px;
    min-height: 0;
}
.task-modal__col { scrollbar-color: var(--ink-border-strong) transparent; }
.task-modal__col::-webkit-scrollbar { width: 4px; }
.task-modal__col::-webkit-scrollbar-track { background: transparent; }
.task-modal__col::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.task-modal__col::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }

.task-modal__col--main {
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid var(--ink-border-input);
}
.task-modal__col--meta {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-panel-2);
}
.task-modal__section {
    display: flex;
    flex-direction: column;
}
.task-modal__section--flex {
    flex: 1;
}
.task-modal__section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 9px;
}
.task-modal__desc {
    width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-strong);
    padding: 0.6rem 0.8rem;
    font-size: 13.5px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    min-height: 140px;
    box-shadow: var(--shadow-inset);
    transition: border-color 0.14s;
}
.task-modal__desc:focus { border-color: var(--accent-border); }

/* Rich text editor */
.task-desc-edit-wrap {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ink-border-soft);
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-card);
}
.task-desc-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: var(--surface-panel);
    border-bottom: 1px solid var(--ink-border-input);
    flex-shrink: 0;
}
.task-desc-toolbar__btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink-secondary);
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 4px 7px;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
    font-family: inherit;
}
.task-desc-toolbar__btn:hover { color: var(--ink); background: var(--surface-card); box-shadow: var(--shadow-button); }
.task-desc-toolbar__sep {
    width: 1px;
    height: 14px;
    background: var(--ink-border-input);
    margin: 0 3px;
    flex-shrink: 0;
}
.task-modal__desc-editor {
    color: var(--ink-strong);
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.6;
    min-height: 140px;
    padding: 13px;
    outline: none;
    overflow-y: auto;
}
.task-modal__desc-editor { scrollbar-color: var(--ink-border-strong) transparent; }
.task-modal__desc-editor::-webkit-scrollbar { width: 4px; }
.task-modal__desc-editor::-webkit-scrollbar-track { background: transparent; }
.task-modal__desc-editor::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.task-modal__desc-editor strong, .task-modal__desc-editor b { color: var(--ink); }
.task-modal__desc-editor em, .task-modal__desc-editor i { color: var(--ink-strong); }
.task-modal__desc-editor ul, .task-modal__desc-editor ol { padding-left: 1.4rem; margin: 0.3rem 0; }
.task-modal__desc-editor li { margin: 0.15rem 0; }
.task-desc-edit-wrap:focus-within { border-color: var(--accent-border); }

.task-modal__desc-view {
    color: var(--ink-strong);
    font-size: 13.5px;
    line-height: 1.6;
    cursor: text;
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px dashed transparent;
    background: var(--surface-panel-2);
    min-height: 48px;
    transition: border-color 0.14s, background 0.14s;
}
.task-modal__desc-view:hover {
    border-color: var(--ink-border-strong);
    background: var(--surface-panel-2);
}
.task-modal__desc-view--empty {
    color: var(--ink-muted);
    font-style: italic;
    border-color: var(--ink-border-strong);
}
.task-modal__desc-view strong, .task-modal__desc-view b { color: var(--ink); }
.task-modal__desc-view ul, .task-modal__desc-view ol { padding-left: 1.4rem; margin: 0.3rem 0; }
.task-modal__desc-view li { margin: 0.15rem 0; }
.task-modal__desc { scrollbar-color: var(--ink-border-strong) transparent; }
.task-modal__desc::-webkit-scrollbar { width: 4px; }
.task-modal__desc::-webkit-scrollbar-track { background: transparent; }
.task-modal__desc::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.task-modal__desc::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }

/* Task modal cover banner */
.task-modal__cover {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-panel-2);
    border-bottom: 1px solid var(--ink-border-input);
    flex-shrink: 0;
    box-sizing: border-box;
}
.task-modal__cover img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

/* Task links */
.task-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.task-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-inset);
    min-height: 2rem;
}
.task-link__icon {
    font-size: 13.5px;
    flex-shrink: 0;
    opacity: 0.7;
}
.task-link__anchor {
    flex: 1;
    color: var(--accent-strong);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.task-link__anchor:hover { text-decoration: underline; color: var(--accent-solid); }
.task-link__input {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink);
    font-size: 13px;
    padding: 0.2rem 0.4rem;
    outline: none;
}
.task-link__input--url { flex: 2; min-width: 0; }
.task-link__input--label { flex: 1.5; min-width: 0; }
.task-link__input:focus { border-color: var(--accent-border); }
.task-link__action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14.5px;
    padding: 0 0.2rem;
    line-height: 1;
    flex-shrink: 0;
}
.task-link__action--edit { color: var(--ink-muted); }
.task-link__action--edit:hover { color: var(--accent-strong); }
.task-link__action--del { color: var(--ink-muted); }
.task-link__action--del:hover { color: var(--danger-strong); }
.task-link__action--save { color: var(--success-strong); }
.task-link__action--save:hover { color: var(--success-solid); }
.task-link__action--cancel { color: var(--ink-muted); }
.task-link__action--cancel:hover { color: var(--danger-strong); }
.task-link-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
}
.task-link__add-btn {
    background: linear-gradient(180deg, #ffffff, oklch(0.97 0.005 265));
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-strong);
    font-size: 16px;
    cursor: pointer;
    padding: 0.15rem 0.5rem;
    box-shadow: var(--shadow-button);
    flex-shrink: 0;
    line-height: 1.4;
}
.task-link__add-btn:hover:not(:disabled) { border-color: var(--accent-border); color: var(--accent-strong); }
.task-link__add-btn:disabled { opacity: 0.35; cursor: default; }

/* Task relations (связанные задачи) */
.task-relations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.task-relation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-button);
    min-height: 2rem;
}
.task-relation__icon { font-size: 0.8rem; flex-shrink: 0; }
.task-relation__type {
    font-size: 11.5px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.task-relation__anchor {
    flex: 1;
    color: var(--accent-strong);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.task-relation__anchor:hover { text-decoration: underline; color: var(--accent-solid); }
.task-relation__del {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14.5px;
    padding: 0 0.2rem;
    line-height: 1;
    flex-shrink: 0;
    color: var(--ink-muted);
}
.task-relation__del:hover { color: var(--danger-strong); }
.task-relation-add-wrap { position: relative; margin-top: 0.15rem; }
.task-relation-add__btn {
    background: var(--accent-tint);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
}
.task-relation-add__btn:hover { color: var(--accent-strong); border-color: var(--accent-strong); }
.task-relation-add__menu {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    z-index: 200;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 10px;
    width: 420px;
    max-width: 90vw;
    box-shadow: var(--shadow-popover-lg);
}
.task-relation-add__types {
    display: flex;
    gap: 4px;
    padding: 0.4rem 0.5rem 0;
}
.task-relation-add__type {
    background: none;
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-muted);
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    padding: 0.2rem 0.55rem;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.task-relation-add__type:hover { color: var(--ink); }
.task-relation-add__type--active { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent-strong); }
.task-relation-add__search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-panel-2);
    border: none;
    border-bottom: 1px solid var(--ink-border-input);
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
    padding: 0.45rem 0.7rem;
    margin-top: 0.4rem;
    outline: none;
}
.task-relation-add__search::placeholder { color: var(--ink-muted); }
.task-relation-add__list {
    overflow-y: auto;
    max-height: 260px;
    padding: 0.25rem;
}
.task-relation-add__block {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.6rem 0.15rem;
    pointer-events: none;
    user-select: none;
}
.task-relation-add__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    color: var(--ink-strong);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    white-space: normal;
    word-break: break-word;
}
.task-relation-add__item:hover { background: var(--accent-tint); color: var(--accent-strong); }
.task-relation-add__empty {
    display: block;
    font-size: 12px;
    color: var(--ink-muted);
    padding: 0.35rem 0.6rem;
}

/* Task inheritance (наследники) */
.task-inherit-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}
.task-inherit-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.4rem;
}
.task-inherit-row__label {
    font-size: 11.5px;
    color: var(--ink-muted);
    flex-shrink: 0;
    margin-bottom: 0.3rem;
}
/* Карточка родителя — «стопочный» вид, виден краешек предка за карточкой */
.task-parent-card-wrap {
    position: relative;
    z-index: 0;
    display: inline-block;
    max-width: 100%;
    margin: 8px 10px 14px 4px;
}
.task-parent-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    text-decoration: none;
    color: var(--accent-strong);
    font-size: 13px;
    box-shadow: var(--shadow-button);
    transition: background 0.12s, border-color 0.12s;
}
.task-parent-card:hover { border-color: var(--accent-border); color: var(--accent-solid); }
.task-parent-card__icon { font-size: 0.78rem; flex-shrink: 0; }
.task-parent-card__title {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-parent-card-wrap::before,
.task-parent-card-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
}
.task-parent-card-wrap::before {
    /* Ближайшее звено цепочки — новее, поэтому выше в стопке и заметнее */
    z-index: -1;
    background: var(--surface-panel);
    border: 1px solid var(--ink-border-input);
    transform: translate(5px, -6px);
}
.task-parent-card-wrap::after {
    /* Более дальнее звено — старее, поэтому ниже в стопке и тусклее */
    z-index: -2;
    background: var(--surface-content);
    border: 1px solid var(--ink-hairline);
    transform: translate(9px, -12px);
}
.task-inherit-row__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-strong);
    text-decoration: none;
    font-size: 13px;
}
.task-inherit-row__link:hover { text-decoration: underline; color: var(--accent-solid); }
.task-inherit-row__icon { font-size: 0.78rem; }
.task-inherit__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(180deg, #ffffff, oklch(0.97 0.005 265));
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 13px;
    box-shadow: var(--shadow-button);
    align-self: flex-start;
}
.task-inherit__btn:hover { border-color: var(--accent-border); color: var(--accent-strong); }

/* Task files */
.task-files {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.task-files__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.task-file {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.7rem;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 8px;
    box-shadow: var(--shadow-button);
    transition: background 0.14s, border-color 0.14s;
}
.task-file:hover {
    border-color: var(--accent-border);
}
.task-file--image {
    align-items: flex-start;
}
.task-file__preview-wrap {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}
.task-file__cover-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(255,255,255,0.85);
    border: none;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1;
    padding: 2px 3px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.14s;
}
.task-file__cover-btn:hover { color: var(--warn-solid); }
.task-file__cover-btn--active { color: var(--warn-solid); }
.task-file__preview {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    background: var(--surface-content);
    border: 1px solid var(--ink-border-input);
}
.task-file__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.task-file__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.task-file__name {
    font-size: 13px;
    color: var(--ink-strong);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-file__name:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}
.task-file__meta {
    display: flex;
    gap: 0.5rem;
    font-size: 11px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
}
.task-file__type {
    text-transform: uppercase;
    font-weight: 600;
}
.task-file__size {
    color: var(--ink-muted);
}
.task-file__del {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 17.5px;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    transition: color 0.14s;
    flex-shrink: 0;
}
.task-file__del:hover {
    color: var(--danger-strong);
}
.task-files__upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--surface-panel-2);
    border: 1px dashed var(--ink-border-strong);
    border-radius: 10px;
    color: var(--ink-tertiary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.14s;
}
.task-files__upload:hover {
    background: var(--surface-panel);
    border-color: var(--accent-border);
    color: var(--accent-strong);
}

/* Checklist group */
.task-checklist {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 10px;
    padding: 0.7rem 0.8rem 0.5rem;
    margin-bottom: 0.6rem;
    box-shadow: var(--shadow-button);
}
.task-checklist__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.task-checklist__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-strong);
    flex: 1;
    cursor: text;
}
.task-checklist__title-edit {
    flex: 1;
    background: transparent;
    border: none;
    box-shadow: 0 1px 0 0 var(--accent-border);
    color: var(--accent-strong);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    padding: 0;
    margin: 0;
    outline: none;
    min-width: 60px;
}
.task-checklist__progress {
    font-size: 11.5px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
}
.task-checklist__bar {
    flex-shrink: 0;
    width: 56px;
    height: 4px;
    background: var(--ink-border);
    border-radius: 20px;
    overflow: hidden;
}
.task-checklist__bar-fill {
    height: 100%;
    background: var(--success-solid);
    border-radius: 20px;
    transition: width 0.2s;
}
.task-checklist__del {
    background: none;
    border: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 16px;
    padding: 0 0.15rem;
    transition: color 0.12s;
    flex-shrink: 0;
}
.task-checklist__del:hover { color: var(--danger-strong); }
.task-checklist__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 8px 13px;
    border-bottom: 1px solid var(--ink-divider);
}
.task-checklist__item:last-of-type { border-bottom: none; }
/* Нативный чекбокс с accent-color рисует галку и размер по-разному в
   разных браузерах (мелко, чёрным) — вместо этого рисуем галку сами. */
.task-checklist__check {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    margin: 0;
    border-radius: 4px;
    border: 1.5px solid var(--ink-border-strong);
    background: var(--surface-card);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.12s, border-color 0.12s;
}
.task-checklist__check:checked {
    background: var(--success-solid);
    border-color: var(--success-solid);
}
.task-checklist__check:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.task-checklist__item-text {
    flex: 1;
    font-size: 13px;
    color: var(--ink);
    transition: color 0.12s;
}
.task-checklist__item-text--done {
    text-decoration: line-through;
    color: var(--ink-muted);
}
.task-checklist__item-text { cursor: text; }
.task-checklist__item-edit {
    flex: 1;
    background: transparent;
    border: none;
    box-shadow: 0 1px 0 0 var(--accent-border);
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    height: auto;
    display: inline;
    outline: none;
}
.task-checklist__item-del {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    font-size: 13.5px;
    padding: 0 0.1rem;
    transition: color 0.12s;
    flex-shrink: 0;
}
.task-checklist__item:hover .task-checklist__item-del { color: var(--ink-glyph); }
.task-checklist__item-del:hover { color: var(--danger-strong) !important; }
.task-checklist__quick-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--ink-border-input);
}
.task-checklist__new-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 9px 13px;
}
.task-checklist__new-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--ink-muted);
    font-size: 13px;
    font-family: inherit;
    padding: 0.2rem 0;
    outline: none;
    transition: border-color 0.12s;
}
.task-checklist__new-input:focus { border-color: var(--accent-border); }
.task-checklist__new-input::placeholder { color: var(--ink-muted); }
.task-checklist__new-btn {
    background: none;
    border: none;
    color: var(--success-strong);
    cursor: pointer;
    font-size: 13.5px;
    transition: color 0.12s;
}
.task-checklist__new-btn:hover { color: var(--success-solid); }

/* New checklist group */
.task-checklist-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.task-checklist-add__input {
    flex: 1;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
    padding: 9px 13px;
    outline: none;
    box-shadow: var(--shadow-inset);
    transition: border-color 0.14s;
}
.task-checklist-add__input:focus { border-color: var(--accent-border); }
.task-checklist-add__input::placeholder { color: var(--ink-muted); }
.task-checklist-add__btn {
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.7rem;
    transition: all 0.14s;
    white-space: nowrap;
}
.task-checklist-add__btn:hover { background: var(--accent-solid); border-color: var(--accent-solid); }

/* ── Task questions ──────────────────────────────────────────────── */
.task-question {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--ink-divider);
}
.task-question:last-of-type { border-bottom: none; }
.task-question--resolved .task-question__text {
    text-decoration: line-through;
    color: var(--ink-muted);
}
.task-question__check {
    appearance: none;
    -webkit-appearance: none;
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1.5px solid var(--ink-border-strong);
    background: var(--surface-card);
    cursor: pointer;
    position: relative;
    transition: background 0.12s, border-color 0.12s;
}
.task-question__check:checked {
    background: var(--question-solid);
    border-color: var(--question-solid);
}
.task-question__check:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.task-question__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    min-width: 0;
}
.task-question__body:hover .task-question__text { color: var(--question-strong); }
.task-question__text {
    font-size: 13px;
    color: var(--question-strong);
    line-height: 1.4;
    word-break: break-word;
}
.task-question__text strong, .task-question__text b { color: var(--ink); }
.task-question__text em, .task-question__text i { color: var(--ink-strong); }
.task-question__text ul, .task-question__text ol { padding-left: 1.4rem; margin: 0.2rem 0; }
.task-question__text li { margin: 0.1rem 0; }
.task-question__dates {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.task-question__date {
    font-size: 11.5px;
    color: var(--ink-muted);
}
.task-question__resolved-at {
    font-size: 11.5px;
    color: var(--success-strong);
}
.task-question__answer {
    font-size: 12.5px;
    color: var(--ink-tertiary);
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 2px solid var(--ink-border-input);
    padding-left: 6px;
    margin-top: 2px;
}
.task-question__del {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.task-question:hover .task-question__del { color: var(--ink-glyph); }
.task-question__del:hover { color: var(--danger-strong) !important; }

.task-question__move-wrap {
    position: relative;
    flex-shrink: 0;
}
.task-question__move-btn {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    font-size: 13.5px;
    padding: 0 3px;
    line-height: 1;
    transition: color 0.15s;
}
.task-question:hover .task-question__move-btn { color: var(--ink-glyph); }
.task-question__move-btn:hover { color: var(--accent-strong) !important; }
.task-question__move-menu {
    position: absolute;
    right: 0;
    bottom: 100%;
    z-index: 200;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 10px;
    width: 480px;
    max-width: 90vw;
    box-shadow: var(--shadow-popover-lg);
}
.task-question__move-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-panel-2);
    border: none;
    border-bottom: 1px solid var(--ink-border-input);
    border-radius: 10px 10px 0 0;
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
    padding: 0.45rem 0.7rem;
    outline: none;
}
.task-question__move-search::placeholder { color: var(--ink-muted); }
.task-question__move-list {
    overflow-y: auto;
    max-height: 260px;
    padding: 0.25rem;
}
.task-question__move-project {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    border-bottom: 1px solid var(--ink-divider);
    color: var(--ink-muted);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    padding: 0.38rem 0.6rem 0.42rem;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    margin-bottom: 2px;
}
.task-question__move-project:hover { background: var(--accent-tint); color: var(--accent-strong); }
.task-question__move-block {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.6rem 0.15rem;
    pointer-events: none;
    user-select: none;
}
.task-question__move-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    color: var(--ink-strong);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    white-space: normal;
    word-break: break-word;
}
.task-question__move-item:hover { background: var(--accent-tint); color: var(--accent-strong); }
.task-question__move-empty {
    display: block;
    font-size: 12px;
    color: var(--ink-muted);
    padding: 0.35rem 0.6rem;
}

.task-question__edit-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}
/* ── Question rich-text editor ── */
.task-question-editor {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-card);
    width: 100%;
}
.task-question-editor:focus-within { border-color: var(--accent-border); }
.task-question-editor__toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--surface-panel);
    border-bottom: 1px solid var(--ink-border-input);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.task-question-editor__content {
    color: var(--ink-strong);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.55;
    min-height: 60px;
    max-height: 240px;
    padding: 13px;
    outline: none;
    overflow-y: auto;
}
.task-question-editor__content--new { min-height: 96px; }
.task-question-editor__content strong, .task-question-editor__content b { color: var(--ink); }
.task-question-editor__content em, .task-question-editor__content i { color: var(--ink-strong); }
.task-question-editor__content ul, .task-question-editor__content ol { padding-left: 1.4rem; margin: 0.2rem 0; }
.task-question-editor__content li { margin: 0.1rem 0; }
.task-question-editor__content:empty::before { content: attr(data-placeholder); color: var(--ink-muted); pointer-events: none; }

.task-question__edit-date {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-strong);
    font-size: 12.5px;
    padding: 4px 7px;
    width: 160px;
    color-scheme: light;
}
.task-question__edit-date:focus { border-color: var(--accent-border); outline: none; }
.task-question__edit-answer {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-strong);
    font-size: 12.5px;
    padding: 5px 8px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 96px;
}
.task-question__edit-answer:focus { border-color: var(--accent-border); outline: none; }
.task-question__answers-edit {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.task-question__answer-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.task-question__answer-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    background: var(--surface-panel-2);
    border-radius: 6px;
    padding: 4px 6px;
}
.task-question__answer-item--editing {
    padding: 0;
    background: none;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}
.task-question__answer-item-edit-row {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-bottom: 6px;
}
.task-question__answer-item-text {
    flex: 1;
    font-size: 12.5px;
    color: var(--ink-tertiary);
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
}
.task-question__answer-item-text:hover { color: var(--ink); }
.task-question__answer-item-edit {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-strong);
    font-size: 12.5px;
    padding: 5px 8px;
    font-family: inherit;
    resize: vertical;
    min-height: 96px;
    outline: none;
}
.task-question__answer-item-edit:focus { border-color: var(--accent-border); }
.task-question__answer-item-save {
    background: none;
    border: none;
    color: var(--accent-strong);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    transition: color 0.12s;
}
.task-question__answer-item-save:hover { color: var(--accent-solid); }
.task-question__answer-item-del {
    background: none;
    border: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 13.5px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.12s;
}
.task-question__answer-item-del:hover { color: var(--danger-strong); }
.task-question__answers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}
.task-question__edit-actions {
    display: flex;
    gap: 6px;
}
.task-question__save-btn {
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
}
.task-question__save-btn:hover { background: var(--accent-solid); border-color: var(--accent-solid); }
.task-question__cancel-btn {
    background: none;
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 3px 10px;
}
.task-question__cancel-btn:hover { border-color: var(--ink-border-strong); color: var(--ink); }

.task-question-add {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.task-question-add__footer {
    display: flex;
    align-items: center;
    gap: 8px;
}
.task-question-add__date {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 6px;
    color: var(--ink-strong);
    font-size: 12px;
    padding: 5px 6px;
    width: 140px;
    color-scheme: light;
    flex-shrink: 0;
}
.task-question-add__date:focus { border-color: var(--accent-border); outline: none; }
.task-question-add__btn {
    background: var(--accent-tint);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    color: var(--accent-strong);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 10px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.task-question-add__btn:hover { color: var(--accent-strong); border-color: var(--accent-strong); }
.task-question__attach {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13.5px;
    padding: 0 2px;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}
.task-question:hover .task-question__attach { color: var(--ink-tertiary); }
.task-question__attach:hover { color: var(--accent-strong) !important; }
.task-question__file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.task-question__file-chip-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 6px;
    max-width: 220px;
}
.task-question__file-chip {
    font-size: 11.5px;
    color: var(--ink-strong);
    padding: 1px 4px 1px 6px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.task-question__file-chip:hover { color: var(--accent-strong); }
.task-question__file-del {
    background: none;
    border: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1;
    padding: 1px 4px;
    flex-shrink: 0;
    transition: color 0.12s;
}
.task-question__file-del:hover { color: var(--danger-strong); }
.task-file--question {
    border-left: 2px solid var(--question-border);
    background: var(--question-tint);
}
.task-files__group-label {
    font-size: 11.5px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 0 3px;
    margin-top: 4px;
}
.task-files__group-label--question {
    color: var(--question-strong);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.REMOVED_task-file__question-badge {
    display: block;
    font-size: 0.68rem;
    color: #3a6080;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 1px;
}

/* ── Questions page ──────────────────────────────────────────────── */
/* Единое тело страницы — как .main на /directory: залитая обёртка без
   своей рамки/скругления сверху, слитая с шапкой без зазора (та же тень,
   что у неё), скруглена только снизу. .qpage__head — просто первая строка
   внутри неё (без своего фона), .qproj ниже — белые плашки поверх заливки. */
.qpage {
    width: 100%;
    background: var(--surface-content);
    border-radius: 0 0 12px 12px;
    padding: 18px;
    box-shadow: var(--shadow-popover), var(--shadow-hairline);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.qpage__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qpage__title { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 0; }
.qpage__actions { display: flex; align-items: center; gap: 8px; }
.qpage__filter-btn {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 6px;
    color: var(--ink-tertiary);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    padding: 0.25rem 0.75rem;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.qpage__filter-btn:hover { color: var(--accent-strong); border-color: var(--accent-border); }
.qpage__filter-btn--active { background: var(--accent-tint); color: var(--accent-strong); border-color: var(--accent-border); }
.qpage__refresh {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 6px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    padding: 0.25rem 0.75rem;
    transition: color 0.12s, border-color 0.12s;
}
.qpage__refresh:hover { color: var(--accent-strong); border-color: var(--accent-border); }
.qpage__empty { color: var(--ink-faint); font-size: 0.9rem; padding: 1rem 0; }
.qpage__projects { display: flex; flex-direction: column; gap: 1.5rem; }

/* Как .task-panel на /tasks — белая карточка с рамкой и тенью, а не текст
   без своей подложки прямо на холсте. */
.qproj {
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow-card);
}
/* Как .task-panel__project-head на /tasks — градиентная плашка, слитая с
   краями карточки (отрицательный margin вытекает в padding .qproj), а не
   голая строка с нижней рамкой. */
.qproj__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, oklch(0.99 0.004 265), oklch(0.97 0.005 265));
    border-bottom: 1px solid var(--ink-divider);
    border-radius: 12px 12px 0 0;
    margin: -14px -14px 14px;
}
.qproj__name { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.qproj__count {
    font-size: 0.72rem;
    background: var(--accent-tint);
    color: var(--accent-strong);
    border-radius: 10px;
    padding: 1px 7px;
}

/* Слитая карточка — тот же приём, что .task-panel__head +
   .task-panel__head + .task-panel__body на /tasks: акцентная грань слева
   и скругление у заголовка + тела через соседний селектор, а не общая
   рамка на всём .qtask. */
.qtask { margin-bottom: 0.75rem; }
.qtask__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
    background: var(--surface-panel-2);
    border-left: 3px solid var(--accent-strong);
    border-radius: 0 8px 0 0;
    padding: 8px 10px;
}
.qtask__title:hover { background: var(--surface-panel); }
.qtask__title + .qtask__items {
    background: var(--surface-panel-2);
    border-left: 3px solid var(--accent-strong);
    border-radius: 0 0 8px 0;
    padding: 2px 10px 6px;
}

.qitem {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0 5px 8px;
    /* box-shadow, а не border-bottom — тот же приём, что у .task-card
       (style.css ~5069-5083): border-bottom внутри отступа .qtask
       (padding-left/border-left) визуально «утоплен» от истинного края
       .qproj, box-shadow рисуется от padding-box и не создаёт этот зазор. */
    box-shadow: inset 0 -1px 0 var(--ink-divider);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.12s;
}
.qitem:hover { background: oklch(0.985 0.008 275); }
.qitem:last-child { box-shadow: none; }
.qitem--resolved { opacity: 0.5; }
/* Аккордеон решённых вопросов — как .done-group-row на /tasks. */
.qtask__done-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
}
.qtask__done-toggle:hover { background: oklch(0.985 0.008 275); }
.qtask__done-arrow { color: var(--ink-muted); font-size: 12px; width: 14px; flex-shrink: 0; }
.qtask__done-label { color: var(--ink-muted); font-size: 12.5px; letter-spacing: 0.02em; user-select: none; }
.qtask__done-check { color: var(--success-solid); }
/* Значок вопроса — тот же кружок с «?», что и .task-card__question-mark
   на /tasks (style.css ~5258-5271), вместо плоской точки. */
.qitem__dot {
    align-items: center;
    background: var(--question-tint);
    border-radius: 50%;
    color: var(--question-strong);
    display: flex;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: bold;
    height: 17px;
    justify-content: center;
    margin-top: 2px;
    width: 17px;
}
.qitem__dot--resolved { background: var(--success-tint); color: var(--success-strong); }
.qitem__body { flex: 1; min-width: 0; }
.qitem__text {
    font-size: 0.85rem;
    color: var(--ink);
    line-height: 1.4;
    word-break: break-word;
}
.qitem--resolved .qitem__text { text-decoration: line-through; color: var(--ink-muted); }
.qitem__text strong, .qitem__text b { color: var(--ink); }
.qitem__text em, .qitem__text i { color: var(--ink-secondary); }
.qitem__text ul, .qitem__text ol { padding-left: 1.2rem; margin: 0.1rem 0; }
.qitem__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}
.qitem__date { font-size: 0.72rem; color: var(--ink-faint); }
.qitem__resolved-at { font-size: 0.72rem; color: var(--success-strong); }
.qitem__answers { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.qitem__answer { font-size: 0.78rem; color: var(--ink-tertiary); white-space: pre-wrap; word-break: break-word; max-width: 80%; border-left: 2px solid var(--ink-border-input); padding-left: 6px; }
.qitem__answer-label { font-weight: 600; display: block; }
/* Чипы файлов — переиспользуем .task-card__chip с /tasks (см. TaskNode.vue),
   вместо своей плоской пилюли: .qitem__file больше не используется. */
.qitem__files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ── Tasks split view ────────────────────────────────────────────── */
.tasks-apply-btn {
    height: 32px;
    background: linear-gradient(180deg, #ffffff, oklch(0.97 0.005 265));
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    padding: 0 14px;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.tasks-apply-btn:hover { border-color: var(--accent-border); color: var(--accent-strong); }
.outliner-list {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ink-border-strong) transparent;
}
.outliner-list { scrollbar-color: var(--ink-border-strong) transparent; }
.outliner-list::-webkit-scrollbar { width: 4px; }
.outliner-list::-webkit-scrollbar-track { background: transparent; }
.outliner-list::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.outliner-list::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
/* ══ Список задач: панель блока (task-panel) + рекурсивная карточка задачи
   (task-card, TaskNode.vue) — настоящее дерево вместо плоского списка строк
   с CSS-имитацией вложенности. См. useTaskTree.js. ══ */

/* .task-panel — один компонент и для карточки проекта, и рекурсивно для
   каждого блока внутри неё. В макете это два разных уровня: у проекта —
   полноценная белая карточка (радиус 12, рамка, тень, паддинг 14), у блока —
   никакой отдельной обёртки нет, «коробку» рисует уже сам
   .task-panel__head + .task-panel__body (см. ниже) — поэтому здесь паддинг
   и рамку/тень навешиваем только когда первый ребёнок — .task-panel__project-head. */
.task-panel:has(> .task-panel__project-head) {
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 0;
    padding: 14px;
    box-shadow: var(--shadow-card);
}
/* Вложенный блок (блок внутри блока) — своей рамки не рисует (её даёт
   .task-panel__head + .task-panel__body), отступ от соседних строк даёт
   gap родительского .task-panel__body — как в макете, где блок-бокс стоит
   вплотную к паддингу обёртки без дополнительного зазора. */
.task-panel__project-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, oklch(0.99 0.004 265), oklch(0.97 0.005 265));
    border-bottom: 1px solid var(--ink-divider);
    border-radius: 0;
    margin: -14px -14px 14px;
}
.task-panel__project-head .btn-icon--sort {
    background: none;
    border: none;
    color: var(--ink-faint);
    font-size: 13px;
    font-weight: 400;
    opacity: 1;
    padding: 0;
}
.task-panel__project-head .btn-icon--sort:hover:not(:disabled) {
    color: var(--accent-strong);
    background: none;
    opacity: 1;
}
.task-panel__head {
    align-items: center;
    background: var(--surface-panel-2);
    /* Акцентная грань слева — снова обычный border-left (box-shadow рисуется
       от padding-box, а не border-box: с border: 1px solid ... на всех
       сторонах между рамкой и box-shadow оставался зазор в 1px, через
       который просвечивал фон/серый — грань «отодвигалась»). border-bottom
       убран (border-radius снизу слева не скруглён, и border-left 3px рядом
       с border-bottom 1px давал диагональный срез на стыке) — вместо него
       разделитель с body рисует box-shadow, он с border не стыкуется. */
    border: 1px solid var(--ink-hairline);
    border-bottom: none;
    border-left: 3px solid var(--accent-strong);
    box-shadow: inset 0 -1px 0 var(--ink-hairline);
    border-radius: 0;
    cursor: grab;
    display: flex;
    gap: 10px;
    padding: 11px 13px 12px;
    transition: background 0.12s;
}
.task-panel__head:hover { background: var(--surface-panel); }
.task-panel__head:active { cursor: grabbing; }
.task-panel__head.dragging { opacity: 0.5; }
input.task-panel__title {
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
}
.task-panel__head--inactive { opacity: 0.65; }
.task-panel__head--inactive .task-panel__title { color: var(--ink-muted); font-weight: 500; }
.task-panel__head--inactive .tree-block-prog { color: var(--ink-faint); }
.task-panel__head--bug { background: var(--danger-tint); border-left-color: var(--danger-strong); }
.task-panel__head--bug:hover { background: var(--danger-tint); }
.task-panel__head--bug .task-panel__title { color: var(--danger-strong); }
.task-panel__head--bug .tree-block-prog { color: var(--danger-strong); }
.task-panel__body {
    /* Без padding-left: точки перетаскивания задач держит только padding
       самой .task-card (14px, близко к 13px заголовка блока), а разделитель
       между строками (border-bottom у .task-card) идёт вплотную к рамке
       блока, без зазора по краям. Без gap между строками: 2px зазора между
       flex-элементами были «ничьей» полосой — разделитель каждой строки
       рисует её собственная box-shadow, а зазор перед следующей строкой
       никто не заливал, из-за чего заливка при наведении не доходила до
       границы соседней строки. */
    display: flex;
    flex-direction: column;
}
/* Заголовок блока и его содержимое визуально сливаются в один бордер-бокс
   (как в макете — единая карточка группы, а не заголовок-«таблетка» отдельно
   от списка задач). Селектор через «+» задевает только пару
   .task-panel__head + .task-panel__body — заголовок проекта
   (.task-panel__project-head) под этот же .task-panel__body не попадает. */
.task-panel__head + .task-panel__body {
    /* Акцентная полоса — только у заголовка блока (.task-panel__head), а не
       во всю высоту тела с задачами: слева здесь обычный серый hairline,
       как и с остальных трёх сторон, без цвета акцента. Без padding-top —
       иначе между заголовком и первой строкой видна пустая щель, где
       цветная полоса (синяя у заголовка, акцентная у первой задачи)
       прерывается. Без padding-bottom по той же причине — иначе под
       последней строкой (например, под .done-group-row при наведении)
       виден непрокрашенный зазор фона тела (особенно заметно у --bug,
       где фон розовый). Без overflow:hidden — border-radius тут 0, скруглять
       нечего, а overflow:hidden обрезал prio-popup (PriorityPicker.vue) у
       самой первой задачи блока: попап открывается вверх и на первой строке
       вылезает за верхний край тела, прямо под заголовком блока. */
    border: 1px solid var(--ink-hairline);
    border-top: none;
    border-radius: 0;
    background: var(--surface-panel-2);
    margin-bottom: 12px;
}
/* Пустой блок (в котором ни разу не было задач) рендерится как пустой
   <div class="task-panel__body"></div> без плейсхолдера — своя рамка/фон
   тела давали тонкую полосу-«коробку» высотой в 1px (только нижняя
   граница) прямо под разделителем заголовка — визуально «вторая рамка».
   display: none тут не годится — вместе с телом из потока пропадал и его
   margin-bottom (см. правило выше), и пустой блок слипался со следующим
   без зазора. Вместо этого тело остаётся в потоке (высота и так нулевая —
   ни паддинга, ни контента), но рамку и фон снимаем — второй рамки не
   видно, а margin-bottom по-прежнему держит отступ до следующего блока. */
.task-panel__head + .task-panel__body:empty {
    border: none;
    background: none;
}
.task-panel__head--bug + .task-panel__body {
    background: var(--danger-tint);
}
/* Вложенный блок внутри блока (не блок внутри проекта) — сдвинут отступом
   слева, чтобы читаться как «под-блок», а не сливаться границами с
   родителем: без отступа первый под-блок садился вплотную под заголовок
   родителя, а последний — на 1px внутрь его рамки. margin-bottom у
   .task-panel__head + .task-panel__body (12px) рассчитан на верхний
   уровень (между блоками проекта) — на этом уровне обнуляем его и переносим
   управление зазорами на саму обёртку, иначе выходит двойной зазор. */
.task-panel--nested > .task-panel__body > .task-panel--nested {
    margin: 10px 0 10px 18px;
}
.task-panel--nested > .task-panel__body > .task-panel--nested > .task-panel__head + .task-panel__body {
    margin-bottom: 0;
}

.done-group-row {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
}
/* var(--ink-divider) (6% непрозрачности) сливается с фоном настолько, что
   заливка читается только по центру рядом с текстом — как будто заливается
   овал, а не вся строка, хотя ширина по факту полная. Берём тот же тон,
   что и у .task-card:hover — заметно контрастнее. */
.done-group-row:hover { background: oklch(0.985 0.008 275); }

/* Карточка задачи — сама себя рекурсивно вкладывает через .task-card__children */
.task-card {
    /* Без скругления — разделитель снизу должен быть прямой линией на всю
       ширину строки, как в макете, а не дугой урезанной радиусом.
       Сам разделитель — box-shadow, а не border-bottom: border-bottom рядом
       с прозрачным border-left/top/right давал на стыке диагональный «срез»
       (borders всегда сходятся под 45°, если их цвета отличаются), а
       box-shadow с border не стыкуется и рисуется прямоугольником без фасок.
       Границы совсем без border (не просто прозрачной): inset box-shadow
       обрезается по padding-box, а не border-box — с border: 1px solid
       (даже прозрачным) на всех сторонах разделитель рисовался на 1px раньше
       истинного нижнего края карточки. У прозрачного фона это незаметно, а у
       залитых --bug карточек в этот зазор просвечивал их собственный розовый
       фон — заливка визуально «не доходила» до разделителя сверху и «уходила
       за него» снизу (см. тот же приём уже применённый в .task-card--accent). */
    border-radius: 0;
    padding: 10px 14px 12px;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
    margin: 0;
    position: relative;
    transition: background 0.12s, border-color 0.12s;
}
.task-card:not(.task-card--accent):hover { background: oklch(0.985 0.008 275); }
.task-card.dragging { opacity: 0.5; }
.task-card.drop-before { box-shadow: inset 0 2px 0 var(--accent-strong); }
.task-card.drop-after { box-shadow: inset 0 -2px 0 var(--accent-strong); }
.task-card--active { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent-strong); }
/* Последняя карточка в теле блока не рисует свой разделитель — тело блока
   (.task-panel__head + .task-panel__body) само закрывается снизу настоящим
   border-bottom, и вплотную к нему собственная box-shadow-линия карточки
   давала два очень близких подчёркивания («двойная линия»). Не трогаем
   карточки в drag&drop-индикации/выбранные — им нужна собственная
   box-shadow независимо от позиции. */
.task-card:last-child:not(.task-card--active):not(.drop-before):not(.drop-after) {
    box-shadow: none;
}
.task-card--bug { background: var(--danger-tint); }
.task-card--bug .outline-item__input { color: var(--danger-strong); }
.task-card--share-selectable { cursor: pointer; }
.task-card--share-selectable .outline-item__input { pointer-events: none; }
.task-card--share-selected { background: var(--accent-tint) !important; }
.outline-share-badge {
    align-items: center;
    border: 1px solid var(--ink-border-soft);
    border-radius: 50%;
    color: var(--ink-muted);
    display: flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    height: 22px;
    justify-content: center;
    margin-left: auto;
    min-width: 22px;
    background: var(--surface-card);
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.outline-share-badge--selected { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent-strong); }

/* Правило акцента: заливку и полный вес текста получает любая незавершённая
   задача-участник цепочки наследования (см. buildTaskChainInfo) — обычная
   одиночная задача вне всякой цепочки акцент не получает, иначе список
   превращается в сплошную стену рамок вместо подсветки только веток.
   Полной рамки по всем сторонам здесь нет: у неё, рядом с собственной
   рамкой .task-panel__body (тот же серый hairline, 1px в стороне), на
   стыке получалась то ли двойная полоса, то ли утолщение линии — только
   акцентная грань слева поверх фона и обычный нижний разделитель, как у
   плоской строки. */
.task-card--accent {
    background: var(--surface-panel-2);
    /* Снова обычный border-left: box-shadow рисуется от padding-box, а не
       border-box — при наличии border (даже прозрачного) на всех сторонах
       между рамкой и box-shadow оставался зазор в 1px, из-за которого перед
       акцентной гранью «просвечивал» фон, а не она сама была спереди.
       border-top/bottom убраны (radius тут нет вовсе, оба угла острые, и
       border-left 3px рядом с border-top/bottom 1px давал диагональный
       срез на обоих) — нижний разделитель вместо этого через box-shadow,
       он с border не стыкуется. */
    border: 1px solid transparent;
    border-top: none;
    border-bottom: none;
    border-right: none;
    border-left: 3px solid var(--warn-strong);
    /* Карточка лежит внутри .task-panel__body с её собственной серой
       рамкой (1px) — своя грань слева иначе оказывалась на 1px правее
       края тела блока, и в эту щель просвечивал серый hairline тела.
       margin-left: -1px сдвигает акцентную грань ровно на край блока.
       border-right убран по той же причине, что и top/bottom — иначе
       нижний разделитель (box-shadow, рисуется от padding-box) обрезался
       на те же 1px и не доходил до правого края. */
    margin-left: -1px;
    padding-top: 11px;
    padding-bottom: 13px;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.task-card--accent:hover { background: var(--surface-panel); }
.task-card--accent .outline-item__input {
    color: var(--ink);
    font-weight: 600;
    font-size: 13.5px;
}

/* Яркую акцентную грань показываем только у корня цепочки (первая
   незавершённая задача) — у вложенных наследников (внутри
   .task-card__child-col на любом уровне) грань нейтральная, серая: иначе
   каждый уровень вложенности красился в свой яркий цвет, и получалась
   пёстрая полоса из нескольких оттенков подряд на одной записи. */
.task-card__child-col .task-card--accent {
    /* Без полной рамки — иначе на отступе-«лесенке» справа получается
       рамка внутри рамки. Грань слева — border-left (см. .task-card--accent
       выше про box-shadow vs border-box), border-top/bottom убраны.
       margin-left сбрасываем — тут карточка не у самого края .task-panel__body,
       а в отступе .task-card__guide, сдвиг оттуда не нужен. */
    border: 1px solid transparent;
    border-top: none;
    border-bottom: none;
    border-left: 3px solid var(--ink-border-strong);
    margin-left: 0;
    padding-top: 11px;
    padding-bottom: 13px;
    background: var(--surface-card);
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.task-card__child-col .task-card--accent:hover { background: oklch(0.985 0.008 275); }

/* Завершённая/отменённая задача — приглушённый контекст, не рабочая
   карточка. Тело (описание/вопросы/чек-лист/файлы/«на основе») скрыто
   всегда — актуальность потеряна. Обычно такая строка попадает в свёрнутую
   группу «Завершено», но если у неё есть активный наследник — остаётся
   тонким путём над ним, чтобы цепочка не обрывалась. */
.task-card--resolved {
    padding: 4px 11px;
}
.task-card--resolved .outline-item__icon,
.task-card--resolved .outline-item__actions,
.task-card--resolved .outline-item__cover-wrap {
    opacity: 0.55;
}

.task-card__head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.task-card__caret {
    align-items: center;
    border-radius: 4px;
    color: var(--ink-muted);
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    font-size: 10px;
    height: 16px;
    justify-content: center;
    transition: transform 0.15s, background 0.12s, color 0.12s;
    width: 16px;
}
.task-card__caret--open { transform: rotate(90deg); }
.task-card__caret:hover { background: var(--ink-divider); color: var(--ink); }

.task-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Отступ должен совпадать со стартом заголовка в .task-card__head: там
       перед полем ввода стоят иконка перетаскивания (14px) и чекбокс (14px),
       каждый со своим зазором (gap: 9px) — 14+9+14+9 = 46px. */
    padding: 8px 0 2px 46px;
}
.task-card__desc-hint,
.task-card__desc {
    color: var(--ink-tertiary);
    font-size: 13px;
    line-height: 1.55;
    max-width: 520px;
}
.task-card__desc-hint { font-style: italic; opacity: 0.85; }

.task-card__section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 2px solid var(--ink-border-input);
    padding-left: 8px;
}
.task-card__section--questions { border-left-color: var(--question-border); }
.task-card__section--checklist { border-left-color: var(--success-border); }
.task-card__label {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.task-card__question {
    align-items: flex-start;
    color: var(--question-strong);
    display: flex;
    font-size: 13px;
    gap: 9px;
    line-height: 1.5;
}
.task-card__question-mark {
    align-items: center;
    background: var(--question-tint);
    border-radius: 50%;
    color: var(--question-strong);
    display: flex;
    flex: 0 0 auto;
    font-size: 10.5px;
    font-weight: bold;
    height: 17px;
    justify-content: center;
    margin-top: 2px;
    width: 17px;
}
.task-card__question-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.task-card__question-answers { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.task-card__question-answer {
    font-size: 12.5px;
    color: var(--ink-tertiary);
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 2px solid var(--ink-border-input);
    padding-left: 6px;
}

.task-card__cl-bar { background: var(--ink-border); border-radius: 20px; height: 4px; max-width: 320px; overflow: hidden; }
.task-card__cl-bar-fill { background: var(--success-solid); border-radius: 20px; height: 4px; }
.task-card__cl-group-title { color: var(--ink-tertiary); font-size: 11px; font-style: italic; }
.task-card__cl-item {
    align-items: center;
    color: var(--ink);
    display: flex;
    font-size: 13px;
    gap: 9px;
}
.task-card__cl-box {
    align-items: center;
    border: 1.5px solid var(--ink-border-strong);
    border-radius: 4px;
    color: #ffffff;
    display: flex;
    flex: 0 0 auto;
    font-size: 9px;
    height: 15px;
    justify-content: center;
    width: 15px;
}
.task-card__cl-item--done { color: var(--ink-muted); text-decoration: line-through; }
.task-card__cl-item--done .task-card__cl-box,
.task-card__cl-box--done { background: var(--success-solid); border-color: var(--success-solid); }
.task-card__cl-box--clickable { cursor: pointer; }
.task-card__cl-box--clickable:hover { border-color: var(--success-solid); }
/* Аккордеон выполненных пунктов — сворачивает десятки зачёркнутых строк в
   одну кликабельную строку-счётчик, чтобы не забивать карточку. */
.task-card__cl-done-toggle {
    align-items: center;
    color: var(--success-strong);
    cursor: pointer;
    display: flex;
    font-size: 12px;
    gap: 6px;
    user-select: none;
}
.task-card__cl-done-toggle:hover { color: var(--success-solid); }
.task-card__cl-done-arrow { font-size: 10px; width: 8px; }

.task-card__draft-cl-row { align-items: center; display: flex; gap: 8px; }

.task-card__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.task-card__chip {
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 8px;
    color: var(--ink-strong);
    display: flex;
    gap: 8px;
    font-size: 12.5px;
    max-width: 280px;
    padding: 5px 10px 5px 6px;
    box-shadow: var(--shadow-button);
    text-decoration: none;
    transition: border-color 0.14s, box-shadow 0.14s;
}
.task-card__chip:hover { border-color: var(--accent-border); box-shadow: 0 1px 3px oklch(0.22 0.015 265 / 0.10); }
.task-card__chip--link { color: var(--accent-strong); }
.task-card__chip-kind {
    background: var(--accent-tint);
    border-radius: 5px;
    color: var(--accent-strong);
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 9.5px;
    padding: 2px 6px;
}
/* Имя файла/ссылки — единственный элемент чипа, который должен сжиматься с
   многоточием: без min-width:0 flex-элемент не сжимается меньше своего
   содержимого, и длинное имя вылезает за границу чипа вместо обрезки. */
.task-card__chip-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-card__chip-size,
.task-card__chip-arrow { color: var(--ink-muted); flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; }

.task-card__based-on {
    border-top: 1px solid var(--ink-divider);
    font-size: 12.5px;
    padding-top: 9px;
}
.task-card__based-on-link { color: var(--accent-strong); text-decoration: none; }
.task-card__based-on-link:hover { color: var(--accent-solid); text-decoration: underline; }

/* Направляющая — просто отступ на ширину уровня, без видимой линии: любая
   линия, растянутая на всю высоту соседа (align-items:stretch тянет её через
   тело карточки, файлы, вложенных детей), издалека читается как лишняя
   прямая рамка вокруг ветки, а не как тонкий коннектор — глубина и так
   видна по отступу и по цвету грани самой карточки (.task-card--accent). */
/* margin-right: -14px компенсирует правый padding родительской .task-card
   (14px) — иначе вложенные задачи упирались в её внутренний край, и их
   иконки справа оказывались на 14px левее, чем у самой родительской. */
.task-card__children { display: flex; flex-direction: column; margin-right: -14px; }
.task-card__child-row { align-items: stretch; display: flex; }
.task-card__guide { flex: 0 0 18px; width: 18px; }
/* Справа без отступа-«лесенки»: вложенность и так видна по левой грани и
   фону самой карточки (.task-card--accent), а иконки задачи (счётчик,
   статус, ⚡, корзина) на любом уровне вложенности должны стоять на одной
   вертикали, а не съезжать влево с каждым уровнем. */
.task-card__child-col { flex: 1; min-width: 0; padding: 2px 0; }

.outline-item__cover-wrap {
    position: relative;
    flex-shrink: 0;
}
.outline-item__cover {
    flex-shrink: 0;
    width: 40px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--ink-border-input);
    box-shadow: var(--shadow-button);
    opacity: 1;
}
.outline-item__cover-count {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 15px;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    box-shadow: var(--shadow-button);
    color: var(--ink-tertiary);
    font-size: 9.5px;
    line-height: 15px;
    height: 15px;
    text-align: center;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 20px;
    pointer-events: none;
}
.outline-item__cover--loading {
    background: linear-gradient(90deg, var(--surface-content), var(--surface-panel-2), var(--surface-content));
    background-size: 200% 100%;
    animation: outline-cover-pulse 1.2s ease-in-out infinite;
    border-radius: 6px;
    border: 1px solid var(--ink-border-input);
}
@keyframes outline-cover-pulse {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.outline-completion-dur {
    font-size: 11px;
    color: var(--success-strong);
    white-space: nowrap;
    flex-shrink: 0;
    position: absolute;
    right: 22%;
    pointer-events: none;
    text-align: right;
}
.desc-popup {
    position: fixed;
    z-index: 2000;
    max-width: 420px;
    max-height: 55vh;
    overflow-y: auto;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: var(--shadow-popover-lg);
    font-size: 0.82rem;
    color: var(--ink-secondary);
    line-height: 1.65;
}
.desc-popup p { margin: 0 0 0.5em; }
.desc-popup p:last-child { margin-bottom: 0; }
.desc-popup ul, .desc-popup ol { margin: 0 0 0.5em 1.2em; padding: 0; }
.desc-popup li { margin-bottom: 0.2em; }
.desc-popup h1, .desc-popup h2, .desc-popup h3 { font-size: 0.88rem; color: var(--ink-strong); margin: 0.5em 0 0.3em; }
.desc-popup strong { color: var(--ink-strong); }
.desc-popup code { background: var(--surface-panel-2); color: var(--ink-strong); padding: 1px 5px; border-radius: 3px; font-size: 0.78rem; }
.outline-checklist-preview {
    font-size: 11px;
    color: var(--ink-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}
.outline-checklist-preview__text {
    background: var(--surface-panel);
    border: 1px solid var(--ink-border-input);
    color: var(--ink-tertiary);
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: 6px;
}

.outline-successors-prog {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 4px;
}

.done-group__arrow {
    color: var(--ink-muted);
    font-size: 12px;
    width: 14px;
    flex-shrink: 0;
    user-select: none;
}
.done-group__label {
    color: var(--ink-muted);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    user-select: none;
}
.done-group__check {
    color: var(--success-solid);
}
.outline-item__icon {
    color: var(--ink-glyph);
    flex-shrink: 0;
    font-size: 11px;
    width: 14px;
    text-align: center;
    line-height: 1;
}
/* SVG_ICONS.drag — сама разметка SVG зашита с width/height 20 (общая для
   тёмной темы), в макете ручка перетаскивания ⠿ — 11px, поэтому размер
   переопределяем на самом svg, а не только на контейнере. */
.outline-item__icon svg {
    width: 11px;
    height: 11px;
    display: block;
}
.outline-item__drag {
    color: var(--ink-glyph);
    cursor: grab;
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s;
}
.outline-item__drag:hover {
    opacity: 1;
}
.outline-item:active .outline-item__drag {
    cursor: grabbing;
}
.outline-item__drag--block {
    cursor: pointer;
}
.outline-item__drag--block:hover {
    color: var(--accent-strong);
}
.outline-item__input {
    background: none;
    border: none;
    color: var(--ink);
    flex: 1;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
    min-width: 0;
    outline: none;
    padding: 0;
}
.outline-item__input::placeholder { color: var(--ink-muted); }
.outline-add-btn {
    align-self: flex-start;
    background: var(--surface-panel-2);
    border: 1px dashed var(--ink-border-strong);
    border-radius: 8px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    margin-top: 6px;
    padding: 8px 16px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.outline-add-btn--inline {
    margin-top: 0;
    align-self: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    background: var(--accent-strong);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 2px oklch(0.22 0.015 265 / 0.18);
}
.outline-add-btn:hover {
    background: var(--surface-panel);
    border-color: var(--accent-border);
    color: var(--accent-strong);
}
.outline-add-btn--inline:hover {
    background: var(--accent-solid);
    color: #fff;
}
.outline-bottom-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 6px;
}
.outline-bottom-row .outline-add-btn {
    margin-top: 0;
    align-self: auto;
}
.outline-rec-btn {
    background: var(--success-tint);
    border: 1px solid var(--success-border);
    border-radius: 7px;
    color: var(--success-strong);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 9px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-family: var(--font-ui);
    line-height: 1;
}
.outline-rec-btn:hover {
    color: var(--success-strong);
    border-color: var(--success-strong);
}
/* ── Проектные вопросы на странице задач ─────────────────────────── */
.proj-questions-bar {
    margin: 0 0 0.75rem;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.proj-questions-bar__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    background: var(--surface-panel-2);
    transition: background 0.12s;
}
.proj-questions-bar__header:hover {
    background: var(--surface-panel);
}
.proj-questions-bar__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.proj-questions-bar__count {
    font-size: 11px;
    background: var(--question-tint);
    color: var(--question-strong);
    border-radius: 20px;
    padding: 1px 7px;
    font-weight: 600;
}
.proj-questions-bar__hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--ink-faint);
}
.proj-questions-bar__list {
    padding: 0.25rem 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.proj-q-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.2rem 0.25rem;
    border-radius: 6px;
    transition: background 0.1s;
}
.proj-q-item:hover {
    background: var(--ink-divider);
}
.proj-q-item__check {
    appearance: none;
    -webkit-appearance: none;
    margin-top: 3px;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    border-radius: 4px;
    border: 1.5px solid var(--ink-border-strong);
    background: var(--surface-card);
    cursor: pointer;
    position: relative;
    transition: background 0.12s, border-color 0.12s;
}
.proj-q-item__check:checked {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}
.proj-q-item__check:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}
.proj-q-item__text {
    flex: 1;
    font-size: 13px;
    color: var(--ink-tertiary);
    line-height: 1.4;
    cursor: pointer;
    min-width: 0;
}
.proj-q-item__text:hover {
    color: var(--ink);
}

.outline-rec-btn--questions {
    background: var(--question-tint);
    border-color: var(--question-border);
    color: var(--question-strong);
}
.outline-rec-btn--questions:hover {
    color: var(--question-strong);
    border-color: var(--question-strong);
}
.outline-rec-btn--questions-empty {
    background: var(--surface-card);
    border-color: var(--ink-border-input);
    color: var(--ink-faint);
    opacity: 0.7;
}
.outline-rec-btn--questions-empty:hover {
    background: var(--question-tint);
    border-color: var(--question-border);
    color: var(--question-strong);
    opacity: 1;
}
.outline-rec-btn--timeline {
    background: var(--surface-card);
    border-color: var(--ink-border-input);
    color: var(--ink-tertiary);
    font-weight: 400;
    box-shadow: var(--shadow-button);
}
.outline-rec-btn--timeline:hover {
    color: var(--accent-strong);
    border-color: var(--accent-border);
}

/* ── Left panel: search & outline check ──────────────────────────── */
.tasks-filter-input {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 13px;
    outline: none;
    padding: 7px 12px;
    width: 100%;
    box-shadow: var(--shadow-inset);
    transition: border-color 0.15s;
}
.tasks-filter-input:focus { border-color: var(--accent-border); }
.tasks-filter-input::placeholder { color: var(--ink-muted); }
.outline-check {
    background: none;
    border: none;
    color: var(--ink-glyph);
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    /* Символ статуса (○ ◐ ⬆ ✓ ✕ из БД) в разных шрифтах занимает разную
       долю em-квадрата — сам бокс держим компактным (13px, влияет на
       отступы в строке), а размер шрифта берём с запасом, чтобы значок
       не терялся независимо от того, каким шрифтом браузер его отрисует. */
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    width: 13px;
    height: 13px;
    transition: color 0.12s;
}
.outline-check--cl { color: var(--ink-muted); font-size: 13.5px; cursor: default; }
.outline-item__input--done { text-decoration: line-through; opacity: 0.45; }
.outline-item__input--cancelled { text-decoration: line-through; opacity: 0.3; }
.status-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.status-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 16px;
    padding: 4px 7px;
    display: flex;
    gap: 4px;
    align-items: center;
    z-index: 200;
    box-shadow: var(--shadow-popover);
    white-space: nowrap;
}
.status-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--surface-card);
}
.status-popup--teleport {
    position: fixed;
    bottom: auto;
    transform: translateX(-50%);
}
/* TaskModal.vue: попап телепортируется в <body> и становится СОСЕДОМ
   .task-modal-overlay (не потомком), поэтому обычный z-index:200 у
   .status-popup проигрывает оверлею модалки (z-index:2100) — попап открывался,
   но был не виден и некликабелен. Поднимаем выше оверлея. */
.status-popup--in-modal {
    z-index: 2200;
}
/* StatusPicker.vue (список задач) — попап всплывает НАД строкой, а не под
   ней: left/top в инлайн-стиле задают точку (центр по X, верх строки минус
   6px), сдвиг вверх на 100% собственной высоты через transform — высота
   попапа заранее не известна (зависит от числа статусов). */
.status-popup--teleport-above {
    position: fixed;
    bottom: auto;
    transform: translate(-50%, -100%);
}
/* Первая строка блока: сверху не хватает места, StatusPicker.vue переносит
   попап под строку — уголок-указатель тоже разворачиваем вверх. */
.status-popup--teleport-below {
    position: fixed;
    bottom: auto;
    transform: translate(-50%, 0);
}
.status-popup--teleport-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--surface-card);
}
.status-popup__btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.1s;
}
.status-popup__btn--lg {
    font-size: 16px;
    padding: 4px 7px;
}
.status-popup__btn:hover { background: var(--ink-divider); }
/* ── Tasks page layout ───────────────────────────────────────────── */
.tasks-page {
    flex-direction: row !important;
    overflow: hidden;
}
.tasks-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-content);
    border-right: 1px solid var(--ink-hairline);
}
.tasks-future {
    flex: 1;
    /* зарезервировано */
}
.tasks-main__head {
    align-items: center;
    background: var(--surface-panel-2);
    border-bottom: 1px solid var(--ink-divider);
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    padding: 6px 12px;
}
.tasks-main__head--col {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}
/* Панель статуса — переключатель категорий слева и «В работе / Требует
   переноса» справа на одной строке, как в макете (раньше стояли друг под
   другом отдельными строками). */
.tasks-status-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 9px 18px;
    background: var(--surface-panel-2);
    border-bottom: 1px solid var(--ink-divider);
}
.tasks-main__head--col .tasks-summary {
    margin-left: auto;
}
.tasks-main__toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--surface-panel);
    border-bottom: 1px solid var(--ink-divider);
}
.tasks-main__hint {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--ink-faint);
    white-space: nowrap;
}
.tasks-apply-btn--inactive {
    opacity: 0.4;
    cursor: default;
}
.tasks-toggle-done {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--success-strong);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    flex-shrink: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tasks-toggle-done:hover { border-color: var(--success-border); }
.tasks-toggle-done--hidden {
    background: var(--surface-card);
    border-color: var(--ink-border-soft);
    color: var(--ink-glyph);
}
.tasks-toggle-cancelled {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tasks-toggle-cancelled:hover { border-color: var(--accent-border); color: var(--accent-strong); }
.tasks-toggle-cancelled--active {
    background: var(--accent-tint);
    border-color: var(--accent-border);
    color: var(--accent-strong);
}
.tasks-toggle-cancelled--active:hover { color: var(--accent-strong); }
.tasks-toggle-critical {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--warn-strong);
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    padding: 0;
    flex-shrink: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tasks-toggle-critical:hover { border-color: var(--warn-border); }
.tasks-toggle-critical--active {
    background: var(--warn-tint);
    border-color: var(--warn-border);
    color: var(--warn-strong);
}
.tasks-toggle-critical--active:hover { color: var(--warn-strong); }
.tasks-toggle-deploy {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tasks-toggle-deploy:hover { border-color: var(--warn-border); color: var(--warn-strong); }
.tasks-toggle-deploy--active {
    background: var(--warn-tint);
    border-color: var(--warn-border);
    color: var(--warn-strong);
}
.tasks-toggle-deploy--active:hover { color: var(--warn-strong); }
.tasks-toggle-questions {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tasks-toggle-questions:hover { border-color: var(--question-border); color: var(--question-strong); }

.status-filter {
    position: relative;
    flex-shrink: 0;
}
.status-filter__btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    border-radius: 8px;
    color: var(--ink-tertiary);
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    box-shadow: var(--shadow-button);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.status-filter__btn:hover { border-color: var(--accent-border); color: var(--accent-strong); }
.status-filter__btn--active { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent-strong); }
.status-filter__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 8px;
    padding: 4px;
    min-width: 168px;
    box-shadow: var(--shadow-popover);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.status-filter__item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--ink-strong);
    cursor: pointer;
    white-space: nowrap;
}
.status-filter__item:hover { background: var(--ink-divider); }
.status-filter__item--active { background: var(--accent-tint); color: var(--accent-strong); }
.status-filter__check {
    margin-left: auto;
    padding-left: 10px;
    color: var(--accent-strong);
    font-size: 11px;
}
.status-filter__dot {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
}
.status-filter__dot--all { background: var(--ink-border-strong); color: var(--ink-secondary); }

/* Паддинг/фон/нижняя граница переехали на обёртку .tasks-status-row —
   .tasks-summary теперь просто ряд элементов внутри неё. */
.tasks-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    font-family: var(--font-ui);
}
.tasks-summary__item {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink-tertiary);
}
.tasks-summary__item--urgent {
    color: var(--warn-strong);
}
.tasks-unified-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}
.outline-act {
    background: none;
    border: none;
    border-radius: 5px;
    color: var(--ink-glyph);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    transition: background 0.12s, color 0.12s;
}
/* SVG_ICONS.details/delete зашиты с width/height 18 — в макете эти значки
   ›/🗑 занимают ~12-14px, поэтому переопределяем размер на самом svg. */
.outline-act svg {
    width: 14px;
    height: 14px;
    display: block;
}
.outline-has-desc { font-size: 0.75rem; color: var(--ink-muted); opacity: 0.8; flex-shrink: 0; line-height: 1; cursor: default; }
.outline-act--details { color: var(--ink-muted); }
.outline-act--details:hover { background: var(--accent-tint); color: var(--accent-strong); }
.outline-act--conv { color: var(--ink-muted); font-size: 0.72rem; padding: 2px 5px; }
.outline-act--conv:hover { background: var(--accent-tint); color: var(--accent-strong); }
.outline-act--del { color: var(--danger-border); }
.outline-act--del:hover { background: var(--danger-tint); color: var(--danger-strong); }
.outline-act--warn { color: var(--ink-muted); }
.outline-act--warn:hover { background: var(--warn-tint); color: var(--warn-strong); }
.outline-act:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
/* Более заметный вариант — для редких осознанных действий вне плотной
   иконочной панели (там, где --details/--warn/--del специально бледные,
   чтобы не отвлекать в списке). */
.outline-act--vivid.outline-act--details { color: var(--ink-secondary); }
.outline-act--vivid.outline-act--warn { color: var(--warn-strong); }
.outline-act--vivid.outline-act--del { color: var(--danger-strong); }
.outline-item__actions {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}
.tasks-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

/* ── Tree panel ──────────────────────────────────────────────────── */
.tasks-tree-wrap {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
    min-width: 0;
}

/* ── Task side panel ─────────────────────────────────────────────── */

/* Active node highlight in tree */
.tree-node--active { background: #10101e !important; box-shadow: inset 3px 0 0 #4040a0; }
.tree-add-root-btn {
    background: #0e0e22;
    border: 1px solid #222244;
    border-radius: 5px;
    color: #4040a0;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 3px 10px;
    transition: all 0.14s;
}
.tree-add-root-btn:hover { background: #151530; color: #8080d0; border-color: #3535a0; }
.tasks-tree-empty {
    color: #2a2a48;
    font-size: 0.82rem;
    padding: 24px 16px;
    text-align: center;
}
.tree-node {
    align-items: center;
    cursor: grab;
    display: flex;
    gap: 4px;
    min-height: 30px;
    padding-right: 6px;
    padding-top: 1px;
    padding-bottom: 1px;
    position: relative;
    transition: background 0.1s;
    user-select: none;
}
.tree-node:active { cursor: grabbing; }
.tree-node:hover { background: #111120; }
.tree-node--dragging { opacity: 0.35; }
.tree-node--block { color: #c0c0f0; }
.tree-node--task  { color: #8080a8; }
.tree-node--done .tree-node__title { text-decoration: line-through; opacity: 0.45; }
.tree-toggle {
    background: none;
    border: none;
    color: #404070;
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0;
    width: 14px;
    flex-shrink: 0;
}
.tree-toggle:hover { color: #8080d0; }
.tree-node__dot { width: 14px; flex-shrink: 0; }
.tree-check {
    background: none;
    border: none;
    color: #252545;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0;
    transition: color 0.12s;
    width: 14px;
}
.tree-check:hover { color: #7070d0; }
.tree-check--done { color: #4a8a4a; }
@keyframes prio-pulse-high {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 48, 64, 0.75); }
    50%       { box-shadow: 0 0 0 8px rgba(224, 48, 64, 0); }
}
.tree-priority {
    align-self: center;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    height: 7px;
    width: 7px;
}
.tree-priority--high { animation: prio-pulse-high 2s ease-in-out infinite; }
.prio-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.prio-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -6px;
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 20px;
    padding: 5px 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 200;
    box-shadow: var(--shadow-popover);
    white-space: nowrap;
}
.prio-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: var(--surface-card);
}
.prio-popup__dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    padding: 0;
}
.prio-popup__dot:hover { transform: scale(1.35); }
.prio-popup__dot--active { box-shadow: 0 0 0 2px var(--ink-border-strong); }
.outline-time-remaining {
    font-size: 11px;
    color: var(--success-strong);
    flex-shrink: 0;
    position: absolute;
    right: 22%;
    white-space: nowrap;
    pointer-events: none;
    text-align: right;
}
.outline-time-remaining--overdue {
    color: var(--danger-strong);
}
.tree-node__icon {
    color: #404070;
    flex-shrink: 0;
    font-size: 0.65rem;
    width: 14px;
}
.tree-node--block .tree-node__icon { color: #6060b0; }
.tree-node__title {
    flex: 1;
    font-size: 0.83rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tree-node__title:hover { color: #d0d0ff; }
.tree-inline-edit {
    flex: 1;
    background: #1a1a30;
    border: 1px solid #4040a0;
    border-radius: 3px;
    color: #d0d0ff;
    font-family: inherit;
    font-size: 0.83rem;
    outline: none;
    padding: 1px 6px;
}
.tree-block-prog {
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    flex-shrink: 0;
}
.tree-node__actions {
    display: none;
    gap: 2px;
    flex-shrink: 0;
}
.tree-node:hover .tree-node__actions { display: flex; }
.tree-act {
    background: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.72rem;
    line-height: 1;
    padding: 2px 5px;
    transition: background 0.12s, color 0.12s;
}
.tree-act--add  { color: #3a3a80; }
.tree-act--add:hover  { background: #1a1a38; color: #7070e0; }
.tree-act--conv { color: #2a2a60; }
.tree-act--conv:hover { background: #1a1a3a; color: #7070d0; }
.tree-act--del  { color: #502020; }
.tree-act--del:hover  { background: #2a1010; color: #ff5555; }
.tree-quick-add {
    align-items: center;
    background: #0e0e20;
    border: 1px dashed #2a2a50;
    border-radius: 4px;
    display: flex;
    gap: 4px;
    margin: 2px 8px;
    padding: 4px 8px;
}
.tree-quick-add__input {
    background: none;
    border: none;
    color: #c0c0e0;
    flex: 1;
    font-family: inherit;
    font-size: 0.83rem;
    outline: none;
    padding: 0;
}
.tree-quick-add__input::placeholder { color: #303055; }
.tree-quick-add__ok, .tree-quick-add__cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 3px;
}
.tree-quick-add__ok     { color: #4a8a4a; }
.tree-quick-add__ok:hover { background: #0a1a0a; }
.tree-quick-add__cancel { color: #604040; }
.tree-quick-add__cancel:hover { background: #1a0a0a; }

/* Drop indicators */
.tree-node--drop-before::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #5050e0;
    border-radius: 1px;
    z-index: 1;
}
.tree-node--drop-after::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #5050e0;
    border-radius: 1px;
    z-index: 1;
}
.tree-node--drop-inside {
    background: #14143a !important;
    box-shadow: inset 0 0 0 1px #3030a0;
}

/* ── Analytics tab ─────────────────────────────────────────────────── */
/* Единое тело страницы — как .main на /directory: залитая обёртка без
   своей рамки/скругления сверху, слитая с шапкой без зазора (та же тень,
   что у неё), скруглена только снизу. .an__head/.an__filters — просто
   строки внутри неё (без своего фона/тени), карточки/таблица ниже — уже
   белые (.an__card/.an__table-wrap) и читаются плашками поверх заливки. */
.an {
    background: var(--surface-content);
    border-radius: 0 0 12px 12px;
    padding: 18px;
    box-shadow: var(--shadow-popover), var(--shadow-hairline);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.an__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.an__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink-strong);
    margin: 0;
}
.an__refresh {
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--ink-muted);
    transition: color 0.15s, background 0.15s;
}
.an__refresh:hover { color: var(--ink-strong); background: var(--surface-panel); }
.an__refresh:disabled { opacity: 0.4; cursor: default; }
.an__empty {
    color: var(--ink-muted);
    font-size: 0.9rem;
    padding: 3rem 0;
    text-align: center;
}
.an__filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.an__cat-pills {
    display: flex;
    gap: 0.25rem;
}
.an__pill {
    background: var(--surface-panel);
    border: 1px solid var(--ink-border-input);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78rem;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.an__pill:hover { color: var(--ink-strong); border-color: var(--ink-border-strong); }
.an__pill--active { background: var(--accent-tint); color: var(--accent-strong); border-color: var(--accent-border); }
.an__proj-drop {
  position: relative;
}
.an__proj-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-panel);
  border: 1px solid var(--ink-border-input);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  min-width: 180px;
  justify-content: space-between;
}
.an__proj-drop--open .an__proj-btn { border-color: var(--ink-border-strong); color: var(--ink-strong); }
.an__proj-btn-arrow { font-size: 0.7rem; opacity: 0.6; }
.an__proj-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-card);
  border: 1px solid var(--ink-border-input);
  border-radius: 8px;
  box-shadow: var(--shadow-popover);
  z-index: 200;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-border-strong) transparent;
}
.an__proj-menu::-webkit-scrollbar { width: 4px; }
.an__proj-menu::-webkit-scrollbar-track { background: transparent; }
.an__proj-menu::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.an__proj-menu::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
.an__proj-group-label {
  padding: 6px 12px 2px;
  font-size: 0.68rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.an__proj-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  cursor: pointer;
}
.an__proj-menu-item--sub { padding-left: 36px; }
.an__proj-menu-item:not(.an__proj-menu-item--sub) { font-weight: 600; }
.an__proj-menu-item:hover { background: oklch(0.985 0.008 275); color: var(--ink-strong); }
.an__proj-cb {
  width: 13px;
  height: 13px;
  border: 1px solid var(--ink-border-input);
  border-radius: 3px;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.an__proj-cb--checked {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
}
.an__proj-cb--checked::after {
  content: '✓';
  font-size: 9px;
  color: #fff;
  line-height: 1;
}

/* Compact cards */
.an__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}
.an__cards--simple {
    grid-template-columns: repeat(3, 1fr);
}
.an__card {
    border: 1px solid var(--ink-hairline);
    border-left-width: 3px;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    background: var(--surface-card);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    position: relative;
    box-shadow: var(--shadow-card);
}
.an__card::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 8px; }
.an__card--done      { border-left-color: var(--success-solid); }
.an__card--cancelled { border-left-color: var(--ink-border-strong); }
.an__card-icon { font-size: 0.9rem; flex-shrink: 0; }
.an__card-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink-strong);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.an__card-label {
    font-size: 0.72rem;
    color: var(--ink-muted);
    flex: 1;
    min-width: 0;
}
.an__card-pct {
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}
.an__card--cancelled .an__card-pct { color: transparent; }
.an__card--cancelled .an__card-icon { color: var(--ink-faint); }
.an__card--cancelled .an__card-val  { color: var(--ink-muted); }
.an__card--inprogress { border-left-color: var(--info-solid); }
.an__card--inprogress .an__card-pct { color: transparent; }
.an__card--inprogress .an__card-icon { color: var(--info-solid); }
.an__ip-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 7px;
    padding: 6px 0;
    min-width: 240px;
    max-width: 380px;
    max-height: 560px;
    overflow-y: auto;
    box-shadow: var(--shadow-popover);
    pointer-events: auto;
}
.an__ip-item {
    display: flex;
    flex-direction: column;
    padding: 6px 12px;
    gap: 2px;
    cursor: pointer;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.an__ip-item:last-child { box-shadow: none; }
.an__ip-item:hover { background: oklch(0.985 0.008 275); }
.an__ip-proj {
    font-size: 0.62rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.an__ip-title {
    font-size: 0.8rem;
    color: var(--ink-secondary);
    line-height: 1.3;
}
.an__ip-badge {
    font-size: 0.65rem;
    color: var(--info-solid);
    margin-top: 1px;
}

/* Weekly task lists */
.an__weeks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.an__week-block {
    border: 1px solid var(--ink-hairline);
    border-radius: 10px;
    padding: 0.875rem 1rem 0.75rem;
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
}
.an__week-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.an__week-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.an__wrow {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.3rem 0;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.an__wrow:last-child { box-shadow: none; }
.an__wrow--today .an__wrow-meta { opacity: 1; }
.an__wrow--today .an__wrow-day  { color: var(--accent-strong); }
.an__wrow-meta {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    flex-shrink: 0;
    width: 5rem;
    padding-top: 1px;
}
.an__wrow-date {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink-tertiary);
    font-variant-numeric: tabular-nums;
    min-width: 1.4rem;
}
.an__wrow--today .an__wrow-date { color: var(--accent-strong); }
.an__wrow-day {
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-weight: 500;
}
.an__wrow-count {
    font-size: 0.7rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.2;
}
.an__wrow-cancelled-count {
    font-size: 0.58rem;
    color: var(--danger-strong);
    line-height: 1;
}
.an__wrow-groups {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.an__wrow-group { min-width: 0; }
.an__wrow-proj {
    font-size: 0.68rem;
    color: var(--ink-faint);
    font-weight: 600;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.an__wrow-proj--cancelled { color: var(--ink-glyph); }
.an__wrow-tasks {
    list-style: none;
    padding-left: 0;
    counter-reset: wrow-counter;
}
.an__wrow-task {
    counter-increment: wrow-counter;
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border-radius: 3px;
    color: var(--ink-secondary);
    transition: background 0.1s;
}
.an__wrow-task::before {
    content: counter(wrow-counter) ".";
    position: absolute;
    left: 0;
    color: var(--ink-glyph);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}
.an__wrow-task:hover { background: oklch(0.985 0.008 275); color: var(--ink-strong); }
.an__wrow-task--cancelled { color: var(--ink-faint); text-decoration: line-through; opacity: 0.7; }
.an__wrow-task--cancelled:hover { color: var(--ink-muted); opacity: 1; }
.an__wrow--deploy .an__wrow-meta { opacity: 1; }
.an__wrow-date--deploy { color: var(--info-solid); font-size: 1rem; }
.an__wrow-count--deploy { color: var(--info-solid); }
.an__wrow--deploy .an__wrow-day { color: var(--info-solid); }
.an__wrow-task--deploy { color: var(--info-solid); }
.an__wrow-task--deploy:hover { color: var(--ink-strong); }
.an__wrow-task-block { color: var(--ink-faint); font-size: 0.82em; font-weight: 500; }
.an__wrow-task-closed-cl { color: var(--success-strong); font-size: 0.8em; font-weight: 400; }
.an__wrow-group--cancelled { opacity: 0.75; }
.an__wrow-cl-group {
    counter-increment: wrow-counter;
    position: relative;
    padding-left: 1.1rem;
    cursor: pointer;
    border-radius: 3px;
    padding-top: 1px;
    padding-bottom: 2px;
    padding-right: 2px;
    transition: background 0.1s;
}
.an__wrow-cl-group::before {
    content: counter(wrow-counter) ".";
    position: absolute;
    left: 0;
    color: var(--ink-glyph);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}
.an__wrow-cl-group:hover { background: oklch(0.985 0.008 275); }
.an__wrow-cl-task {
    /* Заголовок группы чек-листа — акцентный цвет, а не серый тон пунктов
       внутри неё (изначально #6060a0, отдельный от #a0a0bc у пунктов). */
    font-size: 0.75rem;
    color: var(--accent-strong);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.an__wrow-cl-remaining {
    margin-top: 2px;
}
.an__wrow-cl-remaining-label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--warn-strong);
    cursor: pointer;
}
.an__wrow-cl-remaining-arrow {
    display: inline-block;
    font-size: 0.65rem;
    transition: transform 0.1s;
}
.an__wrow-cl-remaining-arrow--open {
    transform: rotate(90deg);
}
.an__wrow-cl-item--remaining {
    color: var(--warn-strong);
}
.an__wrow-cl-items {
    list-style: none;
    padding-left: 0.75rem;
    counter-reset: cl-counter;
}
.an__wrow-cl-item {
    counter-increment: cl-counter;
    position: relative;
    padding-left: 1rem;
    padding-right: 1.5rem;
    font-size: 0.75rem;
    color: var(--ink-secondary);
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    max-width: 700px;
}
.an__wrow-cl-item::before {
    content: counter(cl-counter) ".";
    position: absolute;
    left: 0;
    color: var(--ink-glyph);
    font-size: 0.68rem;
    line-height: 1.35;
}

/* Строка периода + тогл группировки */
.an__period-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.an__view-toggle {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* By-project grouped view */
.an__pgrp {
    padding: 0.3rem 0;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.an__pgrp:last-child { box-shadow: none; }
.an__pgrp-head {
    font-size: 0.68rem;
    color: var(--ink-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

/* Period filter */
.an__period-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-basis: 100%;
}
.an__period-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-right: 0.2rem;
}
.an__period-date {
  background: var(--surface-card);
  border: 1px solid var(--ink-border-input);
  border-radius: 6px;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}
.an__period-date:focus { outline: none; border-color: var(--accent-border); }
.an__period-date--range { min-width: 180px; }
.an__period-clear {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.an__period-clear:hover { color: var(--danger-strong); }

/* Flatpickr light theme override */
.flatpickr-calendar {
  background: var(--surface-card) !important;
  border: 1px solid var(--ink-border-input) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-popover) !important;
  color: var(--ink-secondary) !important;
  font-family: system-ui, sans-serif !important;
}
.flatpickr-calendar.arrowTop::before { border-bottom-color: var(--ink-border-input) !important; }
.flatpickr-calendar.arrowTop::after  { border-bottom-color: var(--surface-card) !important; }
.flatpickr-months {
  background: var(--surface-panel-2) !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 4px 0 !important;
}
.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--ink-strong) !important;
  fill: var(--ink-strong) !important;
  height: 36px !important;
}
.flatpickr-current-month {
  color: var(--ink-strong) !important;
  font-size: 0.95rem !important;
  padding-top: 6px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: transparent !important;
  border: none !important;
  color: var(--ink-strong) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: var(--surface-card) !important;
  color: var(--ink-strong) !important;
}
.flatpickr-current-month input.cur-year {
  background: transparent !important;
  border: none !important;
  color: var(--ink-strong) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: var(--ink-muted) !important;
  color: var(--ink-muted) !important;
  padding: 8px !important;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover { fill: var(--accent-strong) !important; }
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg { fill: inherit !important; }
.flatpickr-weekdays {
  background: var(--surface-panel-2) !important;
  border-bottom: 1px solid var(--ink-divider) !important;
}
.flatpickr-weekdays .flatpickr-weekdaycontainer { display: flex !important; }
span.flatpickr-weekday {
  background: transparent !important;
  color: var(--ink-faint) !important;
  font-size: 0.75rem !important;
}
.flatpickr-days { border-color: var(--ink-divider) !important; }
.dayContainer { padding: 4px !important; }
.flatpickr-day {
  color: var(--ink-secondary) !important;
  border-color: transparent !important;
  border-radius: 4px !important;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: oklch(0.985 0.008 275) !important;
  border-color: oklch(0.985 0.008 275) !important;
  color: var(--ink-strong) !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange,
.flatpickr-day.endRange:hover {
  background: var(--accent-solid) !important;
  border-color: var(--accent-solid) !important;
  color: #fff !important;
}
.flatpickr-day.inRange {
  background: var(--accent-tint) !important;
  border-color: var(--accent-tint) !important;
  box-shadow: -5px 0 0 var(--accent-tint), 5px 0 0 var(--accent-tint) !important;
  color: var(--ink-strong) !important;
}
.flatpickr-day.today { border-color: var(--accent-solid) !important; }
.flatpickr-day.today:not(.selected):hover { background: oklch(0.985 0.008 275) !important; }
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--ink-glyph) !important;
  background: transparent !important;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: var(--ink-glyph) !important; }
.an__period-block {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  background: var(--surface-card);
  border: 1px solid var(--ink-hairline);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.an__period-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--surface-panel-2);
  box-shadow: inset 0 -1px 0 var(--ink-divider);
}

/* KeyboardHints */
.kb-hints {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.kb-hints__toggle {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid #2a2a40;
  background: #13131f;
  color: #6060a0;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.kb-hints__toggle:hover { background: #1a1a2e; color: #a0a0d0; }
.kb-hints--open .kb-hints__toggle { background: #1a1a2e; color: #c0c0e0; }
.kb-hints__panel {
  background: #0f0f1a;
  border: 1px solid #2a2a40;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 220px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.kb-hints__title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #5050a0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.kb-hints__list { display: flex; flex-direction: column; gap: 0.35rem; }
.kb-hints__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.78rem;
}
.kb-hints__keys { display: flex; gap: 0.2rem; flex-shrink: 0; }
.kb-hints__keys kbd {
  background: #1a1a2e;
  border: 1px solid #2e2e4a;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  color: #a0a0d0;
  font-family: inherit;
  white-space: nowrap;
}
.kb-hints__desc { color: #5a5a80; }

/* Раздел «Задачи» (глобальный, светлая тема) — тот же компонент, но
   используется и в TasksView.vue внутри проекта (тёмная тема, вне области
   редизайна), поэтому переопределяем только внутри body--tasks-canvas. */
body.body--tasks-canvas .kb-hints__toggle {
  border-color: var(--ink-border-input);
  background: var(--surface-card);
  color: var(--ink-tertiary);
  box-shadow: var(--shadow-popover);
}
body.body--tasks-canvas .kb-hints__toggle:hover,
body.body--tasks-canvas .kb-hints--open .kb-hints__toggle {
  background: var(--surface-panel);
  color: var(--accent-strong);
}
body.body--tasks-canvas .kb-hints__panel {
  background: var(--surface-card);
  border-color: var(--ink-border-input);
  box-shadow: var(--shadow-popover-lg);
}
body.body--tasks-canvas .kb-hints__title { color: var(--accent-strong); }
body.body--tasks-canvas .kb-hints__keys kbd {
  background: var(--surface-panel-2);
  border-color: var(--ink-border-input);
  color: var(--ink-secondary);
}
body.body--tasks-canvas .kb-hints__desc { color: var(--ink-muted); }

/* ── /directory: общие классы с ещё тёмной ProjectsTab.vue — не красим
   базовое правило (сломает /projects), а накладываем оверрайд поверх,
   активный только на светлом холсте (тот же приём, что у .kb-hints выше).
   Структура — как на /tasks: .main здесь играет роль общей залитой
   обёртки (аналог .tasks-main/.outliner-list, background: --surface-content,
   паддинг), идущей от шапки приложения до конца контента, а .project-card
   внутри — белые плашки уже её ширины за счёт этого паддинга (как
   .task-panel внутри .outliner-list). Продолжение карточки шапки — та же
   схема, что у .qpage__head/.an__head: без своей рамки и без зазора,
   только тень шапки и скругление снизу — иначе рамка .main вплотную к
   низу шапки даёт двойную серую полосу. */
body.body--tasks-canvas .main {
  background: var(--surface-content);
  border-radius: 0 0 12px 12px;
  padding: 18px;
  box-shadow: var(--shadow-popover), var(--shadow-hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.body--tasks-canvas .project-card {
  background: var(--surface-card);
  border: 1px solid var(--ink-hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  margin-bottom: 0;
}
body.body--tasks-canvas .btn-icon { color: var(--ink-glyph); }
body.body--tasks-canvas .btn-icon:hover { color: var(--ink-tertiary); }
body.body--tasks-canvas .btn-icon--ok:hover { color: var(--success-strong); }
body.body--tasks-canvas .btn-icon--del { color: var(--ink-glyph); }
body.body--tasks-canvas .btn-icon--del:hover { color: var(--danger-strong); }
body.body--tasks-canvas .empty-inline { color: var(--ink-faint); }
body.body--tasks-canvas .contact-input {
  background: var(--surface-card);
  border: 1px solid var(--ink-border-soft);
  color: var(--ink-strong);
  box-shadow: var(--shadow-inset);
}
body.body--tasks-canvas .contact-input:focus { border-color: var(--accent-border); }
body.body--tasks-canvas .upload-select {
  background: var(--surface-card);
  border: 1px solid var(--ink-border-soft);
  color: var(--ink-strong);
  box-shadow: var(--shadow-inset);
}
body.body--tasks-canvas .upload-select:focus { border-color: var(--accent-border); }
body.body--tasks-canvas .btn-primary {
  background: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  color: #fff;
}
body.body--tasks-canvas .btn-primary:hover { background: var(--accent-solid); }

/* ── /projects: новые общие классы — скоупим строго через .main, а не
   просто body.body--tasks-canvas: иначе протечёт в тёмные оверлеи
   (HubView.vue, ProjectPage.vue, ProjectRecordingsPopup.vue,
   ResultsPanel.vue, TranscriptModal.vue) —
   ни один из них не рендерится внутри .main. */
body.body--tasks-canvas .main .category-filter { background: var(--ink-wash); border: none; }
body.body--tasks-canvas .main .category-filter__btn { color: var(--ink-secondary); }
body.body--tasks-canvas .main .category-filter__btn:hover { color: var(--ink); background: none; }
body.body--tasks-canvas .main .category-filter__btn.active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
body.body--tasks-canvas .main .category-filter__count { background: var(--ink-hairline); color: var(--ink-secondary); }
body.body--tasks-canvas .main .category-filter__btn.active .category-filter__count { background: rgba(255, 255, 255, 0.6); color: var(--accent-strong); }
body.body--tasks-canvas .main .empty-state { color: var(--ink-muted); }
body.body--tasks-canvas .main .btn-secondary {
  background: var(--surface-card);
  border: 1px solid var(--ink-border-input);
  color: var(--ink-secondary);
}
body.body--tasks-canvas .main .btn-secondary:hover { border-color: var(--ink-border-strong); color: var(--ink-strong); }
body.body--tasks-canvas .main .btn-link { color: var(--accent-strong); }
body.body--tasks-canvas .main .btn-link:hover { color: var(--accent-solid); text-decoration: underline; }

/* ── Tasks page: floating project nav ────────────────────────────── */
.tasks-nav {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.tasks-nav__toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ink-border-input);
  background: var(--surface-card);
  color: var(--ink-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-button), var(--shadow-popover);
  transition: background 0.15s, color 0.15s;
}
.tasks-nav__toggle:hover { color: var(--accent-strong); border-color: var(--accent-border); }
.tasks-nav--collapsed .tasks-nav__toggle { color: var(--accent-strong); border-color: var(--accent-border); }
.tasks-nav__list {
  max-height: 70vh;
  overflow-y: auto;
  background: oklch(0.99 0.004 265 / 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--ink-border-input);
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 140px;
  max-width: 220px;
  box-shadow: var(--shadow-popover-lg);
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-border-strong) transparent;
}
.tasks-nav__list { scrollbar-color: var(--ink-border-strong) transparent; }
.tasks-nav__list::-webkit-scrollbar { width: 4px; }
.tasks-nav__list::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.tasks-nav__item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.tasks-nav__item:hover { background: var(--ink-divider); }
.tasks-nav__item--active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.tasks-nav__item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasks-nav__count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 400;
  color: inherit;
  opacity: 0.6;
  background: var(--ink-divider);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.4;
}
.tasks-nav__item--active .tasks-nav__count, .tasks-nav__block--active .tasks-nav__count { background: color-mix(in oklch, currentColor 18%, transparent); }
.tasks-nav__project { display: flex; align-items: center; gap: 1px; }
.tasks-nav__project .tasks-nav__item { flex: 1; min-width: 0; }
.tasks-nav__project-toggle {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 9px;
  width: 20px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.tasks-nav__project-toggle:hover { background: var(--ink-divider); color: var(--ink); }
.tasks-nav__project-toggle--open { transform: rotate(90deg); color: var(--ink); }
/* Обёртка блоков — подсветка каждой строки остаётся ровным прямоугольником
   на общей левой границе-«ветке», а не смещается собственным padding-left
   у каждой кнопки (раньше из-за этого ховер/выделение блока визуально
   «уезжал» правее остальных пунктов списка). */
.tasks-nav__blocks {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 1px 0 2px 14px;
  padding-left: 6px;
  border-left: 1px solid var(--ink-hairline);
}
.tasks-nav__block {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  text-align: left;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.tasks-nav__block:hover { background: var(--ink-divider); color: var(--ink); }
.tasks-nav__block--active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.tasks-nav__divider { height: 1px; background: var(--ink-hairline); margin: 7px 4px; flex-shrink: 0; }
.tasks-nav__item--timeline { color: var(--accent-strong); font-weight: 500; }
.tasks-nav__item--timeline:hover { background: var(--accent-tint); }
.tasks-nav__item--timeline.tasks-nav__item--active { background: var(--accent-tint); color: var(--accent-strong); }

/* ── Settings page ────────────────────────────────────────────────── */
/* По схеме /directory: .settings-page — общая залитая обёртка, слитая с
   .header без своей рамки/скругления сверху (та же тень, что у шапки,
   скругление только снизу — иначе рамка вплотную к низу шапки даёт двойную
   серую полосу, см. .main на /directory). .settings-section внутри —
   белые плашки уже её ширины за счёт паддинга. */
.settings-page {
    background: var(--surface-content);
    border-radius: 0 0 12px 12px;
    padding: 18px;
    box-shadow: var(--shadow-popover), var(--shadow-hairline);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.settings-section {
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
}
.settings-section__title {
    display: flex;
    align-items: center;
    border-left: 3px solid var(--accent-strong);
    padding-left: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    box-shadow: inset 0 -1px 0 var(--ink-divider);
}
.settings-row__label {
    font-size: 0.85rem;
    color: var(--ink-strong);
    margin-bottom: 0.2rem;
}
.settings-row__desc {
    font-size: 0.75rem;
    color: var(--ink-muted);
    line-height: 1.4;
}
.settings-toggle {
    flex-shrink: 0;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--ink-border-input);
    background: var(--surface-card);
    color: var(--ink-tertiary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    min-width: 52px;
    text-align: center;
}
.settings-toggle:hover { color: var(--accent-strong); }
/* Тот же цвет, что уже используется для багов в задачах (.task-card--bug,
   .task-panel__head--bug) — не общий «активный» акцент, а именно семантика
   бага. */
.settings-toggle--on {
    background: var(--danger-tint);
    border-color: var(--danger-border);
    color: var(--danger-strong);
}

.settings-theme-switch {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.settings-theme-switch__btn {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--ink-border-input);
    background: var(--surface-card);
    color: var(--ink-tertiary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-theme-switch__btn:hover { color: var(--accent-strong); }
.settings-theme-switch__btn--on {
    background: var(--accent-tint);
    border-color: var(--accent-border);
    color: var(--accent-strong);
}

.status-admin-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.status-admin-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: background 0.12s;
}
.status-admin-row:hover { background: oklch(0.985 0.008 275); }
.status-admin-row__order {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.status-admin-row__order-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 0.55rem;
    line-height: 1.1;
    padding: 0;
    transition: color 0.12s;
}
.status-admin-row__order-btn:hover:not(:disabled) { color: var(--accent-strong); }
.status-admin-row__order-btn:disabled { opacity: 0.25; cursor: default; }
.status-admin-row__swatch {
    position: relative;
    flex-shrink: 0;
    display: block;
    width: 22px;
    height: 22px;
    border: 1px solid var(--ink-border-input);
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
}
.status-admin-row__swatch input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    opacity: 0;
    cursor: pointer;
}
.status-admin-row__color-input {
    flex-shrink: 0;
    width: 128px;
    font-size: 0.8rem;
    font-family: var(--font-mono, monospace);
    color: var(--ink-strong);
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    outline: none;
    border-radius: 5px;
    padding: 0.25rem 0.4rem;
    box-shadow: var(--shadow-inset);
}
.status-admin-row__color-input:focus { border-color: var(--accent-border); }
.status-admin-row__icon,
.status-admin-row__icon-input {
    flex-shrink: 0;
    width: 26px;
    text-align: center;
    font-size: 0.85rem;
    background: none;
    border: 1px solid transparent;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 0.15rem 0;
    font-family: inherit;
}
.status-admin-row__icon:hover { border-color: var(--ink-border-input); }
.status-admin-row__icon-input { color: var(--ink-strong); border-color: var(--accent-border); background: var(--surface-card); cursor: text; }
.status-admin-row__name,
.status-admin-row__name-input {
    flex: 1;
    font-size: 0.85rem;
    color: var(--ink-strong);
    background: none;
    border: 1px solid transparent;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-family: inherit;
    min-width: 0;
}
.status-admin-row__name:hover { border-color: var(--ink-border-input); }
.status-admin-row__name-input { border-color: var(--accent-border); background: var(--surface-card); cursor: text; }
.status-admin-row__stats {
    flex-shrink: 0;
    background: var(--surface-panel);
    border: 1px solid var(--ink-border-input);
    border-radius: 5px;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
}
.status-admin-row__stats:hover { border-color: var(--ink-border-input); color: var(--ink-tertiary); }
.status-admin-row__stats--on {
    background: var(--accent-tint);
    border-color: var(--accent-border);
    color: var(--accent-strong);
}
.status-admin-row__system {
    flex-shrink: 0;
    font-size: 0.75rem;
    opacity: 0.7;
}
.status-admin-row__del {
    flex-shrink: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--ink-glyph);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0 0.3rem;
    transition: color 0.12s;
}
.status-admin-row__del:hover { color: var(--danger-strong); }
.status-admin-add {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    box-shadow: inset 0 1px 0 var(--ink-divider);
}
.status-admin-add__input {
    flex: 1;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-input);
    border-radius: 5px;
    color: var(--ink-strong);
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0.35rem 0.6rem;
    box-shadow: var(--shadow-inset);
}
.status-admin-add__input:focus { outline: none; border-color: var(--accent-border); }
/* Кнопка отправки/добавления — сплошная заливка, как .task-checklist-add__btn
   и .task-question__save-btn, а не тонированная пилюля переключателя. */
.status-admin-add__btn {
    flex-shrink: 0;
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    outline: none;
    border-radius: 5px;
    color: #fff;
    font-size: 0.8rem;
    font-family: inherit;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: background 0.12s;
}
.status-admin-add__btn:hover { background: var(--accent-solid); }

/* ══ Block move popup ═══════════════════════════════════════════════ */
.bmove-overlay {
    position: fixed;
    inset: 0;
    background: oklch(0.22 0.015 265 / 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.bmove-popup {
    background: var(--surface-card);
    border: 1px solid var(--ink-hairline);
    border-radius: 12px;
    width: 360px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-popover-lg);
    font-family: var(--font-ui);
}
.bmove-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--ink-divider);
    gap: 8px;
}
.bmove-title {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.4;
}
.bmove-block-name {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    margin-top: 1px;
    word-break: break-word;
}
.bmove-close {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1;
}
.bmove-close:hover { background: var(--ink-divider); color: var(--ink); }
.bmove-project-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ink-divider);
}
.bmove-label {
    font-size: 12.5px;
    color: var(--ink-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.bmove-select {
    flex: 1;
    background: var(--surface-card);
    border: 1px solid var(--ink-border-soft);
    color: var(--ink);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    font-family: inherit;
    box-shadow: var(--shadow-inset);
    min-width: 0;
}
.bmove-select:focus { outline: none; border-color: var(--accent-border); }
.bmove-list {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}
.bmove-list { scrollbar-color: var(--ink-border-strong) transparent; }
.bmove-list::-webkit-scrollbar { width: 4px; }
.bmove-list::-webkit-scrollbar-track { background: transparent; }
.bmove-list::-webkit-scrollbar-thumb { background: var(--ink-border-strong); border-radius: 4px; }
.bmove-loading {
    padding: 16px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 13px;
}
.bmove-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    color: var(--ink-strong);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}
.bmove-item:hover:not(:disabled) { background: var(--accent-tint); color: var(--accent-strong); }
.bmove-item--root {
    color: var(--ink-muted);
    font-style: italic;
    border-bottom: 1px solid var(--ink-divider);
    margin-bottom: 4px;
}
.bmove-item--root:hover:not(:disabled) { color: var(--accent-strong); }
.bmove-item--disabled {
    color: var(--ink-glyph);
    cursor: default;
}
.bmove-item__dot {
    color: var(--ink-glyph);
    flex-shrink: 0;
}

/* ── Баннер недоступности БД ──────────────────────────────────────────── */
.db-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--danger-tint);
    border-bottom: 1px solid var(--danger-border);
    color: var(--danger-strong);
    font-size: 14px;
    text-align: center;
}
.db-banner__retry {
    border: 1px solid var(--danger-border);
    background: transparent;
    color: var(--danger-strong);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
}
.db-banner__retry:hover { background: var(--danger-tint); }
