/* Трекер — визуальная система. Ориентир: Linear. Токены → база → оболочка → экраны. */
:root {
  color-scheme: light;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --bg: #F7F7F8;            /* фон приложения */
  --side: #F0F0F2;          /* сайдбар, чуть темнее */
  --surface: #FFFFFF;       /* карточки, панели */
  --surface-2: #F3F3F5;     /* ховер, вложенные поверхности */
  --surface-3: #E9E9EC;     /* активные */
  --line: #E4E4E8;
  --line-2: #D4D4DA;
  --tx: #1B1B1F;
  --tx-2: #55555E;
  --tx-3: #8A8A94;
  --acc: #5E6AD2;
  --acc-h: #4F5BC4;
  --acc-soft: #EEF0FB;
  --on-acc: #FFFFFF;
  --on-status: #FFFFFF;
  --ok: #2E9B5F;
  --warn: #C98A15;
  --danger: #D64545;
  --violet: #8C5CD6;
  --st-wish: #9A9AA4;
  --st-backlog: #6F7A8C;
  --st-planning: #7A6BD0;
  --st-clarify: #C97A15;
  --st-returned: #D64545;
  --st-progress: #D9A400;
  --st-review: #5E6AD2;
  --st-done: #2E9B5F;
  --st-rejected: #D64545;
  --shadow-1: 0 1px 2px rgba(20, 20, 30, .06);
  --shadow-2: 0 4px 16px -2px rgba(20, 20, 30, .12), 0 1px 3px rgba(20, 20, 30, .08);
  --shadow-3: 0 16px 48px -8px rgba(20, 20, 30, .25), 0 2px 6px rgba(20, 20, 30, .1);
  --r-1: 4px; --r-2: 6px; --r-3: 8px; --r-4: 10px;
  --side-w: 232px;
  --panel-w: 580px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"], :root:not([data-theme="light"]):has(body) { }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171A; --side: #131316; --surface: #1E1E22; --surface-2: #26262B; --surface-3: #2E2E34;
    --line: #2A2A30; --line-2: #3A3A42; --tx: #ECECEE; --tx-2: #A7A7B0; --tx-3: #6E6E78;
    --acc: #7B85E0; --acc-h: #8D96E8; --acc-soft: #262A48; --on-acc: #FFFFFF; --on-status: #17171A;
    --ok: #4CBF7E; --warn: #E0B23A; --danger: #E5655F; --violet: #A98BE8;
    --st-wish: #6E6E78; --st-backlog: #8A94A8; --st-planning: #9B8DE8; --st-clarify: #E0A24A; --st-returned: #E5655F; --st-progress: #E0B23A; --st-review: #7B85E0; --st-done: #4CBF7E; --st-rejected: #E5655F;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 4px 16px -2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4); --shadow-3: 0 16px 48px -8px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #17171A; --side: #131316; --surface: #1E1E22; --surface-2: #26262B; --surface-3: #2E2E34;
  --line: #2A2A30; --line-2: #3A3A42; --tx: #ECECEE; --tx-2: #A7A7B0; --tx-3: #6E6E78;
  --acc: #7B85E0; --acc-h: #8D96E8; --acc-soft: #262A48; --on-acc: #FFFFFF; --on-status: #17171A;
  --ok: #4CBF7E; --warn: #E0B23A; --danger: #E5655F; --violet: #A98BE8;
  --st-wish: #6E6E78; --st-backlog: #8A94A8; --st-planning: #9B8DE8; --st-clarify: #E0A24A; --st-returned: #E5655F; --st-progress: #E0B23A; --st-review: #7B85E0; --st-done: #4CBF7E; --st-rejected: #E5655F;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 4px 16px -2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4); --shadow-3: 0 16px 48px -8px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; height: 100%; font: 13px/1.45 var(--font); color: var(--tx); background: var(--bg); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow: hidden; }
body.auth { overflow: auto; }
::selection { background: color-mix(in srgb, var(--acc) 28%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; border-radius: var(--r-1); }
svg { width: 16px; height: 16px; flex: none; }
kbd { font: 11px/1 var(--font); color: var(--tx-3); border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px; background: var(--surface); }
.mono { font-family: var(--mono); font-size: .93em; letter-spacing: -.01em; }
.muted { color: var(--tx-3); }
.small { font-size: 12px; }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.sp { flex: 1; }
.flip svg { transform: scaleX(-1); }
.hint { font-size: 12px; color: var(--tx-3); line-height: 1.5; margin-top: 8px; }
[hidden] { display: none !important; }

/* ---------- контролы ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); color: var(--tx); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; box-shadow: var(--shadow-1); }
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn.busy { position: relative; color: transparent; }
.btn.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid currentColor; border-color: var(--tx-3) transparent var(--tx-3) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.busy::after { border-color: var(--on-acc) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 38px; font-size: 14px; justify-content: center; }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn-primary:hover { background: var(--acc-h); border-color: var(--acc-h); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); background: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn.on { background: var(--acc-soft); border-color: color-mix(in srgb, var(--acc) 40%, var(--line-2)); color: var(--acc); }
.btn kbd { margin-left: 2px; }
.btn-primary kbd { color: var(--on-acc); border-color: rgba(255, 255, 255, .35); background: transparent; }
.ib { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--r-2); color: var(--tx-2); transition: background .12s, color .12s; flex: none; }
.ib:hover { background: var(--surface-2); color: var(--tx); }
.ib.xs { width: 22px; height: 22px; }
.ib.xs svg { width: 13px; height: 13px; }
.ib.danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.in { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); color: var(--tx); transition: border-color .12s, box-shadow .12s; }
.in::placeholder { color: var(--tx-3); }
.in:hover { border-color: color-mix(in srgb, var(--tx-3) 60%, var(--line-2)); }
.in:focus { outline: 0; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.in:disabled { background: var(--surface-2); color: var(--tx-2); }
.in-sm { height: 28px; font-size: 12.5px; }
textarea.in { height: auto; padding: 7px 10px; resize: vertical; line-height: 1.45; min-height: 32px; }
select.in { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
input[type="date"].in { min-width: 140px; }
.in-wrap { position: relative; display: flex; align-items: center; }
.in-wrap .in { padding-right: 32px; }
.in-eye { position: absolute; right: 4px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--tx-3); border-radius: var(--r-1); }
.in-eye:hover { color: var(--tx); }
.in-search i { position: absolute; left: 9px; display: inline-flex; color: var(--tx-3); pointer-events: none; }
.in-search i svg { width: 14px; height: 14px; }
.in-search .in { padding-left: 28px; padding-right: 10px; width: 220px; }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fld > span { font-size: 12px; font-weight: 500; color: var(--tx-2); }
.fld-row { display: flex; gap: 12px; }
.fld-row .fld { min-width: 0; }
.fld.grow { flex: 1; }
.fld.w-key { width: 96px; }
.fld-hr { border-top: 1px solid var(--line); margin: 4px 0 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 180px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.checks.tall { max-height: 260px; }
.chk { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.chk input { accent-color: var(--acc); width: 15px; height: 15px; margin: 0; }
.chk-line { margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; height: 28px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 30px; height: 18px; border-radius: 9px; background: var(--line-2); position: relative; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s var(--ease); }
.switch input:checked + i { background: var(--warn); }
.switch input:checked + i::after { transform: translateX(12px); }
.switch input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.swatches { display: flex; gap: 8px; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { display: block; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .12s; }
.sw input:checked + i { border-color: var(--tx); transform: scale(1.1); }
.sw input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }

/* чипы, бейджи, аватары */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 500; color: var(--tx-2); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.sm { height: 18px; padding: 0 6px; font-size: 11px; }
.chip svg { width: 12px; height: 12px; }
.chip.acc { color: var(--acc); background: var(--acc-soft); border-color: transparent; }
.chip.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: transparent; }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; }
.chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: transparent; }
.chip.st-progress { color: color-mix(in srgb, var(--st-progress) 70%, var(--tx)); background: color-mix(in srgb, var(--st-progress) 16%, transparent); border-color: transparent; }
.chip.ty-bug { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: transparent; }
.chip.ty-feature { color: var(--acc); background: var(--acc-soft); border-color: transparent; }
.chip.ty-design { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); border-color: transparent; }
.chip.ty-content { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: transparent; }
.chip.ty-deploy { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: transparent; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 500; color: hsl(var(--h) 45% 35%); background: hsl(var(--h) 60% 92%); }
:root[data-theme="dark"] .tag { color: hsl(var(--h) 60% 78%); background: hsl(var(--h) 30% 22%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag { color: hsl(var(--h) 60% 78%); background: hsl(var(--h) 30% 22%); } }
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; font-weight: 600; color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 55% 86%); letter-spacing: 0; }
:root[data-theme="dark"] .av { color: hsl(var(--h) 60% 85%); background: hsl(var(--h) 35% 30%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { color: hsl(var(--h) 60% 85%); background: hsl(var(--h) 35% 30%); } }
.av-xs { width: 18px; height: 18px; font-size: 8px; }
.av-sm { width: 24px; height: 24px; font-size: 10px; }
.av-md { width: 32px; height: 32px; font-size: 12px; }
.av-none { color: var(--tx-3); background: transparent; border: 1px dashed var(--line-2); }
.av-none svg { width: 60%; height: 60%; }
.pkey { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; font: 600 10.5px/1 var(--mono); letter-spacing: .02em; color: var(--tx-2); background: var(--surface-3); flex: none; }
.pkey.lg { height: 22px; padding: 0 7px; font-size: 12px; }
.ref { color: var(--tx-3); font-weight: 500; flex: none; }
.ref.lg { font-size: 13px; color: var(--tx-2); }
.sti { width: 15px; height: 15px; flex: none; }
.pri { width: 14px; height: 14px; flex: none; }
.pri rect { fill: var(--line-2); }
.pri rect.on { fill: var(--tx-2); }
.pri.urgent rect.on { fill: var(--danger); }
.cnt { font-size: 11.5px; font-weight: 500; color: var(--tx-3); background: var(--surface-3); border-radius: 9px; padding: 1px 6px; margin-left: 6px; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--tx-2); white-space: nowrap; }
.due svg { width: 12px; height: 12px; }
.due.danger { color: var(--danger); font-weight: 500; }
.due.warn { color: var(--warn); font-weight: 500; }
.due.muted { color: var(--tx-3); }
.meta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--tx-3); }
.meta svg { width: 12px; height: 12px; }
.meta.ok { color: var(--ok); }
.meta.warn { color: var(--warn); }
.col-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc, var(--tx-3)); flex: none; margin: 0 3px; }

