/* Реестр проектов, рабочее пространство проекта, задачи и диалоги. */
.visually-hidden { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.text-urgent { color:var(--err); }
.text-ok { color:var(--ok); }
.muted-chip { display:inline-flex; align-items:center; min-height:24px; padding:2px 9px; border-radius:999px; background:var(--sunken); color:var(--muted); font-size:11px; font-weight:650; white-space:nowrap; }
.link-button { min-height:0; padding:0; border:0; background:transparent; color:inherit; font-weight:700; text-decoration:underline; }
.link-button:hover { background:transparent; color:var(--ink); }
.button-link { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:8px 16px; border:1px solid transparent; border-radius:999px; background:var(--brand-d); color:#fff; font-size:13px; font-weight:650; text-decoration:none; white-space:nowrap; }
.button-link:hover { background:var(--brand-action-hover); }
.button-link.ghost { border-color:var(--line-strong); background:#fff; color:var(--ink); }
.button-link.ghost:hover { background:var(--sunken); }
.danger-text { color:var(--err)!important; }

/* Оболочка: ссылки меню, хлебные крошки, быстрый переход. */
.sidebar-nav a { display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:9px 11px; border-radius:10px; color:var(--ink-soft); font-size:13px; font-weight:600; text-decoration:none; }
.sidebar-nav a:hover { background:var(--sunken); color:var(--ink); }
.sidebar-nav a.active { background:var(--ink); color:#fff; }
.sidebar-nav a svg { flex:0 0 20px; }
.header-context { display:flex; align-items:center; gap:8px; min-width:0; overflow:hidden; white-space:nowrap; }
.header-context a { color:#CFC5B8; text-decoration:none; }
.header-context a:hover { color:#fff; text-decoration:underline; }
.header-context span:last-child { overflow:hidden; text-overflow:ellipsis; color:#F3ECE2; }
.quick-switch-button { display:inline-flex; align-items:center; gap:9px; min-height:36px; margin-left:auto; padding:6px 10px 6px 12px; border:1px solid rgba(255,255,255,.18); border-radius:999px; background:rgba(255,255,255,.06); color:#CFC5B8; font-size:12px; font-weight:600; }
.quick-switch-button:hover { background:rgba(255,255,255,.12); color:#fff; }
.quick-switch-button svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.quick-switch-button kbd { padding:1px 6px; border:1px solid rgba(255,255,255,.22); border-radius:6px; font:inherit; font-size:10px; }
.quick-switch-button + .account-actions { margin-left:0; }

/* Реестр */
.registry-panel { padding-bottom:12px; }
.projects-registry-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.projects-registry-head h1 { margin:2px 0 0; font-size:26px; letter-spacing:-.02em; }
.registry-views { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.registry-views > button,.saved-view > button:first-child { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink-soft); font-size:12px; font-weight:650; }
.registry-views > button:hover,.saved-view > button:first-child:hover { background:var(--sunken); color:var(--ink); }
.registry-views > button.active { border-color:var(--ink); background:var(--ink); color:#fff; }
.registry-views > button span { display:inline-grid; place-items:center; min-width:22px; height:20px; padding:0 6px; border-radius:999px; background:var(--sunken); color:var(--ink-soft); font-size:11px; }
.registry-views > button.active span { background:rgba(255,255,255,.18); color:#fff; }
.saved-view { display:inline-flex; align-items:center; }
.saved-view > button:first-child { border-style:dashed; }
.saved-view-remove { min-height:28px; width:28px; margin-left:-4px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); }
.saved-view-remove:hover { background:var(--err-bg); color:var(--err); }
.registry-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:10px; }
.registry-toolbar select { min-height:40px; width:auto; max-width:220px; }
.registry-search { flex:1 1 220px; max-width:320px; }
.registry-search input { min-height:40px; }
.registry-toolbar .business-unit-switch { margin-left:0; border-color:var(--line); background:var(--sunken); }
.registry-toolbar .business-unit-switch button { color:var(--ink-soft); }
.registry-toolbar .business-unit-switch button:hover { background:#fff; }
.registry-toolbar .business-unit-switch button.active { background:#fff; color:var(--ink); box-shadow:0 1px 4px rgba(26,23,20,.1); }
.registry-columns { position:relative; }
.registry-columns summary { display:inline-flex; align-items:center; min-height:40px; padding:8px 14px; border:1px solid var(--line-strong); border-radius:999px; background:#fff; font-size:13px; font-weight:650; cursor:pointer; list-style:none; }
.registry-columns summary::-webkit-details-marker { display:none; }
.registry-columns-list { position:absolute; z-index:12; top:calc(100% + 6px); left:0; display:grid; gap:4px; min-width:220px; padding:10px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow-panel); }
.registry-columns-list label { display:flex; align-items:center; gap:8px; margin:0; padding:5px 4px; font-weight:500; }
.registry-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.registry-chips:empty { display:none; }
.filter-chip { min-height:28px; padding:3px 10px; border:1px solid var(--line-strong); border-radius:999px; background:var(--sunken); color:var(--ink); font-size:12px; font-weight:600; }
.filter-chip:hover { background:#fff; }
.registry-table-wrap { overflow-x:auto; margin:0 -24px; padding:0 24px; }
.registry-table { width:100%; border-collapse:collapse; font-size:13px; }
.registry-table thead th { position:sticky; top:0; z-index:1; padding:8px 10px; border-bottom:1px solid var(--line-strong); background:#fff; color:var(--muted); font-size:11px; font-weight:700; text-align:left; white-space:nowrap; }
.registry-table thead th button { min-height:0; padding:0; border:0; background:transparent; color:inherit; font:inherit; text-transform:none; }
.registry-table thead th button:hover { background:transparent; color:var(--ink); }
.registry-table tbody td { height:56px; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
.registry-table tbody tr[data-project-row] { cursor:pointer; }
.registry-table tbody tr[data-project-row]:hover td { background:var(--chart-surface); }
.registry-table tbody tr[data-tone="urgent"] td:first-child { box-shadow:inset 3px 0 0 var(--err); }
.registry-table tbody tr[data-tone="attention"] td:first-child { box-shadow:inset 3px 0 0 var(--attention-line); }
.registry-group th { padding:16px 10px 6px; border-bottom:1px solid var(--line-strong); color:var(--ink); font-size:12px; text-align:left; }
.registry-group th span { margin-left:6px; color:var(--muted); font-weight:500; }
.col-state { width:230px; }
.col-project a { color:var(--ink); font-weight:700; text-decoration:none; }
.col-project a:hover { text-decoration:underline; }
.col-project span { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
.col-plan span:first-child { display:block; font-size:12px; white-space:nowrap; }
.col-num { text-align:center; }
.col-traffic { white-space:nowrap; }
.col-traffic .sparkline { vertical-align:middle; margin-right:6px; }
.col-traffic small { display:block; color:var(--muted); font-size:10px; }
.count-link { display:inline-grid; place-items:center; min-width:28px; height:26px; padding:0 8px; border-radius:999px; font-weight:700; text-decoration:none; }
.count-link[data-tone="urgent"] { background:var(--err-bg); color:var(--err); }
.count-link[data-tone="attention"] { background:var(--approval-bg); color:var(--approval-ink); }
.count-link:hover { text-decoration:underline; }
.report-chip { display:inline-flex; min-height:22px; align-items:center; padding:2px 8px; border-radius:999px; background:var(--sunken); color:var(--muted); font-size:11px; font-weight:650; white-space:nowrap; }
.report-chip[data-status="ready"] { background:var(--ok-bg); color:var(--ok); }
.report-chip[data-status="draft"] { background:var(--warn-bg); color:var(--warn); }
.mini-progress { display:block; width:100%; max-width:120px; height:6px; margin-top:5px; border-radius:999px; background:var(--sunken); overflow:hidden; }
.mini-progress.wide { max-width:none; height:8px; margin:10px 0; }
.mini-progress i { display:block; height:100%; border-radius:inherit; background:var(--ink); }
.sparkline { width:60px; height:20px; overflow:visible; }
.sparkline polyline { fill:none; stroke:var(--chart-neutral); stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; }
.registry-empty { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:28px 4px; color:var(--muted); }
.registry-empty strong { color:var(--ink); font-weight:600; }

/* Метка состояния: цвет всегда с текстом. */
.state-badge { position:relative; display:inline-flex; flex-wrap:wrap; align-items:center; gap:2px 7px; max-width:100%; font-size:12px; outline-offset:2px; }
.state-badge i { width:9px; height:9px; border-radius:50%; background:var(--chart-neutral); flex:0 0 9px; }
.state-badge b { font-weight:700; white-space:nowrap; }
.state-badge small { flex-basis:100%; padding-left:16px; color:var(--muted); font-size:11px; line-height:1.35; }
.state-badge[data-tone="urgent"] i { background:var(--err); }
.state-badge[data-tone="urgent"] b { color:var(--err); }
.state-badge[data-tone="attention"] i { background:var(--attention-line); }
.state-badge[data-tone="attention"] b { color:var(--attention-ink); }
.state-badge[data-tone="ok"] i { background:var(--ok); }
.state-badge[data-tone="ok"] b { color:var(--ok); }
.state-badge .state-note-mark { color:var(--info); }
.state-tip { position:absolute; z-index:30; top:calc(100% + 6px); left:0; display:none; width:min(320px,80vw); padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); box-shadow:var(--shadow-panel); font-size:12px; line-height:1.4; }
.state-tip strong,.state-tip span,.state-tip em { display:block; }
.state-tip span { margin-top:6px; }
.state-tip em { margin-top:8px; color:var(--info); font-style:normal; }
.state-badge:hover .state-tip,.state-badge:focus .state-tip,.state-badge:focus-within .state-tip { display:block; }

/* Шапка проекта */
.project-header { margin:-4px 0 18px; }
.breadcrumbs { display:flex; align-items:center; gap:8px; margin-bottom:10px; color:var(--muted); font-size:12px; }
.breadcrumbs a { color:var(--muted); text-decoration:none; }
.breadcrumbs a:hover { color:var(--ink); text-decoration:underline; }
.project-header-main { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.project-header h1 { margin:0; font-size:26px; letter-spacing:-.02em; line-height:1.15; }
.project-header-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; margin-top:8px; color:var(--ink-soft); font-size:13px; }
.project-header-meta a { color:var(--ink); }
.project-connections { display:inline-flex; flex-wrap:wrap; gap:6px; }
.connection-dot { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:12px; }
.connection-dot::before { content:''; width:7px; height:7px; border-radius:50%; border:1.5px solid var(--line-strong); }
.connection-dot[data-on="true"] { color:var(--ink-soft); }
.connection-dot[data-on="true"]::before { border-color:var(--ok); background:var(--ok); }
.project-header-actions { display:flex; align-items:center; gap:10px; }
.month-switch { display:inline-flex; align-items:center; gap:4px; padding:3px; border:1px solid var(--line); border-radius:999px; background:var(--sunken); }
.month-switch button { width:34px; min-height:34px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ink); }
.month-switch button:hover { background:#fff; }
.month-switch strong { min-width:132px; text-align:center; font-size:13px; }
.action-menu { position:relative; }
.action-menu summary { display:inline-flex; align-items:center; min-height:40px; padding:8px 14px; border:1px solid var(--line-strong); border-radius:999px; background:#fff; font-size:13px; font-weight:650; cursor:pointer; list-style:none; }
.action-menu summary::-webkit-details-marker { display:none; }
.action-menu-list { position:absolute; z-index:25; top:calc(100% + 6px); right:0; display:grid; min-width:240px; padding:6px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow-panel); }
.action-menu-item { display:block; width:100%; min-height:38px; padding:9px 12px; border:0; border-radius:8px; background:transparent; color:var(--ink); font-size:13px; font-weight:500; text-align:left; text-decoration:none; }
.action-menu-item:hover { background:var(--sunken); }
.project-tabs { margin-top:18px; margin-bottom:0; }
.project-tabs a { display:inline-flex; align-items:center; min-height:44px; padding:10px 14px; border-bottom:2px solid transparent; color:var(--ink-soft); font-size:13px; font-weight:650; text-decoration:none; white-space:nowrap; }
.project-tabs a:hover { background:var(--sunken); color:var(--ink); }
.project-tabs a.active { color:var(--brand-d); border-bottom-color:var(--brand); }
#auditWorkspace > .inline-note { margin-bottom:14px; }

/* Обзор */
.overview-block { padding:20px; border:1px solid var(--line); border-radius:14px; background:#fff; margin-bottom:16px; }
.overview-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.overview-head h2 { margin:0; font-size:17px; }
.overview-head a { font-size:13px; }
.overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.overview-grid .overview-block { margin-bottom:16px; }
.overview-attention { border-color:var(--line-strong); }
.attention-list { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.attention-list li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 14px; border-radius:10px; background:var(--attention-bg); border-left:3px solid var(--attention-line); font-size:13px; }
.attention-list li[data-tone="urgent"] { background:var(--overdue-bg); border-left-color:var(--err); }
.attention-list a { flex:0 0 auto; font-weight:650; }
.all-good { display:grid; gap:2px; padding:12px 14px; border-radius:10px; background:var(--ok-bg); color:var(--ok); font-size:13px; }
.state-note { display:grid; gap:2px; margin-bottom:10px; padding:10px 14px; border-radius:10px; background:var(--info-bg); color:var(--info); font-size:13px; }
.state-note small { opacity:.8; }
.next-tasks,.history-list,.linked-list,.research-history { margin:0; padding:0; list-style:none; }
.next-tasks li { border-bottom:1px solid var(--line); }
.next-tasks li:last-child { border-bottom:0; }
.next-tasks a { display:grid; gap:3px; padding:10px 0; color:var(--ink); text-decoration:none; }
.next-tasks a:hover strong { text-decoration:underline; }
.next-tasks span { color:var(--muted); font-size:12px; }
.next-tasks em { font-style:normal; }
.metric-big strong { display:block; font-size:26px; letter-spacing:-.02em; }
.metric-big span { color:var(--muted); font-size:13px; }
.results-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.results-grid h3 { margin:0 0 8px; font-size:13px; color:var(--ink-soft); }
.result-row { display:flex; align-items:center; gap:12px; }
.result-row strong { display:block; font-size:22px; }
.result-row span { color:var(--muted); font-size:12px; }
.positions-list { display:grid; gap:6px; }
.positions-list strong { font-size:18px; margin-right:6px; }
.positions-list span { color:var(--muted); font-size:12px; }
.source-line { margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.history-list li { display:grid; grid-template-columns:76px minmax(0,1fr); gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px; }
.history-list li:last-child { border-bottom:0; }
.history-list small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
.history-list a { color:var(--ink); }
.history-kind { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding-top:2px; }
.quick-actions { display:flex; flex-wrap:wrap; gap:10px; }
.segmented { display:inline-flex; flex-wrap:wrap; gap:3px; padding:3px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); }
.segmented button { min-height:30px; padding:4px 10px; border:0; border-radius:9px; background:transparent; color:var(--ink-soft); font-size:12px; }
.segmented button.active { background:#fff; color:var(--ink); box-shadow:0 1px 4px rgba(26,23,20,.1); }
.subhead { margin:18px 0 8px; font-size:14px; }
.linked-list li { display:flex; gap:10px; padding:6px 0; font-size:13px; }
.linked-list span { color:var(--muted); }

/* SEO-данные */
.research-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.research-card { padding:20px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.research-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.research-card-head h3 { margin:0; font-size:17px; }
.research-main { margin:0 0 4px; font-size:15px; font-weight:650; }
.research-card .muted { margin:0; font-size:12px; }
.research-history { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.research-history li { display:flex; justify-content:space-between; gap:10px; padding:4px 0; font-size:12px; }
.research-history small { color:var(--muted); white-space:nowrap; }
.research-disabled { grid-column:1 / -1; }
.project-tool-head { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.project-tool-head h2 { margin:0; font-size:19px; }
#projectToolSlot > section { margin:0; }
body.tool-embedded #projectToolSlot .service-hero { box-shadow:none; }
body.tool-embedded #projectToolSlot .semantic-project-row > div:first-child,
body.tool-embedded #projectToolSlot .ai-create-grid > .ai-span-2:first-child { display:none; }

/* Задачи */
.task-panel { margin-top:4px; }
.plan-presale { margin-bottom:18px; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--chart-surface); }
.plan-settings-head h3 { margin:0; font-size:16px; }
.plan-settings-head p { margin:4px 0 14px; color:var(--muted); font-size:13px; }
.task-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:10px; }
.task-toolbar input[type=search] { width:200px; min-height:38px; }
.task-toolbar select { width:auto; min-height:38px; max-width:200px; }
.task-toolbar > button:last-child { margin-left:auto; }
.task-save-state { min-width:0; color:var(--muted); font-size:12px; font-weight:600; }
.task-save-state[data-tone="busy"] { color:var(--info); }
.task-save-state[data-tone="ok"] { color:var(--ok); }
.task-save-state[data-tone="error"] { color:var(--err); }
.plan-sync-details { margin-bottom:12px; }
.plan-sync-chip { display:inline-flex; align-items:center; gap:8px; min-height:30px; padding:4px 12px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink-soft); font-size:12px; font-weight:650; cursor:pointer; list-style:none; }
.plan-sync-chip::-webkit-details-marker { display:none; }
.plan-sync-chip::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--ok); }
.plan-sync-chip[data-tone="neutral"]::before { background:var(--chart-neutral); }
.plan-sync-chip[data-tone="pending"] { border-color:var(--attention-line); background:var(--attention-bg); color:var(--attention-ink); }
.plan-sync-chip[data-tone="pending"]::before { background:var(--attention-line); }
.plan-sync-chip[data-tone="error"] { border-color:#E9A18F; background:var(--err-bg); color:var(--err); }
.plan-sync-chip[data-tone="error"]::before { background:var(--err); }
.plan-sync-details[open] .plan-sync-bar { margin-top:10px; }
.task-summary { display:flex; flex-wrap:wrap; gap:6px 16px; margin:0 0 10px; color:var(--ink-soft); font-size:12px; }
.task-month-note { margin-bottom:10px; padding:8px 12px; border-radius:10px; background:var(--info-bg); color:var(--info); font-size:12px; }
.task-overdue-note { background:var(--overdue-bg); color:var(--err); }
.task-overdue-note a { color:inherit; font-weight:650; }
.task-table-wrap { max-height:none; overflow-x:auto; border:1px solid var(--line); border-radius:12px; }
.task-table { width:100%; border-collapse:collapse; font-size:13px; }
.task-table thead th { padding:8px 10px; border-bottom:1px solid var(--line-strong); background:var(--chart-surface); color:var(--muted); font-size:11px; font-weight:700; text-align:left; }
.task-table thead th:nth-child(1) { width:38%; }
.task-table thead th:nth-child(2) { width:14%; }
.task-table thead th:nth-child(3) { width:132px; }
.task-table thead th:nth-child(4) { width:16%; }
.task-row td { height:44px; padding:4px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.task-row { cursor:pointer; }
.task-row:hover td { background:var(--chart-surface); }
.task-row[data-overdue="true"] td:first-child { box-shadow:inset 3px 0 0 var(--err); }
.task-row[data-save-state="saving"] td,.task-row[data-save-state="pending"] td { background:#F7FAFB; }
.task-row[data-save-state="error"] td,.task-row[data-save-state="invalid"] td { background:var(--err-bg); }
.cell-edit { min-height:28px; padding:4px 6px; border-radius:6px; line-height:1.35; cursor:text; overflow-wrap:anywhere; }
.cell-edit:hover { background:#fff; box-shadow:inset 0 0 0 1px var(--line-strong); }
.cell-edit.is-empty { color:#9A9083; }
.cell-edit.is-editing { padding:0; box-shadow:none; }
.cell-edit textarea { width:100%; min-height:30px; padding:5px 6px; border-radius:6px; resize:none; font-size:13px; line-height:1.35; overflow:hidden; }
.cell-select,.cell-date { width:100%; min-height:30px!important; height:30px; padding:2px 6px!important; border-color:transparent!important; border-radius:6px; background-color:transparent; font-size:12px!important; }
.cell-select:hover,.cell-date:hover,.cell-select:focus,.cell-date:focus { border-color:var(--line-strong)!important; background-color:#fff; }
.status-select[data-status="Выполнено"] { color:var(--ok); font-weight:650; }
.status-select[data-status="В работе"] { color:var(--info); font-weight:650; }
.status-select[data-status="Необходимо согласовать"],.status-select[data-status="На согласовании"] { color:var(--approval-ink); font-weight:650; }
.task-row[data-overdue="true"] .cell-date { color:var(--err); font-weight:650; }
.task-chips { display:flex; flex-wrap:wrap; gap:4px; padding:0 6px 2px; }
.task-chips span { padding:0 6px; border-radius:999px; background:var(--sunken); color:var(--muted); font-size:10px; font-weight:650; line-height:18px; }
.task-chips span[data-tone="urgent"] { background:var(--err-bg); color:var(--err); }
.task-chips span[data-tone="attention"] { background:var(--approval-bg); color:var(--approval-ink); }
.cell-link { display:inline-block; margin:0 6px; font-size:11px; }
.cell-note { font-size:11px; padding:0 6px; }
.plan-section-row th { padding:0; border-bottom:1px solid var(--line); background:var(--sunken); text-align:left; }
.section-toggle { width:100%; min-height:34px; padding:6px 10px; border:0; border-radius:0; background:transparent; color:var(--ink); font-size:12px; font-weight:700; text-align:left; }
.section-toggle:hover { background:var(--line); }
.section-toggle span { margin-left:6px; color:var(--muted); font-weight:500; }
.task-quick-add td { padding:6px 8px; }
.quick-add-input { width:100%; min-height:36px!important; border-style:dashed!important; background:transparent!important; font-size:13px!important; }
.quick-add-input:focus { border-style:solid!important; background:#fff!important; }
.plan-column .quick-add-input { margin-top:8px; }
.plan-card[draggable="true"] { cursor:grab; }
.plan-card.is-dragging { opacity:.5; }
.plan-card[data-overdue="true"] { border-left:3px solid var(--err); }
.plan-column.is-drop-target { border-color:var(--brand); background:var(--brand-tint); }
.task-filter-empty { padding:18px!important; }
.task-empty { padding:28px; border:1px dashed var(--line-strong); border-radius:14px; text-align:center; }
.task-empty h3 { margin:0 0 6px; font-size:18px; }
.task-empty p { margin:0 auto 16px; max-width:52ch; color:var(--muted); font-size:13px; }
.task-empty .quick-add-input { max-width:520px; margin:0 auto; display:block; }
.task-empty-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:16px; }
.plan-client-comment { margin:2px 6px 0; color:var(--info); font-size:11px; }

/* Настройки проекта */
.settings-nav { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.settings-nav a { padding:6px 12px; border-radius:999px; background:var(--sunken); color:var(--ink-soft); font-size:12px; font-weight:650; text-decoration:none; }
.settings-nav a:hover { color:var(--ink); background:var(--line); }
.settings-block { padding:20px; border:1px solid var(--line); border-radius:14px; background:#fff; margin-bottom:16px; scroll-margin-top:80px; }
.settings-block h2 { margin:0 0 14px; font-size:17px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.settings-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin-top:16px; }
.settings-source { margin:14px 0 0; padding:10px 12px; border-radius:10px; background:var(--sunken); font-size:13px; }
.field-hint { margin-top:5px; font-size:11px; }
.profile-grid.compact { margin-top:16px; }
#settingsEstimateSlot .plan-settings-form { padding:0; }
#settingsEstimateSlot .plan-settings-head { display:none; }

/* Диалоги */
.side-dialog { position:fixed; inset:0 0 0 auto; width:min(460px,100%); height:100dvh; max-height:none; margin:0; padding:0; border:0; border-left:1px solid var(--line); background:var(--panel); box-shadow:-20px 0 50px rgba(20,17,14,.18); }
.side-dialog::backdrop,.small-dialog::backdrop,.quick-switcher::backdrop { background:rgba(20,17,14,.5); }
.side-dialog-body { display:grid; gap:16px; padding:24px; }
.side-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.side-dialog-head h2 { margin:0; font-size:21px; }
.side-dialog-head p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.side-dialog-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.side-dialog-actions { display:flex; justify-content:flex-end; gap:10px; }
.small-dialog { width:min(480px,calc(100% - 32px)); padding:22px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:var(--shadow-panel); }
.small-dialog h2 { margin:0 0 6px; font-size:19px; }
.small-dialog p { margin:0 0 14px; font-size:13px; }
.small-dialog textarea,.small-dialog input[type=text],.small-dialog input[type=date] { margin-bottom:10px; }
.small-dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:8px; }
.conflict-fields { display:grid; gap:8px; margin:0 0 12px; padding:0; list-style:none; font-size:13px; }
.conflict-fields li { display:grid; gap:2px; padding:8px 10px; border-radius:10px; background:var(--sunken); }
.conflict-fields span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.quick-switcher { width:min(560px,calc(100% - 32px)); margin-top:12vh; padding:0; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:var(--shadow-panel); }
.quick-switcher-body input { min-height:54px; border:0; border-bottom:1px solid var(--line); border-radius:16px 16px 0 0; font-size:16px; padding:14px 18px; }
.quick-switcher-body input:focus { box-shadow:none; }
.quick-switcher-list { display:grid; max-height:50vh; overflow-y:auto; padding:6px; }
.quick-switcher-list button { display:grid; gap:2px; width:100%; min-height:0; padding:10px 12px; border:0; border-radius:10px; background:transparent; color:var(--ink); text-align:left; }
.quick-switcher-list button span { color:var(--muted); font-size:12px; font-weight:500; }
.quick-switcher-list button.active,.quick-switcher-list button:hover { background:var(--sunken); }
.quick-switcher-empty { padding:18px; color:var(--muted); font-size:13px; text-align:center; }
.quick-switcher-hint { display:flex; gap:16px; padding:8px 16px 10px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }

/* «Моя работа»: независимые фильтры и группы по проектам */
.work-filters { display:flex; flex-wrap:wrap; gap:8px 12px; width:100%; }
.work-filters > div { display:flex; flex-direction:column; gap:4px; min-width:150px; }
.work-filters label { color:var(--muted); font-size:11px; font-weight:700; }
.work-group { border:1px solid var(--line); border-radius:12px; padding:4px 12px 8px; }
.work-group + .work-group { margin-top:12px; }
.work-group-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; min-height:44px; }
.work-group-toggle { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:4px 6px; border:0; background:transparent; box-shadow:none; color:var(--ink); font:inherit; text-align:left; }
.work-group-toggle:hover { background:var(--sunken); }
.work-group-chevron { width:12px; color:var(--muted); }
.work-group-count { color:var(--muted); font-size:13px; }
.work-group-link { margin-left:auto; font-size:13px; }
.work-group-more { display:inline-block; margin:8px 0 0 6px; font-size:13px; font-weight:600; }

/* «Моя работа» и «Команда и загрузка» — один экран в двух видах */
#dashboardApp[data-view="work"][data-admin="true"] #workloadCalendar,
#dashboardApp[data-view="work"][data-admin="true"] #dashboardTeamPanel { display:none; }
#dashboardApp[data-view="team"] .dashboard-focus-panel,
#dashboardApp[data-view="team"] #dashboardProgress,
#dashboardApp[data-view="team"] .dashboard-side > section:not(#dashboardTeamPanel) { display:none; }
#dashboardApp[data-view="team"] .dashboard-workspace { grid-template-columns:minmax(0,1fr); }
.team-table th[scope="row"] { text-align:left; font-weight:600; }
.team-table td, .team-table th[scope="row"] { height:48px; }
.team-count { display:inline-block; min-width:28px; padding:2px 8px; border-radius:999px; background:var(--sunken); font-weight:700; text-align:center; }
.team-count[data-tone="overdue"] { background:var(--err-bg); color:var(--err); }
.team-count[data-tone="approval"] { background:var(--approval-bg); color:var(--approval-ink); }

/* Очередь отчётов */
.reports-queue-toolbar { align-items:flex-end; }
.reports-queue-toolbar > div { display:flex; flex-direction:column; gap:4px; min-width:160px; }
.reports-queue-toolbar label { color:var(--muted); font-size:11px; font-weight:700; }
.reports-queue-table .is-overdue { color:var(--err); font-weight:600; }
.reports-queue-actions { white-space:nowrap; text-align:right; }

@media (max-width:1100px) {
  .results-grid { grid-template-columns:1fr; }
  .project-header-main { flex-direction:column; }
}
@media (max-width:1024px) {
  .quick-switch-button kbd,.quick-switch-button span { display:none; }
  .quick-switch-button { padding:6px 10px; }
}
@media (max-width:767px) {
  .work-filters > div, .reports-queue-toolbar > div { flex:1 1 140px; min-width:0; }
  .work-group-link { margin-left:0; }
  .reports-queue-actions { white-space:normal; text-align:left; }
  .projects-registry-head { flex-direction:column; align-items:stretch; }
  .registry-toolbar > * { flex:1 1 100%; max-width:none!important; }
  .registry-toolbar select { max-width:none; width:100%; }
  .registry-table-wrap { margin:0; padding:0; overflow:visible; }
  .registry-table thead { display:none; }
  .registry-table,.registry-table tbody { display:block; }
  .registry-table tr[data-project-row] { display:grid; grid-template-columns:1fr; gap:6px; padding:12px 4px; border-bottom:1px solid var(--line); }
  .registry-table tr[data-project-row] td { display:none; height:auto; padding:0; border:0; }
  .registry-table tr[data-project-row] td.col-project,.registry-table tr[data-project-row] td.col-state { display:block; }
  .registry-table tr[data-project-row] td:first-child { box-shadow:none; }
  .registry-table tr[data-project-row] td.col-project { order:-1; }
  .registry-group { display:block; }
  .registry-group th { display:block; }
  .overview-grid,.research-grid,.settings-grid,.side-dialog-row { grid-template-columns:1fr; }
  .project-header-actions { width:100%; justify-content:space-between; }
  .month-switch strong { min-width:110px; }
  .attention-list li { flex-direction:column; align-items:flex-start; }
  .task-toolbar > * { flex:1 1 auto; }
  .task-toolbar input[type=search] { width:100%; }
  .task-toolbar > button:last-child { margin-left:0; width:100%; }
  .task-table thead { display:none; }
  .task-table,.task-table tbody { display:block; }
  .task-row { display:grid; grid-template-columns:1fr 1fr; gap:4px 8px; padding:10px 6px; border-bottom:1px solid var(--line); }
  .task-row td { display:block; height:auto; padding:0; border:0; }
  .task-row td.task-cell-name,.task-row td.task-cell-result { grid-column:1 / -1; }
  .plan-section-row,.task-quick-add { display:block; }
  .plan-section-row th,.task-quick-add td { display:block; }
  .history-list li { grid-template-columns:1fr; gap:2px; }
}
#dashboardTeam { overflow-x:auto; }
