/* Таск менеджер — дизайн v4 «Светлый» (ориентир Notion/Linear light), см. design/DESIGN.md
   Белый фон, тёплые нейтральные, тонкие линии вместо серых плашек, мягкие скругления,
   один спокойный синий акцент. Тени — только у карточек доски и всплывающего. */
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-cyrillic-400.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-cyrillic-500.woff2) format("woff2");font-weight:500;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-cyrillic-600.woff2) format("woff2");font-weight:600;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-cyrillic-700.woff2) format("woff2");font-weight:700;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-latin-400.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-latin-500.woff2) format("woff2");font-weight:500;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-latin-600.woff2) format("woff2");font-weight:600;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter-latin-700.woff2) format("woff2");font-weight:700;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{
  --bg:#ffffff; --side-bg:#fbfbfa; --soft:#f7f7f5; --field:#f4f4f2;
  --hover:rgba(55,53,47,.06); --sel:rgba(55,53,47,.08); --row-hover:#fafaf9;
  --text:#2b2a27; --text-h:#1d1c1a; --text-2:#66655f; --text-3:#8f8d88;
  --line:#ececea; --line-2:#e1e0dd; --line-3:#cfcdc8;
  --blue:#2383e2; --blue-hover:#1b6fc2; --blue-active:#155ba3; --blue-70:#1b6fc2; --blue-10:#eef5fd; --blue-20:#dbeafb; --blue-30:#a9cdf4;
  --red:#d44c47; --red-70:#a63a35; --red-10:#fdebec;
  --green:#448361; --green-60:#3b7356; --green-10:#edf3ec;
  --yellow:#cb912f; --yellow-70:#9a6512; --yellow-10:#fbf3db; --orange:#c76a12;
  --teal:#2b8a8a; --purple:#9065b0;
  /* aliases used by inline styles in views */
  --ink:var(--text); --ink-2:#44423e; --ink-3:var(--text-2); --ink-4:var(--text-3);
  --b-subtle:var(--line); --b-mid:var(--line-3); --b-strong:var(--text-3);
  --layer:var(--soft); --layer-hover:var(--hover); --layer-accent:#ebeae7; --layer-sel:var(--sel); --icon-3:var(--text-3);
  --stamp:var(--blue); --stamp-2:var(--blue-70); --stamp-wash:var(--blue-10); --stamp-line:var(--blue-30);
  --paper:var(--soft); --surface:var(--bg); --raise:var(--bg);
  --amber:var(--yellow-70); --amber-w:var(--yellow-10); --red-w:var(--red-10); --green-w:var(--green-10); --blue-w:var(--blue-10);
  --sh-card:rgba(15,15,15,.04) 0 1px 2px,rgba(15,15,15,.03) 0 2px 6px;
  --sh-pop:rgba(15,15,15,.05) 0 0 0 1px,rgba(15,15,15,.08) 0 3px 6px,rgba(15,15,15,.14) 0 9px 24px;
  --sh-float:rgba(15,15,15,.04) 0 0 0 1px,rgba(15,15,15,.06) 0 4px 12px,rgba(15,15,15,.12) 0 20px 48px;
  --ring:0 0 0 3px rgba(35,131,226,.2);
  --ease:cubic-bezier(.2,.8,.2,1);
  --side:248px; --head:56px; --r-sm:6px; --r:8px; --r-lg:12px;
}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#d3d1cb transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:400 15px/1.5 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;font-feature-settings:"cv11","ss01"}
a{color:var(--blue);text-decoration:none}
a:hover{color:var(--blue-hover)}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3,h4{margin:0;color:var(--text-h);line-height:1.25}
h1{font-size:28px;font-weight:600;letter-spacing:-.5px} h2{font-size:19px;font-weight:600;letter-spacing:-.25px} h3{font-size:16px;font-weight:600} h4{font-size:15px;font-weight:600}
p{margin:0}
.num,.tno{font-variant-numeric:tabular-nums}
.muted{color:var(--text-2)} .ink2{color:#44423e}
.small{font-size:14px} .xs{font-size:13px}
.i{width:16px;height:16px;flex:none;vertical-align:-3px}
.i.sm{width:15px;height:15px}
.i.lg{width:20px;height:20px}
[x-cloak]{display:none!important}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ---------- shell ---------- */
.shell{display:grid;grid-template-columns:var(--side) minmax(0,1fr);min-height:100vh}
/* R-33 (ТЗ §35) side menu: .side-box = the column on a computer / the modal drawer up to 1056 px; .side = its ONE scroll
   container (dvh: the visible height, also under a phone's browser bars). The brand row sticks to the top, the
   «Администрирование / Профиль / Выйти» block to the bottom while the screen is tall enough (≤ 440 px: it scrolls with the
   rest, so nothing is ever cut off); the middle (menu + notices) scrolls between them, never the page behind. */
.side-box{position:sticky;top:0;height:100vh;height:100dvh}
.side{display:flex;flex-direction:column;height:100%;background:#fff;border-right:1px solid var(--line);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.side-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:2px;flex:none;height:var(--head);padding-right:6px;background:#fff}
.side-hide{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:var(--r-sm);background:none;color:var(--text-2);cursor:pointer}
.side-hide:hover{background:var(--hover);color:var(--text-h)}
.side-x,.side-scrim{display:none}
.brand{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;height:100%;padding:0 4px 0 16px;color:var(--text-h);font-weight:600;font-size:15px;line-height:1.2;white-space:nowrap}
.brand-t{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}
.brand-logo{display:block;width:32px;height:32px;flex:none;object-fit:contain} /* R-32: the client's logo (96 px file, 3×) */
.brand:hover{color:var(--text-h)}
.brand-mark{width:26px;height:26px;flex:none;border-radius:7px;background:var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/22px no-repeat}
.brand-mark .i{display:none}
.brand small{display:block;font-weight:400;font-size:12.5px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis}
.nav{padding:4px 8px 0}
.nav-label{padding:18px 10px 6px;font-size:12.5px;font-weight:500;color:var(--text-3)}
.nav a{display:flex;align-items:center;gap:10px;min-height:36px;margin:1px 0;padding:0 10px;border-radius:var(--r-sm);color:#4a4843;font-weight:500;font-size:15px}
.nav a .i{width:18px;height:18px;color:var(--text-3)}
.nav a:hover{background:var(--hover);color:var(--text-h)}
.nav a.on{background:rgba(55,53,47,.055);color:var(--text-h);font-weight:600}
.nav a.on .i{color:var(--text-h)}
.nav a .cnt{margin-left:auto;font-size:13px;font-weight:500;color:var(--text-3);font-variant-numeric:tabular-nums}
.nav a .cnt.hot{color:var(--blue);font-weight:600}
.side-foot{position:sticky;bottom:0;z-index:2;margin-top:auto;padding:8px 8px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}
@media (max-height:440px){.side-foot{position:static}}
/* R-33 review: more menu under the pinned bottom block — a soft edge says «scroll» (class .more set by sideNav) */
@media (min-height:441px){.side.more .side-foot{box-shadow:0 -10px 12px -12px rgba(15,15,15,.35)}}
/* R-33: hidden on a computer (html.side-off, set before the first paint): the page takes the whole width, the «три полоски»
   button of the top bar shows the menu again; live popups sit right of the menu, never over «Профиль / Выйти» */
html.side-lock,html.side-lock body{overflow:hidden} /* R-33: the open drawer (phones): the page under it does not scroll */
@media (min-width:1057px){
  html.side-off .shell{grid-template-columns:minmax(0,1fr)}
  html.side-off .side-box{display:none}
  html.side-off .burger{display:inline-flex}
  html:not(.side-off) .npops{left:calc(var(--side) + 20px)}
}
.main{min-width:0;display:flex;flex-direction:column}
.top{position:sticky;top:0;z-index:20;height:var(--head);display:flex;align-items:center;gap:8px;padding:0 24px;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.6) blur(10px);border-bottom:1px solid var(--line)}
.top>a{display:grid;place-items:center;margin-left:4px}
.search{position:relative;flex:0 1 360px;min-width:0}
.search input{width:100%;height:36px;padding:0 12px 0 36px;border:1px solid var(--line-2);border-radius:var(--r);background:#fff;color:var(--text);transition:background .15s,border-color .15s,box-shadow .15s}
.search input::placeholder{color:var(--text-3)}
.search input:hover{border-color:var(--line-3)}
.search input:focus{outline:none;background:#fff;border-color:var(--blue);box-shadow:var(--ring)}
.search .i{position:absolute;left:11px;top:10px;color:var(--text-3)}
.search kbd{display:none}
kbd{font:500 12px/18px "Inter",sans-serif;padding:0 5px;border:1px solid var(--line-2);border-radius:4px;color:var(--text-2)}
.top-sp{flex:1}
.page{padding:0 40px 72px;max-width:1400px;width:100%;margin:0 auto}
.page-head{display:flex;align-items:center;gap:12px 16px;margin:32px 0 20px;flex-wrap:wrap}
.page-head h1{margin-right:auto}

/* ---------- buttons ---------- */
.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 14px;border-radius:var(--r-sm);border:1px solid var(--line-2);background:#fff;color:var(--text);font-weight:500;font-size:14.5px;cursor:pointer;white-space:nowrap;transition:background .12s,border-color .12s,color .12s,box-shadow .12s}
.btn:hover{background:var(--soft);border-color:var(--line-3);color:var(--text-h)}
.btn:active{background:#efeeeb}
.btn[disabled],.btn.busy{opacity:.45;pointer-events:none}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 1px 2px rgba(35,131,226,.25)}
.btn.primary:hover{background:var(--blue-hover);border-color:var(--blue-hover);color:#fff}
.btn.primary:active{background:var(--blue-active)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--text-2)}
.btn.ghost:hover{background:var(--hover);color:var(--text-h)}
.btn.danger{background:var(--red);border-color:var(--red);color:#fff}
.btn.danger:hover{background:var(--red-70);border-color:var(--red-70);color:#fff}
.btn.ok{background:var(--green);border-color:var(--green);color:#fff}
.btn.ok:hover{background:var(--green-60);border-color:var(--green-60);color:#fff}
.btn.sm{height:32px;padding:0 11px;gap:6px;font-size:14px}
.btn.xs{height:26px;padding:0 8px;gap:4px;font-size:13px}
.btn.icon{width:36px;padding:0}
.btn.icon.sm{width:32px}
.btn .badge{position:absolute;top:1px;right:-2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--red);color:#fff;font-size:10.5px;line-height:17px;font-weight:600;box-shadow:0 0 0 2px #fff}
.btn.rel{position:relative}
.ai-btn,.btn.tertiary{background:#fff;border-color:var(--blue-30);color:var(--blue-70)}
.ai-btn:hover,.btn.tertiary:hover{background:var(--blue-10);border-color:var(--blue);color:var(--blue-active)}
.ai-mark{display:inline-flex;align-items:center;height:18px;padding:0 5px;border:1px solid var(--blue-30);border-radius:4px;background:var(--blue-10);color:var(--blue-70);font-size:11px;font-weight:600;letter-spacing:.2px;line-height:1;vertical-align:1px;flex:none}

/* ---------- fields ---------- */
label.lbl,.lbl{display:block;font-size:13.5px;font-weight:500;color:var(--text-2);margin:0 0 6px}
.help{font-size:13px;color:var(--text-3);margin-top:5px}
.settings-grid .help{color:var(--text-2)} /* R-32 review: hints of the settings ≥ 4.5:1 on white (--text-3 gives 3.3:1) */
.inp,select.inp,textarea.inp{width:100%;min-height:38px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:#fff;color:var(--text);transition:border-color .12s,box-shadow .12s}
textarea.inp{padding:9px 12px;resize:vertical;line-height:1.5}
select.inp{padding-right:34px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236f6e69' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.inp::placeholder,textarea::placeholder{color:var(--text-3)}
.inp:hover{border-color:var(--line-3)}
.inp:focus{outline:none;border-color:var(--blue);box-shadow:var(--ring)}
.inp.big{font-size:18px;min-height:44px;font-weight:500}
.inp[aria-invalid=true]{border-color:var(--red);box-shadow:0 0 0 3px rgba(212,76,71,.15)}
.field{margin-bottom:20px}
.row{display:flex;gap:12px;align-items:center}
.row.wrap{flex-wrap:wrap}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.check{display:inline-flex;align-items:center;gap:8px;cursor:pointer;user-select:none}
.check input{width:16px;height:16px;accent-color:var(--blue)}
/* segmented switch */
.seg{display:inline-flex;gap:2px;padding:3px;border-radius:var(--r);background:#f1f1ef}
.seg button,.seg a{height:30px;padding:0 12px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--text-2);cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:500}
.seg button:hover,.seg a:hover{color:var(--text-h)}
.seg .on,.seg .on:hover{background:#fff;color:var(--text-h);box-shadow:0 1px 2px rgba(15,15,15,.08),0 0 0 1px rgba(15,15,15,.04)}
.seg .on.red{color:var(--red)} .seg .on.amber{color:var(--orange)}
/* quick filter tabs */
.qtabs{display:flex;align-items:center;flex-wrap:wrap;gap:2px}
.qtab{height:32px;padding:0 12px;border:0;border-radius:var(--r-sm);background:none;color:var(--text-2);font-size:14.5px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.qtab:hover{background:var(--hover);color:var(--text-h)}
.qtab.on{background:var(--sel);color:var(--text-h);font-weight:600}
.qtab .n{min-width:20px;padding:0 6px;line-height:18px;border-radius:9px;text-align:center;font-size:12px;color:#fff;background:var(--blue);font-weight:600}
.qtab .i{width:15px;height:15px}
/* selectable chips inside forms */
.pills{display:flex;flex-wrap:wrap;gap:6px}
.pill{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:#fff;color:var(--text);font-size:14px;cursor:pointer;white-space:nowrap}
.pill:hover{background:var(--soft);border-color:var(--line-3)}
.pill.on,.pill.on:hover{background:var(--blue-10);border-color:var(--blue-30);color:var(--blue-70);font-weight:500}

/* ---------- status, priority, labels ---------- */
.chip{display:inline-flex;align-items:center;gap:7px;font-size:14px;white-space:nowrap;color:var(--text);line-height:1.3}
.chip .dot{width:8px;height:8px;flex:none;border-radius:50%;background:var(--text-3);font-style:normal}
.chip-note{margin-left:-3px;font-size:13px;color:var(--orange)}
.chip-blue .dot{background:var(--blue)}
.chip-green .dot{background:var(--green);border-radius:2px}
.chip-violet .dot{background:transparent;box-shadow:inset 0 0 0 2px var(--blue)}
.chip-amber .dot{width:9px;height:9px;background:var(--yellow);clip-path:polygon(50% 0,100% 100%,0 100%);border-radius:0}
.chip-teal .dot{background:var(--teal);border-radius:1px;transform:rotate(45deg) scale(.85)}
.chip-done{color:var(--text-2)} .chip-done .dot{background:var(--line-3)}
.chip-red .dot{background:var(--red)}
.chip-slate .dot{background:var(--text-3)}
.prio{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;white-space:nowrap}
.prio .i{width:13px;height:13px}
.prio-amber{color:var(--orange)} .prio-red{color:var(--red)} .prio-violet{color:var(--purple)}
.tag{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:4px;font-size:12.5px;font-weight:500;background:#efeeeb;color:#4a4843}
.tag.c-blue{background:#e7f1fa;color:#24507d} .tag.c-green{background:#e9f3ec;color:#2b593f}
.tag.c-amber{background:#fbf1d9;color:#7a5512} .tag.c-red{background:#fbe9e8;color:#8e2a26}
.tag.c-violet{background:#f2edf7;color:#5a3d72} .tag.c-teal{background:#e4f2f2;color:#1f5c5c}
.due{font-size:14px;white-space:nowrap;color:var(--text);font-variant-numeric:tabular-nums}
.due.overdue{color:var(--red);font-weight:600}
.due.overdue .i{color:var(--red)}
.due.soon{color:var(--orange);font-weight:500}
.due.ok{color:var(--green)} .due.late{color:var(--text-2)}
.mention{color:var(--blue);font-weight:500}
.turn{display:block;margin-top:2px;font-size:13px;color:var(--text-2)}
.turn.mine{color:var(--blue);font-weight:600}
.new{color:var(--blue);font-weight:600}

/* ---------- people ---------- */
/* initials avatars get a soft colour of their own (hue from the user id, set inline as --h) */
.ava{display:inline-grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;font-size:12px;font-weight:600;line-height:1;letter-spacing:.2px;color:hsl(var(--h,35) 42% 34%);background:hsl(var(--h,35) 62% 91%);object-fit:cover;text-align:center}
img.ava{background:#ebeae6}
.ava.sm{width:24px;height:24px;font-size:10px}
.ava.lg{width:40px;height:40px;font-size:14px}
.ava.xl{width:72px;height:72px;font-size:24px}
.ava-stack{display:inline-flex}
.ava-stack .ava{box-shadow:0 0 0 2px #fff}
.ava-stack .ava+.ava{margin-left:-6px}
.person{display:inline-flex;align-items:center;gap:8px;min-width:0}
.person b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person span:not(.ava){display:block;font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- sections ---------- */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg)}
.panel-h{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 16px;border-bottom:1px solid var(--line)}
.panel-h h3{margin-right:auto}
.panel-b{padding:16px}
.sec{margin-bottom:40px}
.sec-h{display:flex;align-items:center;gap:12px;min-height:40px;margin-bottom:6px}
.sec-h h2{margin-right:auto}
.sec-h h2 .n{color:var(--text-3);margin-left:8px;font-weight:500}
.empty{padding:32px 24px;color:var(--text-2);background:#fff;border:1px dashed var(--line-3);border-radius:var(--r-lg)}
.empty .i{width:28px;height:28px;color:var(--text-3);display:block;margin-bottom:10px}
.empty b{display:block;color:var(--text-h);font-size:16px;font-weight:600;margin-bottom:4px}

/* ---------- task table ---------- */
.tlist{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg)}
.tlist .empty{border:0}
.thead,.trow{display:grid;grid-template-columns:44px minmax(0,1fr) 170px 160px 200px;column-gap:16px}
.thead{min-height:40px;align-items:center;padding-right:16px;background:var(--side-bg);border-bottom:1px solid var(--line);border-radius:var(--r-lg) var(--r-lg) 0 0;font-size:13px;font-weight:500;color:var(--text-3)}
.trow{align-items:center;min-height:68px;padding:13px 16px 13px 0;border-bottom:1px solid var(--line);cursor:pointer;transition:background .1s}
.trow:hover{background:var(--row-hover)}
.trow.sel{background:var(--blue-10)}
.trow .cb,.thead .cb{display:grid;place-items:center}
.trow .cb input,.thead .cb input{width:16px;height:16px;accent-color:var(--blue)}
.tmain{min-width:0}
.ttitle{display:flex;align-items:center;gap:8px;min-width:0}
.ttitle .name{min-width:0;font-weight:500;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;color:var(--text)}
.unread .name{font-weight:600;color:var(--text-h)}
.trow.closed .name{color:var(--text-2);font-weight:400}
.tmeta .prio{font-size:13px}
.tags{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 10px}
.tmeta{display:flex;align-items:center;flex-wrap:wrap;gap:2px 14px;margin-top:4px;font-size:13.5px;color:var(--text-2)}
.tmeta span{display:inline-flex;align-items:center;gap:4px}
.tmeta .i{width:14px;height:14px;color:var(--text-3)}
.tcell{min-width:0}
.c-perf{font-size:14px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-foot{display:flex;align-items:center;gap:12px;min-height:50px;padding:0 16px;font-size:14px;color:var(--text-2)}
.bulkbar{position:sticky;bottom:16px;z-index:15;display:flex;align-items:center;gap:6px;margin:16px auto 0;width:max-content;max-width:100%;min-height:48px;padding:6px 6px 6px 18px;border-radius:var(--r-lg);background:#2b2a27;color:#fff;box-shadow:var(--sh-float)}
.bulkbar>span{margin-right:12px;font-weight:500}
.bulkbar .btn{background:transparent;border-color:transparent;color:#fff}
.bulkbar .btn:hover{background:rgba(255,255,255,.12);color:#fff}
.filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin-bottom:16px}
.filters .qtabs{flex:1 1 auto}
.filters .search{flex:0 1 280px}
.filters .search input{background:#fff;border-color:var(--line-2)}
.filters .search input:hover{background:#fff;border-color:var(--line-3)}
.fbox{display:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:16px;width:100%;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg)}
.fbox.open{display:grid}
@media (max-width:1312px){.thead,.trow{grid-template-columns:44px minmax(0,1fr) 150px 140px 180px}}
@media (max-width:1056px){.thead,.trow{grid-template-columns:44px minmax(0,1fr) 140px 170px}.c-perf{display:none!important}}
@media (max-width:672px){
  .thead{display:none}
  .trow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;padding:12px 16px}
  .trow:last-of-type{border-bottom:0}
  .trow .cb{display:none}
  .trow .tmain{flex:1 1 100%}
  .trow .c-due{flex:0 1 auto}
  .trow .c-st{flex:0 1 auto;margin-left:auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:2px 8px;text-align:right}
  .trow .c-st .turn{margin:0}
  .tmeta .tag{display:none}
  .fbox{grid-template-columns:1fr 1fr}
  .filters{gap:8px 6px}
  .filters .qtabs{flex:1 1 0;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .qtabs::-webkit-scrollbar{display:none}
  .qtabs .dd .menu{left:16px;right:16px;min-width:0}
  .filters>.btn{width:40px;padding:0}
  .filters>.btn .flbl{display:none}
  .filters .search{display:none;order:9;flex:1 1 100%}
  .filters .search.open{display:block}
  .fbox{order:10}
  .page-head h1{order:0}
  .page-head .seg.view{order:1}
  .page-head .seg.view .vlbl{display:none}
  .page-head .seg.scope{order:2;flex:1 1 100%}
  .page-head .seg.scope a{flex:1;justify-content:center}
}

/* ---------- board ---------- */
.board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(200px,1fr);gap:12px;overflow-x:auto;padding-bottom:16px;align-items:start}
.bcol{min-height:160px;border-radius:var(--r-lg);padding:0 2px 8px}
.bcol-h{display:flex;align-items:center;gap:8px;height:40px;padding:0 6px;font-weight:600;font-size:14px}
.bcol-h .n{color:var(--text-3);font-weight:500;font-variant-numeric:tabular-nums}
.bcol-list{display:flex;flex-direction:column;gap:8px;min-height:80px;border-radius:var(--r-lg)}
.bcard{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;cursor:pointer;transition:box-shadow .15s,border-color .15s}
.bcard:hover{border-color:var(--line-3);box-shadow:rgba(15,15,15,.06) 0 2px 4px,rgba(15,15,15,.06) 0 6px 16px}
.bcard .name{font-weight:500;line-height:1.4;margin:4px 0 10px;overflow-wrap:anywhere;color:var(--text)}
.bcard.unread .name{font-weight:600;color:var(--text-h)}
.bcard-f{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;color:var(--text-2);min-width:0}
.bcard-f>span:not(.sp):not(.ava){min-width:0;overflow-wrap:anywhere}
.bcard .due{white-space:normal;font-size:13px}
.bcard-f .sp{flex:1}
.sortable-ghost{opacity:.4}
.sortable-chosen{box-shadow:var(--sh-pop)!important}
.bcol.drop-on .bcol-list{background:var(--blue-10);outline:2px dashed var(--blue-30);outline-offset:2px}
@media (max-width:672px){.board{grid-auto-columns:minmax(84vw,1fr);scroll-snap-type:x mandatory}.bcol{scroll-snap-align:start}}

/* ---------- task page: info column + discussion as a chat (design/DESIGN.md «Страница задачи») ---------- */
.page:has(> #task-page){max-width:none;padding:0}
.tpage{display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);height:calc(100vh - var(--head));height:calc(100dvh - var(--head));max-width:1440px;margin:0 auto}
@media (min-width:1700px){.tpage{border-left:1px solid var(--line);border-right:1px solid var(--line)}}
.tp-info{min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:10px 20px 40px;border-right:1px solid var(--line)}
.tp-nav{display:flex;align-items:center;gap:4px;margin:0 -10px 8px}
.tp-nav .sp{flex:1}
.tp-back{color:var(--text-2);padding:0 10px}
.tp-id{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;font-size:13.5px;color:var(--text-2)}
.tp-id .chip{font-size:13.5px;color:var(--text-2);gap:5px}
.tp-title{margin:4px 0 10px;font-size:21px;font-weight:600;letter-spacing:-.3px;line-height:1.3;overflow-wrap:anywhere;border-radius:6px}
.tp-title[contenteditable=true]{outline:2px solid var(--blue-30);outline-offset:4px}
.tp-state{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;min-height:28px}
.tp-state .stamp{position:relative;top:auto;right:auto;margin:2px 4px 2px auto;font-size:13px;padding:4px 10px 3px}
.tp-brief{display:none}
.tp-mini{display:none}
.tp-actions{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 2px}
.tp-actions>.btn.sm{padding:0 10px}
.tp-more-dd .menu.fit{left:auto;right:0}
.tp-turn{flex-basis:100%}
.tp-more-btn{display:none}
.tp-reason{margin:16px 0 0}
.tp-sec{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.tp-more>.tp-sec:first-child{margin-top:12px}
.tp-sec:has(>.ai-note){padding-top:0;border-top:0}
.tp-sec .ai-note{margin:0}
.tp-sec-h{display:flex;align-items:center;gap:8px;min-height:26px;margin-bottom:6px}
.tp-sec-h h2{font-size:14.5px;font-weight:600;letter-spacing:0}
.tp-sec-h>.btn{margin-left:auto}
.tp-desc .desc{font-size:15px;line-height:1.6}
.props{display:flex;flex-direction:column}
.prop{display:grid;grid-template-columns:108px minmax(0,1fr);column-gap:12px;align-items:start;padding:5px 0;font-size:14.5px}
.pk{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding-top:4px;font-size:13.5px;color:var(--text-2);line-height:1.35}
.pk .pa{margin-left:-8px;color:var(--text-2)}
.pk .pa:hover{color:var(--text-h)}
.pv{min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:28px}
.pv>.person{flex:0 1 auto}
.pv-stack{display:flex;flex-direction:column;min-width:0;line-height:1.4}
.pv-stack .due{font-size:13.5px;white-space:normal}
.pv-tags{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.prop .ed-box{grid-column:1/-1;margin:8px 0 6px}
.inp.sm,select.inp.sm{min-height:32px;font-size:14px}
select.inp.sm{padding:3px 30px 3px 10px}
.cl-add{margin-top:6px}
.xrows{margin-top:16px;border-top:1px solid var(--line)}
.xrow{border-bottom:1px solid var(--line)}
.xrow-h{display:flex;align-items:center;gap:6px;min-height:46px}
.xrow-t{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:46px;padding:0;border:0;background:none;cursor:pointer;font-size:14.5px;font-weight:500;color:var(--text-h);text-align:left}
.xrow-t .i{color:var(--text-3);transition:transform .15s var(--ease)}
.xrow-t[aria-expanded=true] .i{transform:rotate(90deg)}
.xrow-n{color:var(--text-3);font-weight:500;font-variant-numeric:tabular-nums}
.xrow-b{padding:0 0 14px 23px}
.xrow .ed-box{margin-top:8px}
.xi{display:flex;align-items:center;gap:8px;min-height:34px;color:var(--text)}
a.xi:hover{color:var(--text-h)}
a.xi:hover .xi-t{color:var(--blue-hover)}
.xi-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.xi-link{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text);line-height:1.4;padding:4px 0}
.xi.cur .xi-t{font-weight:600}
.xi-h{margin:4px 0 2px;font-size:12.5px;color:var(--text-3)}
.files-list{display:flex;flex-direction:column;gap:6px}
.tp-foot{margin-top:14px;line-height:1.7}

/* chat */
.tp-chat{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0}
.tp-feedwrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.tp-feed{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:4px 32px 20px}
.tp-msgs{max-width:880px;margin:0 auto;display:flex;flex-direction:column}
.day,.unread-mark{display:flex;align-items:center;gap:12px;margin:22px 0 6px;font-size:12.5px;font-weight:500;color:var(--text-3)}
.day::before,.day::after,.unread-mark::before,.unread-mark::after{content:"";flex:1;height:1px;background:var(--line)}
.unread-mark{color:var(--blue);margin:16px 0 4px}
.day.unread-mark{margin:22px 0 6px}
.unread-mark b{margin-left:8px;font-weight:600}
.unread-mark::before,.unread-mark::after{background:var(--blue-30)}
.msg{display:flex;gap:10px;margin-top:14px;min-width:0}
.msg.cont{margin-top:4px}
.msg-ava{width:32px;flex:none}
.msg-col{display:flex;flex-direction:column;min-width:0;max-width:min(680px,82%)}
.msg-name{margin:0 0 3px 2px;font-size:13.5px;font-weight:600;color:var(--text-h)}
.msg-line{display:flex;min-width:0}
.bubble{position:relative;min-width:0;padding:7px 12px 7px;border:1px solid var(--line-2);border-radius:12px;background:#fff;overflow-wrap:anywhere}
.msg-time{position:absolute;right:10px;bottom:5px;font-size:11.5px;line-height:1;color:var(--text-3);font-variant-numeric:tabular-nums}
.msg-time.own{position:static;margin:4px -2px -1px 12px;text-align:right}
.tsp{display:inline-block;width:42px;height:1px}
.msg:not(.me):not(.cont) .bubble{border-top-left-radius:4px}
.msg.me{justify-content:flex-end}
.msg.me .msg-col{align-items:flex-end}
.msg.me .bubble{background:var(--blue-10);border-color:var(--blue-20)}
.msg.me:not(.cont) .bubble{border-top-right-radius:4px}
.msg.me .mention{color:var(--blue-active)}
.msg-text{font-size:15px;line-height:1.55;color:var(--text)}
.msg-text p{margin:0}
.msg-text p+p{margin-top:4px}
.msg-text p.gap{height:4px}
.msg-text ul{margin:2px 0;padding-left:18px}
.bubble-tag{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;margin:0 -12px 6px;padding:0 12px 6px;border-bottom:1px solid var(--line);font-size:13px;color:var(--text-2)}
.msg.me .bubble-tag{border-bottom-color:var(--blue-20)}
.bubble-tag>.i{color:var(--text-3)}
.bubble-tag .chip{font-size:13px}
.att-imgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.att-img img{display:block;width:180px;height:130px;object-fit:cover;border:1px solid var(--line);border-radius:8px;background:var(--soft)}
.att-files{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-top:6px;min-width:0}
.bubble>:first-child{margin-top:0}
.att-files .file{max-width:100%;padding:6px 10px}
.att-files .file span{max-width:360px}
.tp-info .ai-note{padding:12px 14px}
.sys{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 8px;max-width:92%;margin:12px auto 0;font-size:13px;line-height:1.45;color:var(--text-2);text-align:center}
.sys>.i{color:var(--text-3)}
.sys b{font-weight:600;color:var(--text)}
.sys .chip{font-size:13px}
.sys-meta{color:var(--text-3);white-space:nowrap}
.sys time,.sys-meta time{font-variant-numeric:tabular-nums}
.jump{position:absolute;right:20px;bottom:14px;z-index:5;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line-2);border-radius:50%;background:#fff;color:var(--text-2);box-shadow:var(--sh-pop);cursor:pointer}
.jump:hover{color:var(--text-h)}
.tp-drop{position:absolute;inset:8px 16px;z-index:6;display:grid;place-content:center;justify-items:center;gap:8px;border:2px dashed var(--blue-30);border-radius:var(--r-lg);background:rgba(238,245,253,.94);color:var(--blue-70);font-weight:500;pointer-events:none}
.tp-drop .i{width:22px;height:22px}
.composer{flex:none;padding:10px 32px 14px;border-top:1px solid var(--line);background:#fff}
.composer-ro{display:flex;align-items:center;gap:8px;min-height:52px;font-size:14px;color:var(--text-2)}
.composer-in{max-width:880px;margin:0 auto}
.cmp-row{display:flex;align-items:flex-end;gap:6px}
.cmp-acts{display:contents}
.cmp-row>.btn,.cmp-acts>.dd>.btn{height:42px;flex:none}
.cmp-row .cmp-clip{width:42px;color:var(--text-2)}
.cmp-box{position:relative;flex:1;min-width:0;border:1px solid var(--line-2);border-radius:var(--r-lg);background:#fff;transition:border-color .12s,box-shadow .12s}
.cmp-box:hover{border-color:var(--line-3)}
.cmp-box:focus-within{border-color:var(--blue);box-shadow:var(--ring)}
.cmp-box textarea{display:block;width:100%;height:40px;min-height:40px;max-height:200px;padding:9px 14px;border:0;outline:none;resize:none;overflow-y:hidden;background:transparent;font-size:15px;line-height:1.5}
.cmp-box .cmp-men{top:auto;bottom:calc(100% + 6px)}
.cmp-dd .menu.fit{top:auto;bottom:calc(100% + 6px);left:auto;right:0;min-width:260px}
.cmp-dd .mi small{margin-left:auto;font-size:12.5px}
.cmp-acticon{display:none}
.cmp-row .cmp-send{width:42px;border-radius:var(--r)}
/* nothing to send = a quiet grey key (not a faded blue one); something to send = the solid primary button */
.cmp-row .cmp-send:disabled{opacity:1;background:var(--field);border-color:var(--line-2);color:var(--text-3);box-shadow:none}
.cmp-row .cmp-send.busy{opacity:.7;background:var(--blue);border-color:var(--blue);color:#fff}
.cmp-row .cmp-send:not(:disabled){box-shadow:0 1px 2px rgba(35,131,226,.35),0 2px 6px rgba(35,131,226,.18)}
.cmp-act{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:0 0 8px;padding:5px 6px 5px 12px;border:1px solid var(--blue-20);border-radius:var(--r);background:var(--blue-10);font-size:14px}
.cmp-act-l{font-weight:600;color:var(--blue-70)}
.cmp-act .btn{margin-left:auto}
.cmp-files{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.cmp-file{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:36px;padding:0 2px 0 8px;border:1px solid var(--line-2);border-radius:var(--r);background:#fff;font-size:13.5px}
.cmp-file img{width:26px;height:26px;object-fit:cover;border-radius:4px}
.cmp-fn{min-width:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmp-file small{color:var(--text-3);white-space:nowrap}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* toasts keep clear of the composer */
body:has(#task-page) .toasts{bottom:92px}
@media (max-width:1100px){
  .tpage{grid-template-columns:minmax(0,300px) minmax(0,1fr)}
  .tp-info{padding:10px 18px 32px}
  .prop{grid-template-columns:92px minmax(0,1fr);column-gap:10px}
  .tp-feed{padding:4px 20px 18px}
  .composer{padding:10px 20px 12px}
}
@media (max-width:900px) and (min-width:768px){
  .tpage{grid-template-columns:minmax(0,280px) minmax(0,1fr)}
  .tp-info{padding:10px 16px 32px}
  .tp-feed{padding:4px 16px 16px}
  .composer{padding:8px 14px 10px}
}
@media (max-width:767px){
  /* a column at least one screen tall: with a short discussion the composer still sits at the bottom */
  .tpage{display:flex;flex-direction:column;height:auto;min-height:calc(100vh - var(--head));min-height:calc(100dvh - var(--head));max-width:none}
  .tpage>.tp-mini,.tpage>.tp-info{flex:none}
  .tp-mini{position:sticky;top:var(--head);z-index:16;display:flex;align-items:center;gap:4px;width:100%;height:0;margin-bottom:0;padding:0 12px 0 6px;overflow:hidden;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);opacity:0;transition:opacity .15s;pointer-events:none}
  .tp-mini.on{height:48px;margin-bottom:-48px;border-bottom:1px solid var(--line);opacity:1;pointer-events:auto}
  .tp-mini-back.btn.icon{flex:none;width:40px;height:40px;color:var(--text-h)}
  .tp-mini-b{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:48px;padding:0;border:0;background:none;font:inherit;font-size:14px;text-align:left;color:var(--text);cursor:pointer}
  .tp-mini .tno{flex:none;font-size:13px;color:var(--text-2)}
  .tp-mini-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--text-h)}
  .tp-mini .chip{flex:none;font-size:13px}
  .tp-info{overflow:visible;padding:8px 16px 12px;border-right:0;border-bottom:1px solid var(--line)}
  .tp-nav{margin:0 -6px 6px}
  /* the way back is a real button on phones: the page opens scrolled down to the chat */
  .tp-back.btn{width:40px;height:40px;padding:0;justify-content:center;border:1px solid var(--line-2);border-radius:var(--r);background:#fff;color:var(--text-h)}
  .tp-back.btn .i{width:18px;height:18px}
  .tp-back span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .tp-title{font-size:19px;margin-bottom:8px}
  .tp-brief{display:flex;flex-wrap:wrap;gap:2px 16px;margin-top:6px;font-size:14px}
  .tp-brief .due{font-size:14px}
  .tp-actions{margin-top:12px}
  .tp-more-btn{display:inline-flex;align-items:center;gap:6px;height:36px;margin-top:6px;padding:0;border:0;background:none;color:var(--blue);font-weight:500;cursor:pointer}
  .tp-more-btn .i{transition:transform .15s var(--ease)}
  .tp-info.more-on .tp-more-btn .i{transform:rotate(180deg)}
  .tp-info:not(.more-on) .tp-more{display:none}
  .prop{grid-template-columns:112px minmax(0,1fr)}
  .tp-chat{display:flex;flex-direction:column;flex:1 0 auto}
  .tp-feedwrap{display:flex;flex-direction:column;flex:1 0 auto}
  .tp-feed{flex:1 0 auto}
  .tp-feed{overflow:visible;padding:0 16px 16px}
  .jump{display:none}
  .tp-drop{position:fixed;inset:auto 8px 80px;height:120px}
  .composer{position:sticky;bottom:var(--kb,0px);z-index:15;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
  .msg-col{max-width:86%}
  .msg-ava{width:28px}
  .msg-ava .ava{width:28px;height:28px;font-size:11px}
  .att-img img{width:140px;height:104px}
  .cmp-fn{max-width:150px}
  body:has(#task-page) .toasts{bottom:calc(var(--kb,0px) + 72px + env(safe-area-inset-bottom))}
}
@media (max-width:480px){
  .cmp-actlbl{display:none}
  .cmp-acticon{display:contents}
  .cmp-acts>.dd>.btn{padding:0 8px;gap:2px}
  .cmp-row{gap:4px}
  .cmp-dd .menu.fit{right:-46px;min-width:min(280px,calc(100vw - 20px))}
}
/* R-27 review: the task composer on phones (< 768 px) has 44 px targets with a mouse too, as with a touch screen below:
   clip, «Действие», send and the mic (prefixed to beat voice.css), the field as tall as the buttons beside it */
@media (max-width:767px){
  #task-page .composer-in .cmp-row .cmp-clip,#task-page .composer-in .cmp-row .cmp-send,#task-page .composer-in .cmp-row .cmp-mic,#task-page .composer-in .cmp-acts>.dd>.btn{height:44px}
  #task-page .composer-in .cmp-row .cmp-clip,#task-page .composer-in .cmp-row .cmp-send,#task-page .composer-in .cmp-row .cmp-mic{width:44px}
  #task-page .composer-in .cmp-box textarea{height:42px;min-height:42px;padding-top:10px;padding-bottom:10px}
}
.kv{margin:0;padding:12px 0;border-bottom:1px solid var(--line)}
.kv:last-child{border-bottom:0}
.kv>.k{font-size:13px;font-weight:500;color:var(--text-3);margin-bottom:6px;display:flex;align-items:center;gap:6px}
.kv>.k .btn{margin-left:auto}
.kv>.v{font-size:14.5px}
.desc{font-size:15.5px;line-height:1.65;color:var(--text);max-width:72ch}
.desc p{margin:0 0 8px} .desc p.gap{height:6px} .desc ul{margin:4px 0 8px;padding-left:22px} .desc li{margin:3px 0}
.desc strong{font-weight:600;color:var(--text-h)}
.cl-item{display:flex;align-items:flex-start;gap:10px;padding:6px 8px;margin:0 -8px;border-radius:var(--r-sm)}
.cl-item:hover{background:var(--hover)}
.cl-item input{margin-top:4px;width:16px;height:16px;accent-color:var(--blue)}
.cl-item.done span{color:var(--text-3);text-decoration:line-through}
.cl-item .del{margin-left:auto;opacity:0}
.cl-item:hover .del{opacity:1}
@media (hover:none){.cl-item .del{opacity:1}}
.progress{height:5px;border-radius:3px;background:#ebeae7;overflow:hidden;flex:1;max-width:120px}
.progress i{display:block;height:100%;border-radius:3px;background:var(--blue)}
.files{display:flex;flex-wrap:wrap;gap:8px}
.file{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r);background:#fff;font-size:14px;color:var(--text)}
.file:hover{background:var(--row-hover);border-color:var(--line-3);color:var(--text-h)}
.file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px;min-width:0}
.file small{color:var(--text-3);white-space:nowrap}
.file-row{display:flex;align-items:center;gap:4px;min-width:0;width:100%}
.file-row .file{flex:1;min-width:0}
.file-row .file span{flex:1;max-width:none}
.file-del{flex:none;color:var(--text-3)}
.file-del:hover{color:#d44c47;background:#fdebec}
.ai-note{position:relative;margin:8px 0 12px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg)}
.ai-note h4{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;margin-bottom:8px}
.ai-note h4 .i{display:none}
.ai-note h4 .sp{flex:1}
.ai-note p{font-size:14.5px;line-height:1.6;margin-bottom:8px;max-width:72ch}
.ai-note ul{margin:2px 0 8px;padding-left:18px;font-size:14.5px;line-height:1.55}
.ai-note li{margin:3px 0}
.ai-note .lab{font-size:13px;font-weight:600;color:var(--text-2);margin-top:12px}
.ai-more>summary{cursor:pointer;color:var(--blue);font-size:14px;font-weight:500;margin:4px 0 8px}
.ai-more[open]>summary{margin-bottom:4px}
.shimmer{height:12px;border-radius:4px;margin:8px 0;background:linear-gradient(90deg,#f1f1ef 25%,#e7e6e3 37%,#f1f1ef 63%);background-size:400% 100%;animation:shim 1.4s ease infinite}
@keyframes shim{0%{background-position:100% 50%}100%{background-position:0 50%}}
.arrow{color:var(--text-3)}
/* the stamp on closed tasks */
.stamp{position:absolute;top:48px;right:28px;z-index:4;display:grid;place-items:center;padding:6px 14px 5px;border:3px double var(--blue-70);border-radius:6px;color:var(--blue-70);font-weight:700;font-size:15px;letter-spacing:.16em;text-transform:uppercase;line-height:1.1;transform:rotate(-8deg);opacity:.85;mix-blend-mode:multiply;pointer-events:none;
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='60'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.6 1.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='60'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.6 1.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}
.stamp small{display:block;font-size:10.5px;letter-spacing:.06em;font-weight:600;margin-top:2px}
.stamp.just{animation:stamp-in .42s cubic-bezier(.3,1.6,.5,1) both}
@keyframes stamp-in{0%{opacity:0;transform:rotate(-14deg) scale(2.2)}60%{opacity:.95;transform:rotate(-7deg) scale(.94)}100%{opacity:.85;transform:rotate(-8deg) scale(1)}}

/* ---------- modal ---------- */
dialog.dlg{padding:0;border:0;border-radius:var(--r-lg);box-shadow:var(--sh-float);width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 48px);color:var(--text);background:#fff;overflow:visible}
dialog.dlg.sm{width:min(460px,calc(100vw - 32px))}
dialog.dlg::backdrop{background:rgba(15,15,15,.4)}
dialog.dlg[open]{animation:dlg-in .22s var(--ease)}
@keyframes dlg-in{from{opacity:0;transform:translateY(8px) scale(.985)}}
.dlg-h{display:flex;align-items:center;gap:12px;padding:20px 24px 0}
.dlg-h h2{margin-right:auto;font-size:20px}
#dc-title{overflow-wrap:anywhere;font-size:18px;line-height:1.35}
#dc-detail{margin:8px 24px 0;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r);font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dlg-b{padding:16px 24px 8px;max-height:calc(100vh - 210px);overflow-y:auto}
.dlg-f{display:flex;align-items:center;gap:8px;padding:14px 24px 18px;border-top:1px solid var(--line);margin-top:8px}
.dlg-f .sp{flex:1;color:var(--text-3);font-size:13px}
.dlg-f>.kbd-hint{color:var(--text-3)}
.ai-bar{display:flex;gap:10px;align-items:flex-start;padding:6px 6px 6px 12px;margin-bottom:22px;background:#fff;border:1px solid var(--blue-30);border-radius:var(--r-lg)}
.ai-bar:focus-within{border-color:var(--blue);box-shadow:var(--ring)}
.ai-bar textarea{flex:1;border:0;background:transparent;resize:none;outline:none;min-height:24px;line-height:1.5;padding:6px 0;overflow:hidden}
.ai-bar>.i{display:none}
.ai-bar>.ai-mark{margin-top:9px}
.more-toggle{display:inline-flex;align-items:center;gap:6px;color:var(--blue);font-weight:500;cursor:pointer;background:none;border:0;padding:8px 0}
.more-toggle .i{transition:transform .15s}
.more-toggle.open .i{transform:rotate(90deg)}
/* people picker */
.picker{position:relative}
.picker-box{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:38px;padding:3px 6px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:#fff;cursor:text;transition:border-color .12s,box-shadow .12s}
.picker-box:hover{border-color:var(--line-3)}
.picker-box:focus-within{border-color:var(--blue);box-shadow:var(--ring)}
.picker-box input{flex:1;min-width:120px;border:0;outline:none;background:transparent;height:30px;padding:0 6px}
.ptoken{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 2px 0 3px;border-radius:var(--r-sm);background:#f1f1ef;font-size:13.5px}
.ptoken .ava{width:20px;height:20px;font-size:9px}
.ptoken button{display:grid;place-items:center;width:20px;height:20px;border:0;border-radius:4px;background:transparent;cursor:pointer;color:var(--text-2)}
.ptoken button:hover{background:#e3e2df;color:var(--text-h)}
.menu{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);max-height:320px;overflow-y:auto;padding:4px;background:#fff;border-radius:var(--r);box-shadow:var(--sh-pop)}
.menu.fit{right:auto;min-width:220px}
.menu .mi{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:0 10px;border:0;border-radius:5px;background:transparent;text-align:left;cursor:pointer;color:var(--text);font-size:14.5px}
.menu .mi:hover,.menu .mi.act{background:var(--hover);color:var(--text-h)}
.menu .mi.danger{color:var(--red)}
.menu .mi.danger:hover{background:var(--red-10);color:var(--red-70)}
.menu .mh{padding:8px 10px 4px;font-size:12.5px;font-weight:500;color:var(--text-3)}
.menu .sep{height:1px;margin:4px 0;background:var(--line)}
.dd{position:relative;display:inline-block}
.qtabs .dd{position:static}
.qtabs .dd .menu{top:auto;left:auto;margin-top:4px}
/* toasts */
.toasts{position:fixed;right:20px;bottom:20px;z-index:100;display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.toast{display:flex;align-items:center;gap:10px;max-width:440px;min-height:44px;padding:10px 16px;border-radius:var(--r);background:#2b2a27;color:#fff;box-shadow:var(--sh-pop);font-size:14.5px;animation:t-in .18s var(--ease)}
.toast.err{background:var(--red-70)}
.toast.upl{flex-direction:column;align-items:stretch;gap:8px;min-width:260px}
.upl-bar{display:block;height:4px;border-radius:2px;background:rgba(255,255,255,.2);overflow:hidden}
.upl-bar i{display:block;height:100%;width:0;background:#a9cdf4;transition:width .2s}
.toast a{color:#a9cdf4;font-weight:600}
.toast .i{flex:none}
@keyframes t-in{from{opacity:0;transform:translateY(8px)}}

/* ---------- dashboard ---------- */
.desk-head{display:flex;align-items:baseline;gap:6px 20px;flex-wrap:wrap;margin:32px 0 4px}
.desk-head .date{color:var(--text-2);font-size:15px}
.desk-head .over{color:var(--red);font-weight:600}
.quick-l{margin:22px 0 8px}
.quick{display:flex;align-items:center;gap:8px;margin:0 0 36px;padding:5px 5px 5px 0;background:#fff;border:1px solid var(--line-2);border-radius:var(--r-lg);box-shadow:var(--sh-card);transition:border-color .12s,box-shadow .12s}
.quick:focus-within{border-color:var(--blue);box-shadow:var(--ring)}
.quick>.i{display:none}
.quick>.ai-mark{margin-left:14px}
.quick input{flex:1;min-width:0;height:40px;padding:0 6px;border:0;outline:none;background:transparent;font-size:16px}
.quick input::placeholder{color:var(--text-3)}
.quick .btn{height:38px}
.dash{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:40px;align-items:start}
@media (max-width:1180px){.dash{grid-template-columns:1fr;gap:0}}
.margin{display:flex;flex-direction:column;gap:32px;min-width:0}
.margin .sec{margin:0}
.margin .sec-h h2{font-size:16px!important}
.ledger{list-style:none;margin:0;padding:0;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.ledger a{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 16px;color:var(--text);border-bottom:1px solid var(--line);font-size:14.5px}
.ledger li:last-child a{border-bottom:0}
.ledger a:hover{background:var(--row-hover);color:var(--text-h)}
.ledger .n{margin-left:auto;font-size:15px;font-weight:600;color:var(--text-h);font-variant-numeric:tabular-nums}
.ledger .n.red{color:var(--red)} .ledger .n.amber{color:var(--orange)} .ledger .n.zero{color:var(--text-3);font-weight:400}
.ledger .grp{padding:14px 16px 6px;font-size:12.5px;font-weight:500;color:var(--text-3);border-bottom:1px solid var(--line)}
.att{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;min-height:68px;padding:13px 18px;background:#fff;border:1px solid var(--line);border-top:0;cursor:pointer;transition:background .1s}
.sec-h+.att{border-top:1px solid var(--line);border-radius:var(--r-lg) var(--r-lg) 0 0}
.att:last-child{border-radius:0 0 var(--r-lg) var(--r-lg)}
.sec-h+.att:last-child{border-radius:var(--r-lg)}
.att:hover{background:var(--row-hover)}
.att>.ava{display:none}
.att .tmain{min-width:0}
.att .c-st{text-align:right}
.why{font-size:13.5px;color:var(--text-2)}
.feed{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.notif{display:flex;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);cursor:pointer;color:var(--text)}
.notif:last-child{border-bottom:0}
.notif:hover{background:var(--row-hover);color:var(--text)}
.notif .txt{font-size:14.5px;line-height:1.45;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.notif.unread .txt{color:var(--text-h);font-weight:600}
.notif .meta{font-size:13px;color:var(--text-3);margin-top:2px}
.sec>div:has(>.bday){background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.bday{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 16px;border-bottom:1px solid var(--line)}
.bday:last-child{border-bottom:0}
.bday .today{color:var(--blue);font-weight:600}
.digest{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:16px}
.digest p{font-size:15px;line-height:1.6}
.digest ol{margin:12px 0 0;padding-left:20px}
.digest li{margin:8px 0;line-height:1.45}
.digest a{color:var(--text-h);font-weight:500;text-decoration:underline;text-decoration-color:var(--line-3);text-underline-offset:3px}
.digest a:hover{text-decoration-color:var(--blue);color:var(--blue-hover)}
.notif-pop{position:absolute;right:0;top:calc(100% + 8px);width:400px;max-width:calc(100vw - 16px);max-height:70vh;overflow-y:auto;background:#fff;color:var(--text);border-radius:var(--r-lg);box-shadow:var(--sh-pop);z-index:50}
.notif-pop .panel-h{position:sticky;top:0;background:#fff}

/* ---------- admin ---------- */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:24px;overflow-x:auto;scrollbar-width:none}
.tabs a{height:40px;display:flex;align-items:center;padding:0 12px;margin-bottom:-1px;color:var(--text-2);font-weight:500;border-bottom:2px solid transparent;white-space:nowrap}
.tabs a:hover{color:var(--text-h)}
.tabs a.on{color:var(--text-h);border-bottom-color:var(--text-h);font-weight:600}
table.tbl{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);font-size:14.5px;overflow:hidden}
.tbl th{text-align:left;font-size:13px;font-weight:500;color:var(--text-3);height:40px;padding:0 14px;background:var(--side-bg);border-bottom:1px solid var(--line);white-space:nowrap}
.tbl td{padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl tr.click{cursor:pointer}
.tbl tr.click:hover td{background:var(--row-hover)}
.tbl-wrap{overflow-x:auto;border-radius:var(--r-lg)}
.matrix td,.matrix th{text-align:center}
.matrix td:first-child,.matrix th:first-child{text-align:left}
.matrix .grp td{background:var(--side-bg);font-weight:600;font-size:13px;color:var(--text-2);text-align:left}
.tree-row{display:flex;align-items:center;gap:8px}
.tree-pad{display:inline-block}
.settings-grid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:32px}
/* «Всегда добавлять в наблюдатели»: person · department · remove */
.wrules{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.wrules-ro{margin:0;padding-left:18px;font-size:14px;line-height:1.7}
.wrule{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,260px) 38px;gap:8px;align-items:start;width:100%}
.wrule>.btn.icon{width:38px;height:38px;color:var(--text-2)}
.wrule>.wrule-del:hover{color:var(--red);border-color:var(--red)}
@media (max-width:600px){.wrule{grid-template-columns:minmax(0,1fr) 38px}.wrule>select{grid-column:1}}
.settings-nav a{display:flex;align-items:center;gap:10px;min-height:34px;margin:1px 0;padding:6px 10px;line-height:1.3;border-radius:var(--r-sm);color:#55534e;font-weight:500}
.settings-nav a .i{flex:none}
.settings-nav a.on{background:var(--sel);color:var(--text-h);font-weight:600}
.settings-nav a:hover{color:var(--text-h);background:var(--hover)}
.status-line{display:flex;align-items:center;gap:8px;font-size:14.5px}
.status-line .led{width:9px;height:9px;border-radius:50%;background:var(--line-3)}
.status-line .led.on{background:var(--green)} .status-line .led.err{background:var(--red)}
.code{font:13.5px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;background:var(--soft);border-radius:var(--r);padding:12px 14px;white-space:pre-wrap;word-break:break-all}
@media (max-width:900px){.settings-grid{grid-template-columns:1fr}.grid2{grid-template-columns:1fr}}
/* R-32 settings «Общие» → «Логотип»: how the sign looks in the menu and as the phone icon, then the two buttons */
.brand-pv{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;margin:2px 0 12px}
.brand-pv-f{margin:0;min-width:0}
.brand-pv-f figcaption{margin-bottom:6px;font-size:12.5px;color:var(--text-2)}
.brand-pv-menu{display:flex;align-items:center;gap:10px;width:248px;max-width:100%;height:60px;padding:0 14px;border:1px solid var(--line);border-radius:var(--r);background:#fff;color:var(--text-h);font-weight:600;font-size:15px;line-height:1.2;white-space:nowrap}
.brand-pv-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
.brand-pv-t small{display:block;overflow:hidden;text-overflow:ellipsis;font-weight:400;font-size:12.5px;color:var(--text-2)}
.brand-pv-phone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:104px;height:96px;padding:0 6px;border:1px solid var(--line);border-radius:var(--r);background:var(--soft)}
.brand-pv-ico{display:block;width:56px;height:56px;border-radius:13px;background:#fff;box-shadow:0 0 0 1px rgba(15,15,15,.08)}
.brand-pv-short{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.3;color:var(--text-h)}
.brand-acts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.brand-acts label.btn{position:relative;cursor:pointer}
.brand-acts label.btn:focus-within{box-shadow:var(--ring)}
.brand-set .brand-note{margin-top:8px;max-width:640px}

/* ---------- login: centred card ---------- */
.auth{min-height:100vh;display:grid;place-items:center;padding:48px 16px;background:var(--side-bg)}
.auth-main{width:100%;display:flex;justify-content:center}
.auth-card{width:100%;max-width:420px;padding:36px 36px 28px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:rgba(15,15,15,.04) 0 4px 18px,rgba(15,15,15,.03) 0 2px 8px}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px;font-weight:600;font-size:15px;line-height:1.25;color:var(--text-h)}
.auth-brand small{display:block;font-weight:400;font-size:13px;color:var(--text-2)}
.auth-brand .brand-mark{width:34px;height:34px;border-radius:9px;background-size:28px}
.auth-card h1{margin-bottom:6px;font-size:26px}
.auth-card form .btn.primary{width:100%;height:42px;justify-content:center;font-size:15px}
.auth-foot{margin-top:22px;font-size:13.5px;color:var(--text-2)}
.pw{position:relative}
.pw .inp{padding-right:46px}
.pw button{position:absolute;right:1px;top:1px;width:40px;height:36px;border:0;border-radius:5px;background:none;color:var(--text-3);cursor:pointer;display:grid;place-items:center}
.pw button:hover{color:var(--text-h)}
@media (max-width:480px){.auth{place-items:start center;padding:24px 12px;background:#fff}.auth-card{padding:12px 6px;border:0;box-shadow:none}}
.alert{padding:12px 14px;border:1px solid #f3cfcd;border-radius:var(--r);font-size:14.5px;margin-bottom:16px;background:var(--red-10);color:#6e2420}
.alert.ok{border-color:#cfe3d4;background:var(--green-10);color:#244a33}
.alert.info{border-color:var(--blue-20);background:var(--blue-10);color:#1d4a78}

/* ---------- smaller screens ---------- */
.burger{display:none}
@media (max-width:1056px){
  .shell{grid-template-columns:minmax(0,1fr)}
  /* R-33: the modal drawer — closed = off screen AND hidden (not focusable); the scrim under it takes every tap beside the
     menu; the round «×» sits on the scrim right of the drawer (the drawer leaves 72 px for it on any width) */
  .side-box{position:fixed;z-index:45;left:0;top:0;width:min(272px,calc(100vw - 72px));transform:translateX(-102%);visibility:hidden;transition:transform .24s var(--ease),visibility 0s linear .24s}
  .side-box.on{transform:none;visibility:visible;transition:transform .24s var(--ease),visibility 0s}
  .side{border-right:0;box-shadow:var(--sh-float)}
  .side-head{padding-right:0}
  .side-hide{display:none}
  .side-box.on .side-x{display:grid;place-items:center;position:absolute;top:calc(4px + env(safe-area-inset-top));left:calc(100% + 12px);width:48px;height:48px;padding:0;border:0;border-radius:50%;background:#fff;color:var(--text-h);box-shadow:var(--sh-pop);cursor:pointer}
  .side-x .i{width:22px;height:22px}
  .side-scrim{display:block;position:fixed;inset:0;z-index:44;background:rgba(15,15,15,.32);touch-action:none}
  .burger{display:inline-flex}
  .top{padding:0 16px 0 10px}
  .page{padding:0 24px 56px}
}
@media (max-width:672px){
  .page{padding:0 16px 40px}
  .top{gap:4px;padding:0 10px 0 6px}
  .top .search{flex:1 1 auto}
  .top .btn .lbl-new{display:none}
  .top .btn.primary{width:36px;padding:0}
  .page-head{margin:20px 0 14px;gap:10px}
  h1,.page-head h1{font-size:24px}
  .desk-head{margin-top:20px}
  .quick{margin:0 0 28px}
  .att{grid-template-columns:1fr;gap:6px}
  .att .c-st{text-align:left}
  .toasts{left:8px;right:8px;bottom:8px;align-items:stretch}.toast{max-width:none}
  .notif-pop{position:fixed;left:8px;right:8px;top:calc(var(--head) + 4px);width:auto;max-width:none}
  .dlg-f>.btn{flex:1;min-width:0}
  .dlg-f>.sp{display:none}
  .seg button,.seg a{padding:0 10px}
  .dlg .seg{display:flex}.dlg .seg>*{flex:1 1 auto;justify-content:center}
  .inp.big{font-size:16px}
  .ai-bar{flex-wrap:wrap}
  .ai-bar textarea{min-height:48px}
  .ai-bar>.btn{flex:1 1 100%}
}
@media (max-width:600px){
  dialog.dlg,dialog.dlg.sm{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
  dialog.dlg[open]{display:flex;flex-direction:column}
  dialog.dlg .dlg-b{max-height:none;flex:1}
  /* a dialog whose body sits in a <form>: the form is the flex column, so the footer stays on screen */
  dialog.dlg>form{display:flex;flex-direction:column;flex:1;min-height:0}
  dialog.dlg>form>.dlg-b{min-height:0;overflow-y:auto}
}
@media (pointer:coarse){
  .btn{min-height:40px}.btn.xs{min-height:32px}
  .nav a{min-height:44px} /* R-33: menu targets 44 px */
  .brand-acts .btn{min-height:44px} /* R-32 */
  .side .ntc-w-t,.side .ntc-w-a,.side .ntc-w-none,.side .ntc-w-all{min-height:44px}.side .ntc-w-a{width:44px}.side .ntc-w-all{display:flex;align-items:center}
  .qtab{height:40px}
  .pill{min-height:40px}
  .check input,.cl-item input,.trow .cb input{width:20px;height:20px}
  .btn.icon.sm{width:40px}
  .kbd-hint{display:none}
  .cmp-row .cmp-clip,.cmp-row .cmp-send,.cmp-row>.btn,.cmp-acts>.dd>.btn{height:44px}
  .cmp-row .cmp-clip,.cmp-row .cmp-send{width:44px}
  .cmp-box textarea{height:42px;min-height:42px;padding-top:10px;padding-bottom:10px}
  .xrow-t{min-height:48px}
}
.top .btn.icon .i{width:18px;height:18px}
/* Composer on a computer/tablet: one card — the text field 3 lines tall on top, under it inside the card the clip,
   the Enter hint, «Действие» and send/mic (the buttons move with the card when the text grows). Phones keep one row. */
.cmp-hint{display:none}
@media (min-width:768px){
  .composer-in .cmp-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:"box box box box" "clip hint acts send";align-items:center;gap:0 4px;padding:0 8px 8px;border:1px solid var(--line-2);border-radius:var(--r-lg);background:#fff;transition:border-color .12s,box-shadow .12s;container-type:inline-size}
  .composer-in .cmp-row:hover{border-color:var(--line-3)}
  .composer-in .cmp-row:has(textarea:focus){border-color:var(--blue);box-shadow:var(--ring)}
  .composer-in .cmp-row>.cmp-box{grid-area:box;border:0;border-radius:var(--r-lg) var(--r-lg) 0 0;background:transparent;box-shadow:none}
  .composer-in .cmp-box textarea{height:84px;min-height:84px;padding:12px 6px 4px}
  .composer-in .cmp-row .cmp-clip{grid-area:clip;width:34px;height:34px;min-height:0}
  .composer-in .cmp-acts>.dd{grid-area:acts}
  .composer-in .cmp-acts>.dd>.btn{height:34px;min-height:0;padding:0 10px;border-color:transparent;background:transparent;color:var(--text-2)}
  .composer-in .cmp-acts>.dd>.btn:hover,.composer-in .cmp-acts>.dd>.btn[aria-expanded=true]{background:var(--hover);color:var(--text-h)}
  .composer-in .cmp-row .cmp-send,.composer-in .cmp-row .cmp-mic{grid-area:send;width:34px;height:34px;min-height:0}
  .cmp-hint{grid-area:hint;display:block;min-width:0;padding-left:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;color:var(--text-3)}
  .cmp-hint kbd{padding:0;border:0;font:inherit;font-weight:500;color:var(--text-2)}
  /* recording/preview covers the card: a wide waveform where the text was, the controls in the toolbar row
     («Отправить» appears exactly where the mic was) */
  .composer-in .vrec{inset:-1px;align-items:stretch;padding:12px 8px 8px}
  .composer-in .vrec-in{display:grid;grid-template-columns:auto auto auto minmax(0,1fr) auto auto;grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:0 6px;padding:0}
  .composer-in .vrec-in>*{grid-row:2}
  .composer-in .vrec-in>.btn,.composer-in .vrec-in>.vrec-play{width:34px;height:34px;min-height:0}
  .composer-in .vrec-del{grid-column:1}
  .composer-in .vrec-dot,.composer-in .vrec-play{grid-column:2}
  .composer-in .vrec-dot{margin-left:4px}
  .composer-in .vrec-t{grid-column:3}
  .composer-in .vrec-stop{grid-column:5}
  .composer-in .vrec-in>.vrec-send{grid-column:6;margin-left:0}
  .composer-in .vrec-in>.vrec-wave,.composer-in .vrec-in>.vrec-pw,.composer-in .vrec-in>.vrec-hint{grid-row:1;grid-column:1/-1;align-self:center;width:100%;padding:0 6px}
  .composer-in .vrec-in>.vrec-wave{height:56px;padding:0}
  .composer-in .vrec-in>.vrec-pw{height:56px;justify-content:space-between;gap:3px}
  .composer-in .vrec-pw i{max-width:4px;transform:scaleY(1.7)}
}
@media (min-width:768px) and (pointer:coarse){
  .composer-in .cmp-row .cmp-clip,.composer-in .cmp-acts>.dd>.btn,.composer-in .cmp-row .cmp-send,.composer-in .cmp-row .cmp-mic,.composer-in .vrec-in>.btn{height:40px}
  .composer-in .cmp-row .cmp-clip,.composer-in .cmp-row .cmp-send,.composer-in .cmp-row .cmp-mic,.composer-in .vrec-in>.btn{width:40px}
  .cmp-hint{visibility:hidden}
}
@container (max-width:540px){.cmp-hint2{display:none}}
@container (max-width:300px){.cmp-hint{visibility:hidden}}
/* live popups (TM.np): new notifications addressed to me — bottom-left on a computer; on phones, tablets and the task
   page below 1056 px under the top bar (so they never cover the composer); under the top bar's menus and the side drawer */
.npops{position:fixed;left:20px;bottom:20px;z-index:101;display:flex;flex-direction:column;gap:8px;width:340px;max-width:calc(100vw - 40px);pointer-events:none}
.npop{position:relative;border:1px solid var(--line-2);border-radius:var(--r-lg);background:#fff;box-shadow:var(--sh-pop);pointer-events:auto;animation:npop-in .2s var(--ease) both}
.npop:hover{border-color:var(--line-3)}
.npop:focus-within{box-shadow:var(--sh-pop),var(--ring)}
.npop-a{display:flex;flex-direction:column;gap:3px;width:100%;padding:11px 40px 12px 14px;border:0;background:none;font:inherit;text-align:left;color:var(--text);text-decoration:none;cursor:pointer;outline:none}
.npop-a:hover{text-decoration:none}
.npop-k{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--blue)}
.npop-k::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--blue)}
.npop-n{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:14.5px;font-weight:500;line-height:1.4;color:var(--text-h)}
.npop-m{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:var(--text-3)}
.npop-m:empty{display:none}
.npop-m.npop-m2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:1.4;color:var(--text-2)} /* R-25 chat popup: the text, up to 2 lines */
.npop-x{position:absolute;top:7px;right:7px;display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--text-3);cursor:pointer}
.npop-x:hover{background:var(--hover);color:var(--text-h)}
.npop-x .i{width:16px;height:16px}
.npop.out{opacity:0;transform:translateY(6px);transition:opacity .2s,transform .2s}
@keyframes npop-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:1056px){
  .npops{z-index:19}
  body:has(#task-page) .npops{top:calc(var(--head) + 8px);bottom:auto}
}
@media (max-width:767px){.npops{top:calc(var(--head) + 8px);right:10px;bottom:auto;left:10px;width:auto;max-width:none}}
/* ---------- R-27 the chat widget (ТЗ §29.7): the format of a website consultant, our look ----------
   A round button at the bottom right of every page but /chat (.cfab), one preview card of a new message above it
   (.cfab-pv), the chat window above it (.cw; its content: chat.css, loaded with chat.js on the first expand). rt.js
   (TM.dock.place) sets on <html>: --fab-b (the button's bottom: 24 px, phones 16 + safe area, or above the top edge of the
   highest bar pinned to the bottom under it — the task composer, .bulkbar, .wfa-bar, .wfm-bar, .reg-ack), --fab-r,
   --cw-b / --cw-h (the window above the button, ≈ 380 × 600, never higher than the room above it) and --toast-b /
   --toast-r (.toasts above the button, left of an open window). With less than 360 px of room, and on phones, the
   window covers the screen (.cw-fs, modal) and the button hides. No greeting, no bounce, no pulse, no auto-open.
   Under the top bar and its menus (z 19 < 20), under every modal (<dialog> is in the top layer). */
.cfab{position:fixed;z-index:19;right:var(--fab-r,24px);bottom:var(--fab-b,24px);display:grid;place-items:center;width:56px;height:56px;padding:0;border:0;border-radius:50%;background:var(--blue);color:#fff;box-shadow:0 6px 16px rgba(35,131,226,.26),0 1px 3px rgba(15,15,15,.12);cursor:pointer;transition:background .15s,box-shadow .15s}
.cfab:hover{background:var(--blue-hover);box-shadow:0 8px 22px rgba(35,131,226,.3),0 2px 4px rgba(15,15,15,.14)}
.cfab:active{background:var(--blue-active)}
.cfab:focus-visible{outline:none;box-shadow:0 0 0 3px #fff,0 0 0 6px rgba(35,131,226,.5),0 6px 16px rgba(35,131,226,.26)}
.cfab>.i{grid-area:1/1;width:24px;height:24px;transition:opacity .15s,transform .15s}
.cfab>.cfab-x{opacity:0;transform:rotate(-90deg)}
.cfab[aria-expanded=true]>.cfab-i{opacity:0;transform:rotate(90deg)}
.cfab[aria-expanded=true]>.cfab-x{opacity:1;transform:none}
.cfab-n{position:absolute;top:-3px;right:-3px;min-width:21px;height:21px;padding:0 5px;border-radius:11px;background:var(--red);color:#fff;font-size:11.5px;font-weight:600;line-height:21px;text-align:center;font-variant-numeric:tabular-nums;box-shadow:0 0 0 2px #fff}
.cfab-n[hidden],.cfab[aria-expanded=true]>.cfab-n{display:none}
/* the tooltip: left of the button on hover / keyboard focus; never a hit area of its own */
.cfab-tip{position:absolute;right:calc(100% + 10px);top:50%;padding:5px 9px;border-radius:var(--r-sm);background:#2b2a27;color:#fff;font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap;transform:translateY(-50%);opacity:0;pointer-events:none;transition:opacity .12s}
.cfab:hover>.cfab-tip,.cfab:focus-visible>.cfab-tip{opacity:1;transition-delay:.3s}
/* one preview card above the button: «Имя · Группа», up to 2 lines, × (hides it, nothing is marked read) */
.cfab-pv{position:fixed;z-index:19;right:var(--fab-r,24px);bottom:calc(var(--fab-b,24px) + 68px);width:320px;max-width:calc(100vw - 32px);border:1px solid var(--line-2);border-radius:var(--r-lg);background:#fff;box-shadow:var(--sh-pop);animation:npop-in .2s var(--ease) both}
.cfab-pv[hidden]{display:none}
.cfab-pv:hover{border-color:var(--line-3)}
.cfab-pv:focus-within{box-shadow:var(--sh-pop),var(--ring)}
.cfab-pv-a{display:flex;flex-direction:column;gap:3px;padding:11px 40px 12px 14px;color:var(--text);text-decoration:none;outline:none}
.cfab-pv-a:hover{text-decoration:none}
.cfab-pv-n{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600;color:var(--text-h)}
.cfab-pv-m{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:14px;line-height:1.4;color:var(--text-2)}
/* the window, above the button at the right edge (not modal: the page under it keeps working) */
.cw{position:fixed;z-index:19;right:var(--fab-r,24px);bottom:var(--cw-b,92px);display:flex;flex-direction:column;width:380px;max-width:calc(100vw - 32px);height:var(--cw-h,min(600px,calc(100vh - 172px)));background:#fff;border-radius:var(--r-lg);box-shadow:0 8px 28px rgba(15,15,15,.10),0 2px 6px rgba(15,15,15,.06);overflow:hidden;outline:none}
.cw[hidden]{display:none}
.cw-tools{position:absolute;top:8px;right:8px;z-index:4;display:flex;gap:2px}
.cw-tools .btn.icon{width:36px;height:36px;color:var(--text-2)}
.cw-tools .btn.icon:hover{color:var(--text-h)}
.cw-more{display:none}
.cw-menu{top:calc(100% + 4px);right:0;left:auto;min-width:220px}
.cw-body{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.cw-state{flex:1;display:grid;place-content:center;justify-items:center;gap:12px;padding:56px 24px 24px;text-align:center;font-size:14px;line-height:1.5;color:var(--text-2)}
.cw-state .i{width:26px;height:26px;color:var(--text-3)}
.cw-spin{width:18px;height:18px;border:2px solid var(--line-2);border-top-color:var(--blue);border-radius:50%;animation:cw-spin .8s linear infinite}
@keyframes cw-spin{to{transform:rotate(360deg)}}
.cw-state p{margin:0}
.cw-acts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
/* the session ended / the chat was switched off while the window is there: said at its bottom, nothing reloads */
.cw-banner{flex:none;display:flex;align-items:center;gap:10px;padding:10px 12px 10px 16px;border-top:1px solid var(--line);background:var(--red-10);font-size:14px;line-height:1.4;color:var(--text)}
.cw-banner>span{flex:1;min-width:0}
/* no room above the button (a short screen, a tall composer) and every phone: the whole screen, modal */
.cw.cw-fs{z-index:60;top:0;right:0;bottom:auto;left:0;width:auto;max-width:none;height:100vh;height:calc(100dvh - var(--kb,0px));border-radius:0;box-shadow:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.cw.cw-fs .cw-tools{top:calc(8px + env(safe-area-inset-top));right:calc(6px + env(safe-area-inset-right))}
.cfab-fs .cfab,.cfab-fs .cfab-pv,.cfab-kb .cfab,.cfab-kb .cfab-pv{display:none}
body.cw-modal{overflow:hidden}
/* what sits at the bottom right moves out of the button's way: toasts above it (left of an open window), the task
   page's «to the latest» button left of it, and every page ends with room to scroll its last line (the board's
   scrollbar included) clear of it */
.cfab-on #toasts.toasts{right:var(--toast-r,20px);bottom:var(--toast-b,92px)}
.cfab-on .tp-feedwrap>.jump{right:92px}
.cfab-on .tp-feed{padding-bottom:84px} /* the last message scrolls up clear of the lifted button */
.cfab-on .page{padding-bottom:104px}
@media (max-width:767px){
  .cfab-on .page{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .cw-tools{gap:0}
  .cw-tools .btn.icon{width:44px;height:44px}
  .cw-tools>.cw-full{display:none}
  .cw-more{display:block}
}
@media print{
  .cfab,.cfab-pv,.cw,#cw-dlgs{display:none!important}
  body.cw-modal{overflow:visible}
}

/* ---------- install on a phone (R-30, ТЗ §32): the row under the login form, the profile item, the sheet ----------
   pwa.js drives it; own .pwa-* rules, the shared dialog.dlg styles stay as they are. Targets 44 px, safe areas. */
.pwa-svg{width:18px;height:18px;flex:none}
.pwa-row{margin-top:20px;padding-top:12px;border-top:1px solid var(--line)}
.pwa-row[hidden],.pwa-sheet [hidden]{display:none!important} /* .btn's inline-flex must not beat the hidden attribute */
.pwa-open{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:var(--r-sm);background:none;color:var(--blue);font-size:14.5px;font-weight:500;cursor:pointer}
.pwa-open:hover{background:var(--blue-10);color:var(--blue-hover)}
.pwa-item{max-width:860px;margin-top:22px}
.pwa-item-b{display:flex;align-items:center;gap:14px}
.pwa-item-i{display:grid;place-items:center;width:40px;height:40px;flex:none;border:1px solid var(--line-2);border-radius:10px;color:var(--text-2)}
.pwa-item-t{flex:1;min-width:0}
.pwa-item-t .help{margin-top:2px}
.pwa-item-b>.btn{min-height:44px}
@media (max-width:520px){.pwa-item-b{flex-wrap:wrap}.pwa-item-b>.btn{width:100%}}
/* a small dialog from 600 px, a bottom sheet below */
dialog.pwa-sheet{width:min(440px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 48px);padding:0;border:0;border-radius:var(--r-lg);box-shadow:var(--sh-float);background:#fff;color:var(--text);overflow:hidden}
dialog.pwa-sheet[open]{display:flex;flex-direction:column;animation:dlg-in .22s var(--ease)}
dialog.pwa-sheet::backdrop{background:rgba(15,15,15,.4)}
.pwa-h{display:flex;align-items:center;gap:8px;flex:none;padding:10px 8px 0 20px}
.pwa-h h2{flex:1;min-width:0;font-size:18px}
.pwa-x{display:grid;place-items:center;width:44px;height:44px;flex:none;border:0;border-radius:var(--r);background:none;color:var(--text-2);cursor:pointer}
.pwa-x:hover{background:var(--hover);color:var(--text-h)}
.pwa-b{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 20px 8px}
.pwa-lead{margin-bottom:16px;color:var(--text-2);font-size:14.5px}
.pwa-seg{display:flex;gap:2px;margin-bottom:18px;padding:3px;border-radius:var(--r);background:#f1f1ef}
.pwa-seg button{flex:1 1 0;min-width:0;height:38px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--text-2);font-size:14.5px;font-weight:500;cursor:pointer}
.pwa-seg button:hover{color:var(--text-h)}
.pwa-seg button[aria-pressed=true]{background:#fff;color:var(--text-h);box-shadow:0 1px 2px rgba(15,15,15,.08),0 0 0 1px rgba(15,15,15,.04)}
.pwa-steps{margin:0;padding:0;list-style:none;counter-reset:pwa}
.pwa-steps li{position:relative;min-height:26px;margin-bottom:12px;padding:1px 0 0 38px;counter-increment:pwa;line-height:1.55}
.pwa-steps li::before{content:counter(pwa);position:absolute;left:0;top:0;display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line-2);border-radius:50%;color:var(--text-2);font-size:13px;font-weight:600}
/* the browser's own glyph inline, unboxed, as it looks on the screen */
.pwa-ic{display:inline-block;margin:0 4px 0 1px;color:var(--text-h);line-height:0;vertical-align:-3px}
.pwa-ic .pwa-svg{width:18px;height:18px}
.pwa-ic .pwa-dots{width:7.2px}
.pwa-install{width:100%;margin-bottom:18px}
.pwa-note{margin:2px 0 8px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);font-size:14px;color:var(--text-2)}
.pwa-note .btn{margin-top:10px}
.pwa-inapp{margin-bottom:18px;padding:12px 14px;border:1px solid var(--blue-20);border-radius:var(--r);background:var(--blue-10);color:#1d4a78;font-size:14px}
.pwa-inapp .pwa-ic{color:#1d4a78}
.pwa-copy{display:flex;align-items:center;gap:10px;margin-top:10px}
.pwa-url{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.pwa-btn{min-height:44px}
.pwa-status{margin:0 0 8px;font-size:13.5px;color:var(--text-2)}
.pwa-status:empty{display:none}
.pwa-foot{flex:none;padding:12px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);font-size:13px;color:var(--text-2)}
.pwa-foot p+p{margin-top:4px}
.pwa-clip{position:fixed;top:0;left:0;width:1px;height:1px;opacity:0}
@keyframes pwa-up{from{opacity:0;transform:translateY(32px)}}
@media (max-width:600px){
  dialog.pwa-sheet{width:100%;max-width:100%;margin:auto 0 0;border-radius:14px 14px 0 0;max-height:calc(100dvh - 16px - env(safe-area-inset-top))}
  dialog.pwa-sheet[open]{animation:pwa-up .24s var(--ease)}
  .pwa-h{padding-left:calc(20px + env(safe-area-inset-left));padding-right:calc(8px + env(safe-area-inset-right))}
  .pwa-b,.pwa-foot{padding-left:calc(20px + env(safe-area-inset-left));padding-right:calc(20px + env(safe-area-inset-right))}
}
@media (max-height:520px){dialog.pwa-sheet{max-height:calc(100dvh - 16px)}}
@media (pointer:coarse){.pwa-seg button{height:44px}}
@media print{.pwa-row,.pwa-item,dialog.pwa-sheet{display:none!important}}