/* ---------- тосты ---------- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 900; pointer-events: none; }
.toast { padding: 9px 14px; border-radius: var(--r-3); background: var(--tx); color: var(--bg); font-weight: 500; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s var(--ease); max-width: min(520px, 90vw); }
.toast.on { opacity: 1; transform: none; }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- слои ---------- */
.ov { position: fixed; inset: 0; z-index: 500; background: rgba(10, 10, 14, .38); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; opacity: 0; transition: opacity .14s; overflow: auto; }
.ov.on { opacity: 1; }
.ov.out { opacity: 0; }
.dlg { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); box-shadow: var(--shadow-3); transform: translateY(6px) scale(.985); transition: transform .16s var(--ease); }
.ov.on .dlg { transform: none; }
.dlg-sm { max-width: 420px; }
.dlg-md { max-width: 640px; }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.dlg-h h3 { font-size: 15px; font-weight: 600; flex: 1; }
.dlg-h-acts { display: flex; align-items: center; gap: 6px; }
.dlg-b { padding: 4px 16px 6px; }
.dlg-b p { color: var(--tx-2); line-height: 1.5; }
.dlg-f { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; justify-content: flex-end; }
.dlg-f .sp { flex: 1; }
.menu-pop { position: fixed; z-index: 700; min-width: 180px; max-width: 320px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-2); animation: pop .12s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-3px); } }
.menu-it { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border-radius: var(--r-1); text-align: left; color: var(--tx); font-weight: 450; }
.menu-it .mi-t { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-it .mi-t > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-it em { font-style: normal; color: var(--tx-3); margin-left: auto; }
.menu-it:hover, .menu-it:focus-visible { background: var(--surface-2); outline: 0; }
.menu-it > svg:first-child, .menu-it > .av { color: var(--tx-2); }
.menu-it .mi-check { color: var(--acc); margin-left: auto; flex: none; }
.menu-it.sel { color: var(--tx); }
.menu-it.danger { color: var(--danger); }
.menu-it.danger > svg:first-child { color: var(--danger); }
.menu-hr { border-top: 1px solid var(--line); margin: 4px 0; }
.menu-head { font-size: 11px; font-weight: 500; color: var(--tx-3); padding: 6px 8px 3px; text-transform: none; }
.menu-search { width: 100%; height: 30px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; margin-bottom: 4px; outline: 0; }
.menu-list { max-height: 300px; overflow: auto; }
.menu-empty { padding: 10px 8px; color: var(--tx-3); }
.pick .menu-it { gap: 8px; }
.pick .menu-it .sti, .pick .menu-it .pri, .pick .menu-it .av, .pick .menu-it .col-dot { flex: none; }

/* ---------- вход ---------- */
body.auth { display: flex; align-items: center; justify-content: center; background: var(--side); }
.auth-wrap { width: 100%; max-width: 360px; padding: 24px; }
.auth-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); padding: 28px 28px 24px; box-shadow: var(--shadow-2); }
.auth-logo { margin-bottom: 14px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; background: var(--acc); color: #fff; font-weight: 700; font-size: 15px; }
.auth-card h1 { font-size: 18px; font-weight: 600; margin-bottom: 18px; letter-spacing: -.01em; }
.auth-err { color: var(--danger); font-size: 12.5px; margin: -6px 0 12px; }
.auth-card .btn-lg { margin-top: 4px; }

/* ---------- оболочка ---------- */
body.app #app { display: flex; height: 100%; }
.side { width: var(--side-w); flex: none; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); }
.side-top { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px 0 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--tx); font-weight: 600; font-size: 14px; }
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.side-close { display: none; margin-left: auto; }
.side-search { padding: 2px 10px 8px; }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); color: var(--tx-3); box-shadow: var(--shadow-1); }
.search-btn:hover { color: var(--tx-2); background: var(--surface-2); }
.search-btn span { flex: 1; text-align: left; }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; }
.nav-it { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: var(--r-2); color: var(--tx-2); font-weight: 500; }
.nav-it:hover { background: var(--surface-3); color: var(--tx); text-decoration: none; }
.nav-it.on { background: var(--surface); color: var(--tx); box-shadow: var(--shadow-1); }
.nav-it svg { color: var(--tx-3); }
.nav-it.on svg { color: var(--acc); }
.nav-it > span:not(.pkey):not(.nav-n) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-n { font-size: 11px; color: var(--tx-3); font-weight: 500; }
.nav-n.danger { color: var(--danger); }
.nav-empty { padding: 6px 8px; color: var(--tx-3); font-size: 12px; }
.side-sec { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 2px 16px; font-size: 11.5px; font-weight: 600; color: var(--tx-3); }
.side-sec .ib { width: 22px; height: 22px; }
.nav-proj { flex: 1; overflow: auto; min-height: 0; }
.side-foot { padding: 8px; border-top: 1px solid var(--line); }
.user-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 6px; border-radius: var(--r-2); color: var(--tx); }
.user-btn:hover { background: var(--surface-3); }
.user-n { flex: 1; text-align: left; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn > svg { color: var(--tx-3); }
.side-bg { display: none; }
.main { flex: 1; min-width: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); flex: none; }
.top-menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; font-weight: 500; }
.crumbs a { color: var(--tx-3); }
.crumbs a:hover { color: var(--tx); text-decoration: none; }
.crumbs .cur { color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .sep { display: inline-flex; color: var(--tx-3); }
.crumbs .sep svg { width: 13px; height: 13px; }
.top-acts { display: flex; align-items: center; gap: 8px; }
#bellBtn { position: relative; }
#bellBtn .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); border: 1.5px solid var(--bg); }
.view { flex: 1; min-height: 0; overflow: auto; position: relative; display: flex; flex-direction: column; }
.page { padding: 20px 24px 40px; max-width: 980px; width: 100%; }
.page.wide { max-width: 1400px; }
.page.narrow { max-width: 720px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 20px; color: var(--tx-2); gap: 6px; }
.empty > svg { width: 28px; height: 28px; color: var(--tx-3); margin-bottom: 6px; }
.empty h3 { font-size: 15px; font-weight: 600; color: var(--tx); }
.empty p { max-width: 42ch; line-height: 1.5; }
.empty .btn { margin-top: 10px; }
.skeleton-rows { height: 200px; border-radius: var(--r-3); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 40%, var(--surface-2) 55%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- поиск и «что нового» ---------- */
.dlg-search { max-width: 620px; overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px; border-bottom: 1px solid var(--line); color: var(--tx-3); }
.search-in input { flex: 1; height: 100%; border: 0; background: transparent; font-size: 14px; outline: 0; color: var(--tx); }
.search-res { max-height: 60vh; overflow: auto; padding: 6px; }
.search-hint { padding: 16px 12px; color: var(--tx-3); }
.sg-h { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--tx-3); }
.sr { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 7px 10px; border-radius: var(--r-2); color: var(--tx); }
.sr:hover, .sr:focus-visible { background: var(--surface-2); text-decoration: none; outline: 0; }
.sr b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr span { color: var(--tx-3); font-size: 12px; white-space: nowrap; }
.sr em { grid-column: 1 / -1; font-style: normal; color: var(--tx-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif { max-height: 60vh; overflow: auto; padding: 0 8px 8px; }
.nrow { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: var(--r-2); color: var(--tx); }
.nrow:hover { background: var(--surface-2); text-decoration: none; }
.nrow .sti { margin-top: 2px; }
.nrow-b { flex: 1; min-width: 0; }
.nrow-t { font-weight: 500; }
.nrow-s { color: var(--tx-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nrow time { color: var(--tx-3); font-size: 11.5px; white-space: nowrap; }

/* ---------- проекты ---------- */
.plist { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.plist-h, .prow { display: grid; grid-template-columns: 44px minmax(200px, 1fr) 120px 60px minmax(120px, auto) 90px; gap: 12px; align-items: center; padding: 0 14px; }
.plist-h { height: 34px; font-size: 11.5px; font-weight: 600; color: var(--tx-3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.prow { min-height: 52px; padding-top: 8px; padding-bottom: 8px; color: var(--tx); border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--surface-2); text-decoration: none; }
.prow-main { display: flex; flex-direction: column; min-width: 0; }
.prow-main b { font-weight: 600; }
.prow-d { color: var(--tx-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-bar { display: block; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.prow-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.prow-n { font-weight: 600; text-align: right; }
.prow-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.prow-act { color: var(--tx-3); font-size: 12px; text-align: right; white-space: nowrap; }
.arch { margin-top: 16px; }
.arch summary { cursor: pointer; color: var(--tx-3); font-weight: 500; padding: 6px 0; margin-bottom: 8px; }

/* ---------- список задач ---------- */
.tl-sec { margin-bottom: 22px; }
.tl-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; height: 32px; padding: 0 8px; margin-bottom: 2px; }
.trow { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-2); color: var(--tx); border: 1px solid transparent; }
.trow:hover { background: var(--surface); border-color: var(--line); text-decoration: none; box-shadow: var(--shadow-1); }
.trow-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.trow-p { color: var(--tx-3); font-size: 12px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- пользователи ---------- */
.ulist { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.urow { display: grid; grid-template-columns: 32px minmax(180px, 1fr) auto 110px 120px auto; gap: 14px; align-items: center; width: 100%; padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; color: var(--tx); }
.urow:last-child { border-bottom: 0; }
.urow:hover { background: var(--surface-2); }
.urow.off { opacity: .6; }
.urow-main { display: flex; flex-direction: column; min-width: 0; }
.urow-main b { font-weight: 600; }
.urow-main span { color: var(--tx-3); font-size: 12px; }
.urow-n { color: var(--tx-2); font-size: 12px; }

/* ---------- шапка проекта и вкладки ---------- */
.phead { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 14px 24px 0; }
.phead-t { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.phead-t h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.phead-members { display: inline-flex; margin-left: auto; }
.phead-members .av { margin-left: -6px; border: 2px solid var(--bg); }
.ptabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; color: var(--tx-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; border-radius: var(--r-1) var(--r-1) 0 0; }
.ptab:hover { color: var(--tx); background: var(--surface-2); text-decoration: none; }
.ptab.on { color: var(--tx); border-bottom-color: var(--acc); }
.ptab svg { color: var(--tx-3); width: 15px; height: 15px; }
.ptab.on svg { color: var(--acc); }
.ptab .n { font-style: normal; font-size: 11px; font-weight: 600; color: var(--tx-3); background: var(--surface-3); border-radius: 9px; padding: 1px 5px; }
.ptab .n.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.pbody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pbody > .page { padding-top: 18px; }

/* ---------- доска ---------- */
.board-bar { padding: 12px 24px 0; margin-bottom: 0; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-2); background: var(--surface-3); gap: 2px; }
.seg-b { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 4px; font-weight: 500; color: var(--tx-2); font-size: 12.5px; }
.seg-b i { font-style: normal; color: var(--tx-3); font-size: 11px; }
.seg-b.on { background: var(--surface); color: var(--tx); box-shadow: var(--shadow-1); }
.dot-on { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.board { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 12px 24px 16px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; }
.col { width: 284px; flex: none; max-height: 100%; display: flex; flex-direction: column; border-radius: var(--r-3); background: var(--side); border: 1px solid transparent; transition: border-color .12s, background .12s; }
.col.drop { border-color: var(--acc); background: var(--acc-soft); }
.col.collapsed .col-b, .col.collapsed .col-h .ib, .col.collapsed .col-h .sp { display: none; }
.col.collapsed .col-fold { writing-mode: vertical-rl; transform: rotate(180deg); height: auto; padding: 8px 0; gap: 8px; }
.col.collapsed .col-fold .sti, .col.collapsed .col-fold .col-dot { transform: rotate(180deg); }
.col-h { display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 6px 0 4px; flex: none; }
.col-fold:hover { background: var(--surface-3); }
.col-fold .col-dot { width: 10px; height: 10px; background: var(--cc); }
.col-h .ib { width: 26px; height: 26px; color: var(--tx-3); flex: none; }
.col-h .ib:hover { background: var(--surface-3); color: var(--tx); }
.col-b { flex: 1; min-height: 40px; overflow-y: auto; padding: 0 6px 6px; display: flex; flex-direction: column; gap: 6px; }
.col-empty { padding: 18px 12px; text-align: center; color: var(--tx-3); font-size: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-2); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px 8px; border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; user-select: none; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card:focus-visible { outline: 2px solid var(--acc); outline-offset: 0; }
.card.drag { opacity: .5; transform: rotate(1deg); }
.card.blocked { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.card-top { display: flex; align-items: center; gap: 6px; }
.card-t { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--tx); word-break: break-word; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-f { display: flex; align-items: center; gap: 8px; min-height: 18px; }

/* ---------- панель задачи ---------- */
#panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--panel-w), 100vw); z-index: 300; pointer-events: none; }
.panel { height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); transform: translateX(24px); opacity: 0; transition: transform .2s var(--ease), opacity .16s; pointer-events: auto; }
#panel.on .panel { transform: none; opacity: 1; }
.panel-h { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.panel-parent { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-parent:hover { color: var(--tx); text-decoration: none; }
.panel-b { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 24px; }
.panel-b.dropping { box-shadow: inset 0 0 0 2px var(--acc); }
.panel-title { width: 100%; border: 0; background: transparent; resize: none; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; padding: 4px 6px; margin: -4px -6px 8px; border-radius: var(--r-1); outline: 0; overflow: hidden; }
.panel-title:hover { background: var(--surface-2); }
.panel-title:focus { background: var(--surface-2); box-shadow: 0 0 0 2px var(--acc); }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 4px 0 18px; }
.prop { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.prop-l { width: 84px; flex: none; color: var(--tx-3); font-size: 12px; }
.prop-v { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px; margin-left: -6px; border-radius: var(--r-1); color: var(--tx); font-weight: 500; max-width: 100%; min-width: 0; position: relative; cursor: pointer; }
.prop-v:hover { background: var(--surface-2); }
.prop-v > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-v.danger { color: var(--danger); }
.prop-v.warn { color: var(--warn); }
.prop-v input[type="date"] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.prop-v svg { color: var(--tx-3); }
.prop-in { height: 26px; padding: 0 6px; margin-left: -6px; border: 1px solid transparent; border-radius: var(--r-1); background: transparent; width: 100%; min-width: 0; font-weight: 500; }
.prop-in::placeholder { color: var(--tx-3); font-weight: 400; }
.prop-in:hover { background: var(--surface-2); }
.prop-in:focus { outline: 0; background: var(--surface-2); border-color: var(--acc); }
.prop .switch span { color: var(--tx-2); }
.sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sec-h h3 { font-size: 13px; font-weight: 600; flex: 1; display: flex; align-items: center; }
.sec-acts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.desc-in { min-height: 72px; }
.desc { font-size: 13.5px; line-height: 1.55; white-space: normal; word-break: break-word; padding: 2px 0; }
.desc a { word-break: break-all; }
.subs { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.sub { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 6px; border-radius: var(--r-1); }
.sub:hover { background: var(--surface-2); }
.sub.done .sub-t { color: var(--tx-3); text-decoration: line-through; }
.sub-t { flex: 1; text-align: left; padding: 4px 0; color: var(--tx); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-c { position: relative; display: inline-flex; width: 16px; height: 16px; flex: none; cursor: pointer; }
.chk-c input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chk-c i { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: transparent; background: var(--surface); transition: background .12s, border-color .12s; }
.chk-c i svg { width: 11px; height: 11px; stroke-width: 3; }
.chk-c input:checked + i { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk-c input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 1px; }
.sub-add { display: flex; align-items: center; gap: 4px; }
.sub-add .in { border-color: transparent; background: transparent; padding-left: 6px; }
.sub-add .in:hover { background: var(--surface-2); }
.sub-add .in:focus { background: var(--surface); border-color: var(--acc); }
.files { display: flex; flex-direction: column; gap: 4px; }
.file { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--r-2); }
.file:hover { background: var(--surface-2); }
.file-ic { width: 36px; height: 36px; flex: none; border-radius: var(--r-1); background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--tx-2); overflow: hidden; }
.file-ic img { width: 100%; height: 100%; object-fit: cover; }
.file-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-n { text-align: left; font-weight: 500; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-n:hover { color: var(--acc); }
.file-b .muted { font-size: 11.5px; }
.upl { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.upl-row { position: relative; height: 22px; padding: 0 8px; font-size: 12px; line-height: 22px; color: var(--tx-2); background: var(--surface-2); border-radius: var(--r-1); overflow: hidden; }
.upl-row i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--acc); }
.cmts { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.cmt { display: flex; gap: 10px; }
.cmt-b { flex: 1; min-width: 0; }
.cmt-h { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.cmt-h b { font-weight: 600; }
.cmt-h time { color: var(--tx-3); font-size: 11.5px; }
.cmt-h .muted { font-size: 11.5px; }
.cmt-h .ib { opacity: 0; }
.cmt:hover .cmt-h .ib, .cmt-h .ib:focus-visible { opacity: 1; }
.cmt-t { font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.cmt-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 9px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface-2); color: var(--tx); font-size: 12.5px; max-width: 100%; }
.cmt-file:hover { border-color: var(--line-2); text-decoration: none; }
.cmt-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmt-file em { font-style: normal; color: var(--tx-3); }
.cmt-new { display: flex; gap: 10px; }
.cmt-new-b { flex: 1; min-width: 0; border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.cmt-new-b:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.cmt-new-b .in { border: 0; background: transparent; box-shadow: none; min-height: 36px; }
.cmt-new-b .in:focus { box-shadow: none; }
.cmt-new-f { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px 6px; }
.cmt-att { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tx-2); min-width: 0; overflow: hidden; }
.panel-f { margin-top: 20px; font-size: 11.5px; }

/* ---------- новая задача ---------- */
.dlg-nt { max-width: 640px; }
.nt { padding: 12px 16px 12px; }
.nt-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nt-title { width: 100%; border: 0; background: transparent; resize: none; font-size: 17px; font-weight: 600; line-height: 1.35; outline: 0; padding: 4px 0; overflow: hidden; }
.nt-desc { width: 100%; border: 0; background: transparent; resize: none; font-size: 13.5px; line-height: 1.5; outline: 0; padding: 2px 0 8px; min-height: 64px; }
.nt-title::placeholder, .nt-desc::placeholder { color: var(--tx-3); }
.nt-props { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 10px; border-top: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); color: var(--tx); font-size: 12.5px; font-weight: 500; position: relative; cursor: pointer; }
.pill:hover { background: var(--surface-2); }
.pill svg { color: var(--tx-3); }
.pill-date input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.pill-in { min-width: 180px; cursor: text; }
.pill-in:focus { outline: 0; border-color: var(--acc); }
.nt-f { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- просмотр файлов ---------- */
.vw { position: fixed; inset: 0; z-index: 800; background: rgba(8, 8, 12, .9); display: flex; flex-direction: column; }
.vw-bar { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px 0 16px; color: #fff; }
.vw-bar .ib { color: #fff; }
.vw-bar .ib:hover { background: rgba(255, 255, 255, .12); }
.vw-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 60px 24px; }
.vw-body img, .vw-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-2); }
.vw-body iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: var(--r-2); }
.vw-card { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.vw-card svg { width: 32px; height: 32px; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, .1); }
.vw-nav:hover { background: rgba(255, 255, 255, .2); }
.vw-nav.prev { left: 12px; }
.vw-nav.next { right: 12px; }
.vw-nav.next svg { transform: scaleX(-1); }

/* ---------- календарь ---------- */
.cal-t { font-size: 14px; font-weight: 600; min-width: 130px; text-align: center; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-3); font-size: 12px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; margin-left: 8px; }
.legend i:first-child { margin-left: 0; }
.k-task { background: var(--acc); } .k-late { background: var(--danger); } .k-done { background: var(--ok); } .k-ms, .k-msdone { background: var(--violet); }
.cal { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.cal-h { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-h span { padding: 6px 8px; font-size: 11.5px; font-weight: 600; color: var(--tx-3); }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-d { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: var(--surface-2); color: var(--tx-3); }
.cal-d.we .cal-num { color: var(--tx-3); }
.cal-num { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.cal-d.now .cal-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--acc); color: var(--on-acc); }
.cal-e { display: block; width: 100%; text-align: left; font-size: 11px; line-height: 1.3; padding: 2px 5px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface-3); color: var(--tx); }
.cal-e.k-task { background: var(--acc-soft); color: var(--acc); }
.cal-e.k-late { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.cal-e.k-done { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.cal-e.k-ms, .cal-e.k-msdone { background: color-mix(in srgb, var(--violet) 12%, transparent); color: var(--violet); }
.cal-e:hover { filter: brightness(.96); }
.cal-more { font-size: 11px; color: var(--tx-3); padding-left: 5px; }

/* ---------- этапы, история, знания, риски, релизы, решения, корзина ---------- */
.ms-list { display: flex; flex-direction: column; gap: 4px; }
.ms { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--tx); }
.ms:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.ms-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.ms-active .ms-dot { background: var(--st-progress); } .ms-done .ms-dot { background: var(--ok); } .ms.late .ms-dot { background: var(--danger); }
.ms-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-main b { font-weight: 600; }
.ms-main span { color: var(--tx-3); font-size: 12px; }
.ms-dates { color: var(--tx-2); font-size: 12px; white-space: nowrap; }
.hist { display: flex; flex-direction: column; margin-bottom: 14px; }
.h-day { font-size: 12px; font-weight: 600; color: var(--tx-3); padding: 16px 0 6px; }
.h-day:first-child { padding-top: 0; }
.h-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.h-row time { width: 38px; flex: none; color: var(--tx-3); font-size: 12px; padding-top: 2px; }
.h-ic { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--tx-2); flex: none; }
.h-ic svg { width: 12px; height: 12px; }
.h-ic.k-done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.h-ic.k-started { background: color-mix(in srgb, var(--st-progress) 18%, transparent); color: color-mix(in srgb, var(--st-progress) 70%, var(--tx)); }
.h-ic.k-review { background: var(--acc-soft); color: var(--acc); }
.h-ic.k-release, .h-ic.k-milestone { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.h-b { flex: 1; min-width: 0; }
.h-l { color: var(--tx-2); font-size: 12px; margin-right: 6px; }
.h-t { color: var(--tx); font-weight: 500; }
.h-x { margin-top: 3px; color: var(--tx-2); font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.kb { display: flex; flex-direction: column; gap: 6px; }
.kb-it { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); }
.kb-ic { width: 28px; height: 28px; border-radius: var(--r-1); background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--tx-2); flex: none; }
.kb-b { flex: 1; min-width: 0; }
.kb-t { font-weight: 600; color: var(--tx); }
.kb-u { display: block; color: var(--tx-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-n { margin-top: 4px; color: var(--tx-2); line-height: 1.5; }
.risks { display: flex; flex-direction: column; gap: 4px; }
.risk { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); color: var(--tx); }
.risk:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-1); }
.risk-ic { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-3); color: var(--tx-2); }
.risk-ic.k-overdue, .risk-ic.k-stuck { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.risk-ic.k-blocked { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.risk-ic.k-review { background: var(--acc-soft); color: var(--acc); }
.risk-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.risk-b b { font-weight: 500; }
.risk-b span { color: var(--tx-3); font-size: 12px; }
.risk-w { color: var(--tx-2); font-size: 12px; white-space: nowrap; }
.rel-list, .dec-list { display: flex; flex-direction: column; gap: 10px; }
.rel, .dec { padding: 12px 14px; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--surface); }
.rel header, .dec header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rel header time, .dec header time { color: var(--tx-3); font-size: 12px; white-space: nowrap; }
.rel h3, .dec h3 { font-size: 14px; font-weight: 600; flex: 1; }
.rel p, .dec p { color: var(--tx-2); line-height: 1.5; margin-bottom: 8px; }
.rel-tasks { margin: 0 0 8px; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.rel-tasks a { color: var(--tx); }
.rel-tasks .gone { color: var(--tx-3); text-decoration: line-through; }
.rel footer, .dec footer { font-size: 12px; }
.del-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.del { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); }
.del-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.del-b span { font-size: 12px; color: var(--tx-2); }
.del-b .muted { font-size: 11.5px; }

/* ---------- настройки ---------- */
.set { margin-bottom: 28px; }
.set h2 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; }
.set > p.muted { margin-bottom: 10px; line-height: 1.5; }
.set-acts { display: flex; gap: 8px; margin-top: 8px; }
.mem-list, .board-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); padding: 4px; }
.mem { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-1); min-height: 40px; }
.mem:hover { background: var(--surface-2); }
.mem-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mem-n b { font-weight: 500; }
.mem-n span { font-size: 12px; color: var(--tx-3); }
.danger-zone h2 { color: var(--danger); }

/* ---------- аналитика ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { padding: 10px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.stat span { color: var(--tx-3); font-size: 12px; }
.stat.danger b { color: var(--danger); } .stat.warn b { color: var(--warn); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.dc { padding: 12px 14px 14px; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.dc h3 { font-size: 12.5px; font-weight: 600; color: var(--tx-2); margin-bottom: 10px; }
.donut-row { display: flex; align-items: center; gap: 18px; }
.donut { width: 120px; height: 120px; flex: none; }
.legend-v { display: flex; flex-direction: column; gap: 4px; }
.legend-v span { display: flex; align-items: center; gap: 8px; color: var(--tx-2); }
.legend-v i { width: 9px; height: 9px; border-radius: 2px; }
.legend-v b { margin-left: auto; font-weight: 600; color: var(--tx); }
.legend-h { display: flex; gap: 14px; margin-top: 6px; color: var(--tx-3); font-size: 12px; }
.legend-h span { display: inline-flex; align-items: center; gap: 6px; }
.legend-h i { width: 14px; height: 2px; background: var(--tx-3); }
.legend-h .l-scope { background: var(--tx-2); } .legend-h .l-done { background: var(--acc); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .cgrid { stroke: var(--line); stroke-width: 1; }
.chart .axl, .chart .bx { font-size: 9.5px; fill: var(--tx-3); }
.chart .bar { fill: color-mix(in srgb, var(--acc) 60%, var(--surface)); }
.chart .bar.cur { fill: var(--acc); }
.chart .bar.zero { fill: var(--line); }
.chart .bu-area { fill: color-mix(in srgb, var(--acc) 14%, transparent); }
.chart .bu-scope { fill: none; stroke: var(--tx-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .bu-done { fill: none; stroke: var(--acc); stroke-width: 2; }
.spark { width: 90px; height: 24px; }
.heat { width: auto; height: 118px; max-width: 100%; }
.hb { display: flex; flex-direction: column; gap: 6px; }
.hb-r { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 36px; align-items: center; gap: 10px; font-size: 12.5px; }
.hb-l { color: var(--tx-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 3px; }
.hb-v { text-align: right; font-weight: 600; }
.mini-list { display: flex; flex-direction: column; }
.mini-list a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; margin: 0 -6px; border-radius: var(--r-1); color: var(--tx); }
.mini-list a:hover { background: var(--surface-2); text-decoration: none; }
.mini-list a > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list em { font-style: normal; color: var(--tx-3); font-size: 12px; white-space: nowrap; }
.cycle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.cycle div { display: flex; flex-direction: column; }
.cycle b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.cycle span { color: var(--tx-2); font-size: 12px; }
.cycle em { font-style: normal; color: var(--tx-3); font-size: 11px; }
.ov-table { display: flex; flex-direction: column; }
.ov-h, .ov-r { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 70px 90px 60px 80px 100px; gap: 12px; align-items: center; padding: 6px 6px; }
.ov-h { font-size: 11.5px; font-weight: 600; color: var(--tx-3); border-bottom: 1px solid var(--line); }
.ov-r { color: var(--tx); border-radius: var(--r-1); }
.ov-r:hover { background: var(--surface-2); text-decoration: none; }
.ov-r > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-tip] { cursor: default; }
#tip { position: fixed; z-index: 950; pointer-events: none; padding: 5px 8px; font-size: 12px; border-radius: var(--r-1); background: var(--tx); color: var(--bg); box-shadow: var(--shadow-2); white-space: nowrap; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) { .props { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  :root { --panel-w: 100vw; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 400; transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: none; }
  body.side-open .side { transform: none; box-shadow: var(--shadow-3); }
  .side-close { display: inline-flex; }
  .side-bg { display: block; position: fixed; inset: 0; z-index: 390; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.side-open .side-bg { opacity: 1; pointer-events: auto; }
  .top-menu { display: inline-flex; }
  .page { padding: 16px 16px 40px; }
  .phead, .board-bar { padding-left: 16px; padding-right: 16px; }
  .board { padding: 12px 16px 16px; }
  .col { width: 260px; }
  .plist-h { display: none; }
  .prow { grid-template-columns: 40px 1fr; grid-template-rows: auto auto; }
  .prow-bar, .prow-n, .prow-act { display: none; }
  .prow-meta { grid-column: 2; }
  .urow { grid-template-columns: 32px 1fr auto; }
  .urow-n, .urow-st { display: none; }
  .ov-h, .ov-r { grid-template-columns: 1fr 70px 60px; }
  .ov-h > :nth-child(n+4), .ov-r > :nth-child(n+4) { display: none; }
  .cal-d { min-height: 64px; }
  .cal-e { display: none; }
  .cal-d .cal-e:first-of-type { display: block; }
  .fld-row { flex-direction: column; gap: 0; }
  .fld.w-key { width: 100%; }
  .in-search .in { width: 160px; }
  .trow-p { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }


/* ---------- план работ ---------- */
.plan .sec-h h3 svg { width: 15px; height: 15px; color: var(--tx-3); margin-right: 6px; }
.plan-by { font-size: 11.5px; color: var(--tx-3); white-space: nowrap; }
.plan-empty { color: var(--tx-3); line-height: 1.5; font-size: 12.5px; margin-bottom: 6px; }
.steps { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 1px; counter-reset: step; }
.step { display: flex; align-items: flex-start; gap: 8px; padding: 5px 6px; border-radius: var(--r-1); }
.step:hover { background: var(--surface-2); }
.step-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; margin-top: 1px; border: 1.5px solid var(--line-2); border-radius: 5px; color: transparent; background: var(--surface); transition: background .12s, border-color .12s, color .12s; }
.step-mark svg { width: 11px; height: 11px; stroke-width: 3; }
.step-n { font: 500 11px/1.6 var(--mono); color: var(--tx-3); flex: none; width: 14px; text-align: right; }
.step-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.step-t { line-height: 1.45; word-break: break-word; }
.step-note { font-size: 12px; color: var(--tx-2); line-height: 1.45; padding-left: 0; border-left: 2px solid var(--line); padding-left: 8px; }
.step-x { opacity: 0; flex: none; }
.step:hover .step-x, .step-x:focus-visible { opacity: 1; }
.step.st-doing .step-mark { border-color: var(--st-progress); color: var(--st-progress); background: color-mix(in srgb, var(--st-progress) 14%, transparent); }
.step.st-doing .step-t { font-weight: 500; }
.step.st-done .step-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.st-done .step-t { color: var(--tx-2); }
.step.st-skipped .step-mark { border-color: var(--line-2); color: var(--tx-3); }
.step.st-skipped .step-t { color: var(--tx-3); text-decoration: line-through; }
.step-add { display: flex; align-items: center; gap: 4px; }
.step-add .in { border-color: transparent; background: transparent; padding-left: 6px; }
.step-add .in:hover { background: var(--surface-2); }
.step-add .in:focus { background: var(--surface); border-color: var(--acc); }

/* ---------- лента: обсуждение и события ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.feed .cmt { margin: 2px 0; }
.ev { display: flex; align-items: center; gap: 8px; color: var(--tx-2); font-size: 12.5px; min-height: 22px; }
.ev-ic { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--tx-3); }
.ev-ic svg { width: 12px; height: 12px; }
.ev-ic.bot { background: var(--acc-soft); color: var(--acc); }
.ev-t { flex: 1; min-width: 0; }
.ev-t b { font-weight: 600; color: var(--tx-2); }
.ev time { color: var(--tx-3); font-size: 11.5px; white-space: nowrap; }
.av-bot { background: var(--acc-soft); color: var(--acc); }
.av-bot svg { width: 68%; height: 68%; }

/* ---------- доски ---------- */
.seg.boards .seg-b.add { padding: 0 6px; color: var(--tx-3); }
.seg.boards .seg-b.add:hover { color: var(--tx); background: var(--surface); }
.seg.boards .seg-b.add svg { width: 14px; height: 14px; }

/* ---------- форма новой задачи: дополнения ---------- */
.nt-cmt { width: 100%; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); resize: none; font-size: 13px; line-height: 1.5; outline: 0; padding: 7px 10px; min-height: 44px; margin-bottom: 8px; }
.nt-cmt:focus { border-color: var(--acc); background: var(--surface); }
.nt-cmt::placeholder { color: var(--tx-3); }
.nt-files { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; }
.nt-flist { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.nt-file { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 9px; border-radius: var(--r-2); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; }
.nt-file em { font-style: normal; color: var(--tx-3); }
/* «Оценка, ч» — подпись плюс узкое поле внутри пилюли */
label.pill-in { display: inline-flex; align-items: center; gap: 6px; }
label.pill-in .pill-l { color: var(--tx-3); white-space: nowrap; }
label.pill-in input { border: 0; background: transparent; outline: 0; width: 46px; padding: 0; font: inherit; color: inherit; }
/* «Этап» и «Метки» — самостоятельные поля-пилюли: держим ширину, иначе рвут ряд */
input.pill-in { flex: 0 0 auto; width: 150px; cursor: text; }
input.pill-in.wide { width: 190px; }
input.pill-in::placeholder { color: var(--tx-3); }


/* ---------- панель фильтров ---------- */
.filter-pop { width: 340px; max-width: calc(100vw - 16px); padding: 8px; max-height: 70vh; overflow: auto; }
.fgroup { padding: 4px 2px 8px; }
.fg-h { font-size: 11.5px; font-weight: 600; color: var(--tx-3); margin-bottom: 6px; }
.fg-b { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface); color: var(--tx-2); font-size: 12.5px; max-width: 100%; }
.fchip:hover { background: var(--surface-2); color: var(--tx); }
.fchip.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.fchip.on .av { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.fchip .av, .fchip .pri { flex: none; }
.fchip.on .pri rect { fill: rgba(255, 255, 255, .45); }
.fchip.on .pri rect.on { fill: #fff; }
.filter-f { border-top: 1px solid var(--line); padding-top: 6px; display: flex; justify-content: flex-end; }

/* ---------- доски в боковом меню ---------- */
.nav-boards { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-board { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: var(--r-2); color: var(--tx-2); font-size: 12.5px; text-align: left; }
.nav-board:hover { background: var(--surface-3); color: var(--tx); }
.nav-board.on { background: var(--surface); color: var(--tx); font-weight: 500; box-shadow: var(--shadow-1); }
.nav-board i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--tx-3); }
.nav-board.add { color: var(--tx-3); }
.nav-board.add svg { width: 13px; height: 13px; }

/* ---------- план только для чтения ---------- */
.steps.ro .step { padding-left: 6px; }
.steps.ro .step:hover { background: transparent; }
.steps.ro .step-mark { cursor: default; }

/* ---------- история задачи ---------- */
.hist-task { display: flex; flex-direction: column; gap: 6px; }
.hist-task .ev { min-height: 20px; }


/* ---------- перетаскивание колонок ---------- */
.col-h { cursor: grab; user-select: none; }
.col-h:active { cursor: grabbing; }
.col-h .col-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-grip { display: inline-flex; color: var(--tx-3); opacity: 0; transition: opacity .12s; flex: none; margin-left: -2px; }
.col-grip svg { width: 14px; height: 14px; }
.col:hover .col-grip { opacity: 1; }
.col.col-drag { opacity: .5; }
.col.col-over { outline: 2px dashed var(--acc); outline-offset: -2px; }

/* ---------- миниатюры вложений ---------- */
.thumb { margin: 0; display: block; width: 132px; flex: none; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--surface-2); cursor: zoom-in; transition: border-color .12s, box-shadow .12s; }
.thumb:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.thumb:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.thumb img { display: block; width: 100%; height: 88px; object-fit: cover; background: var(--surface-3); }
.thumb figcaption { display: block; padding: 4px 6px; font-size: 11px; color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb.in-cmt { margin-top: 6px; width: 168px; }
.thumb.in-cmt img { height: 110px; }
.file-img { align-items: flex-start; }
.file-img .file-b { padding-top: 4px; }

/* ---------- сворачиваемая история ---------- */
.sec-toggle { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin-bottom: 0; padding: 2px 0; }
.sec-toggle h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; }
.sec-chev { display: inline-flex; color: var(--tx-3); transition: transform .15s var(--ease); }
.hist-sec.open .sec-chev { transform: rotate(180deg); }
.hist-sec .hist-task { margin-top: 10px; }

/* миниатюры в форме создания задачи */
.nt-thumb { position: relative; width: 112px; }
.nt-thumb img { height: 74px; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(10, 10, 14, .62); color: #fff; opacity: 0; transition: opacity .12s; }
.thumb-x svg { width: 12px; height: 12px; }
.nt-thumb:hover .thumb-x, .thumb-x:focus-visible { opacity: 1; }
.nt-flist { align-items: flex-start; }
.nt-file svg { width: 13px; height: 13px; color: var(--tx-3); }

/* ---------- приёмка на карточке ---------- */
.card-acc { display: flex; gap: 6px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.card-acc .btn { flex: 1; justify-content: center; height: 26px; }
.card:hover .card-acc { border-top-color: var(--line-2); }
.col-h .btn.btn-sm { height: 24px; padding: 0 8px; font-size: 12px; margin-right: 2px; }
.mono-sm { font-family: var(--mono); font-size: 12px; line-height: 1.5; }

/* ---------- приёмка внутри карточки и предложение шаблона ---------- */
.panel-acc { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px; border-radius: var(--r-2); background: var(--acc-soft); color: var(--acc); font-weight: 500; }
.panel-acc > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.tpl-btn { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 8px; padding: 4px 8px; border-radius: var(--r-1); color: var(--tx-2); font-size: 12.5px; background: var(--surface-2); }
.tpl-btn:hover { color: var(--tx); background: var(--surface-3); }
.tpl-btn svg { width: 14px; height: 14px; color: var(--tx-3); }
