/* v0.4.0 — задачи, заказы и склад, структура, уведомления. Те же токены и формы, что в app.css (брендбук Dudarev Motorsport). */

/* sub-navigation under «Отдел продаж» */
.sub-inner{max-width:1120px;margin:0 auto;padding:0 16px 10px}
.subtabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.subtabs::-webkit-scrollbar{display:none}
.subtab{border:0;background:var(--soft);padding:7px 14px;border-radius:999px;cursor:pointer;font-weight:600;font-size:.88rem;color:var(--ink-2);white-space:nowrap}
.subtab[aria-selected="true"]{background:var(--ink);color:var(--bg)}

.check{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:.92rem}
.check input{width:18px;height:18px;accent-color:var(--blue)}
.link-btn{border:0;background:none;padding:0;color:var(--blue);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.sm-select{width:auto;padding:7px 10px}
.seg.wrap{flex-wrap:wrap}
.chip .cnt{font-family:var(--mono);font-size:.75rem;color:var(--muted);margin-left:2px}
.chip[aria-pressed="true"] .cnt{color:var(--blue-ink)}
.av{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue-deep);font-weight:700;font-size:.8rem;letter-spacing:0}
.av.sm{width:24px;height:24px;font-size:.66rem}

/* bell & notifications */
.bell{position:relative}
.bell .bell-n{display:none;position:absolute;top:1px;right:1px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--blue);color:#fff;font:600 .66rem/17px var(--mono)}
.bell.has .bell-n{display:block}
.notif-panel{position:fixed;z-index:55;top:64px;right:16px;width:min(400px,calc(100vw - 32px));max-height:min(72vh,640px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(10,11,14,.28);overflow:hidden}
.np-head,.np-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px 10px 16px;flex-wrap:wrap}
.np-head{border-bottom:1px solid var(--line)}
.np-foot{border-top:1px solid var(--line);background:var(--soft)}
.np-list{overflow:auto;display:grid;align-content:start}
.np-item{display:grid;gap:2px;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;padding:10px 16px;cursor:pointer;color:var(--ink-2)}
.np-item:hover{background:var(--soft)}
.np-item.unread{background:var(--blue-soft);color:var(--ink)}
.np-item.unread .np-text::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--blue);margin-right:7px;vertical-align:1px}
.np-list .empty{margin:16px;border:0}
.toast{position:fixed;z-index:80;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:12px 18px;border-radius:12px;max-width:min(560px,calc(100vw - 32px));box-shadow:var(--shadow-lg);transition:opacity .2s,transform .2s}
.toast.show{opacity:1;transform:translate(-50%,0)}


/* tasks */
.task-list{display:grid;gap:8px}
.task-row{display:flex;gap:12px 16px;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;text-align:left;cursor:pointer;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 16px;color:var(--ink);transition:border-color .15s,background-color .15s}
.task-row:hover{border-color:var(--blue);background:var(--soft)}
.task-row.closed{opacity:.65}
.tr-main{display:grid;gap:4px;min-width:0;flex:1 1 320px}
.tr-title{font-weight:700;color:var(--ink);overflow-wrap:anywhere}
.tr-meta{font-size:.86rem;color:var(--ink-2)}
.tr-meta .arrow{color:var(--muted);margin:0 2px}
.tr-side{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.due{font-family:var(--mono);font-size:.78rem;padding:3px 8px;border-radius:6px;background:var(--surface);color:var(--ink-2);white-space:nowrap}
.due.red{background:var(--red-soft);color:var(--red)} .due.warn{background:var(--warn-soft);color:var(--warn)}
.task-view{display:grid;gap:16px;width:100%}
.tv-head{display:grid;gap:8px}
.tv-head h2{font-size:1.35rem;overflow-wrap:anywhere}
.tv-tags{display:flex;gap:6px;flex-wrap:wrap}
.tv-meta{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.tv-meta div{background:var(--soft);border-radius:12px;padding:10px 12px;display:grid;gap:2px}
.tv-meta dt{font-family:var(--mono);font-size:.7rem;text-transform:uppercase;color:var(--muted)}
.tv-meta dd{margin:0;font-weight:600}
.tv-body{background:var(--soft);border-radius:12px;padding:12px 14px;max-width:none}
.tv-events{display:grid;gap:8px}
.cmt{background:var(--soft);border-radius:12px;padding:10px 12px;display:grid;gap:6px;max-width:92%}
.cmt.mine{justify-self:end;background:var(--blue-soft)}
.cmt-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ev{padding:0 4px}
.tv-cmt{display:grid;gap:8px}
.tv-cmt .textarea{min-height:70px}

.req-note{font-size:.9rem;overflow-wrap:anywhere}  /* service: warranty and result */
/* structure */
.org-tree{display:grid;gap:14px}
.dept{background:var(--soft);border-radius:18px;padding:16px;display:grid;gap:12px;min-width:0}
.dept .dept{background:var(--surface)}
.dept .dept .dept{background:var(--soft)}
.dept-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.dept-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.dept-title h3{font-size:1.1rem}
.dept.lvl-0>.dept-head h3{font-size:1.3rem}
.dept-lead{display:grid;gap:6px}
.dept-kids{display:grid;gap:10px;padding-left:12px;border-left:2px solid var(--line)}
.people{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.person{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.p-main{display:grid;gap:1px;min-width:0;flex:1 1 220px}
.p-name{overflow-wrap:anywhere}
.p-duties{color:var(--ink-2)}
.p-act{display:flex;gap:4px}

/* structure: curators; service */
.dept-cur{font-size:.9rem}
.dept-cur .label{margin-right:6px}
.cur-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px 12px;max-height:220px;overflow:auto;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.due-edit{display:flex;gap:6px;align-items:center;margin-top:6px;flex-wrap:wrap}
.due-edit .input{width:auto;padding:5px 8px}
.cv-box{display:grid;gap:10px;background:var(--soft);border-radius:12px;padding:12px 14px}
.cv-take{margin-left:8px}
.sm-chip{padding:5px 10px;font-size:.84rem}
.cf-part[hidden]{display:none!important}

/* v0.4.x tracker: board, «По отделам» */
.tag.watch{background:var(--blue-soft);color:var(--blue-deep)}
.av.xs{width:22px;height:22px;font-size:.62rem;display:inline-grid;margin-right:6px;vertical-align:middle}
.board{display:grid;grid-template-columns:repeat(var(--cols),minmax(220px,1fr));gap:12px;overflow-x:auto;padding-bottom:8px;align-items:start}
.bcol{background:var(--soft);border-radius:16px;padding:10px;display:grid;gap:8px;min-height:160px;align-content:start;transition:box-shadow .15s}
.bcol.over{box-shadow:inset 0 0 0 2px var(--blue)}
.bcol h3{font-size:.85rem;font-family:var(--mono);text-transform:uppercase;margin:4px 6px;display:flex;justify-content:space-between;color:var(--ink-2)}
.bcol h3 .cnt{color:inherit}
.bcol.late{background:var(--red-soft)}.bcol.late h3{color:var(--red)}
.bcol.done{background:var(--ok-soft)}.bcol.done h3{color:var(--ok)}
.bcards{display:grid;gap:8px}
.bcard{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:grid;gap:6px;cursor:pointer;text-align:left}
.bcard:hover{border-color:var(--blue)}
.bcard[draggable="true"]{cursor:grab}
.bcard.dragging{opacity:.5}
.bcard.closed .bc-title{color:var(--muted);text-decoration:line-through}
.bc-title{font-weight:600;line-height:1.3}
.bc-meta{font-size:.82rem;color:var(--ink-2)}
.bc-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.8rem}
.depts-split{display:grid;grid-template-columns:260px 1fr;gap:16px;align-items:start}
@media (max-width:760px){.depts-split{grid-template-columns:1fr}}
.dnav{display:grid;gap:4px;background:var(--soft);border-radius:16px;padding:8px;position:sticky;top:12px}
.dnav-i{border:0;background:transparent;border-radius:10px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;color:var(--ink);font:inherit;text-align:left}
.dnav-i:hover{background:var(--surface)}
.dnav-i[aria-pressed="true"]{background:var(--blue);color:var(--blue-ink)}
.dn-c{display:flex;gap:4px}
.badge{min-width:24px;height:24px;padding:0 7px;border-radius:999px;display:inline-grid;place-items:center;font-size:.78rem;font-weight:700;background:var(--surface);color:var(--muted)}
.badge.red{background:var(--red);color:#fff}
.dnav-i[aria-pressed="true"] .badge:not(.red){background:rgba(255,255,255,.25);color:#fff}
.dpane{display:grid;gap:12px;min-width:0}
.dpane h2{margin:0}
.note.ok{background:var(--ok-soft);color:var(--ok)}
.decision{background:var(--blue-soft);border-radius:14px;padding:14px;display:grid;gap:10px}
.decision h3{margin:0;font-size:1rem}
.decision-ev{background:var(--blue-soft)}
.tv-personal{flex-wrap:wrap;align-items:center;border-top:1px solid var(--line);padding-top:10px}
.snz-date{display:inline-flex;gap:6px;align-items:center}.snz-date .input{width:auto;padding:6px 8px}
.demo-login{display:grid;gap:10px}
.demo-grid{display:grid;gap:8px;max-height:min(62vh,560px);overflow:auto;padding-right:4px}
.demo-dept{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center;background:var(--soft);border-radius:12px;padding:8px 8px 8px 12px}
.demo-dept .dd-name{font-weight:700}
.demo-dept .dd-who{font-size:.8rem;color:var(--muted)}
.demo-dept .dd-btns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}


/* v0.4.1 dashboard: KPI tiles, status bar, people table, queues */
.c-ok{color:var(--ok)}
.dash-tools{align-items:center}
.dkpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.dkpi{background:var(--soft);border-top:3px solid var(--line)}
.dkpi.good{border-top-color:var(--ok)} .dkpi.bad{border-top-color:var(--red)} .dkpi.warnc{border-top-color:var(--warn)}
.dkpi.bad b{color:var(--red)}
.small-k{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.small-k .stat{background:var(--soft)}
.dbar{display:flex;height:10px;border-radius:999px;overflow:hidden;gap:2px;background:var(--surface)}
.dbar i{display:block;min-width:6px}
.st-over{background:var(--ok)} .st-ok{background:var(--blue)} .st-behind{background:var(--warn)} .st-lose{background:var(--red)} .st-idle{background:var(--line)}
.chip.st-chip-ok[aria-pressed="true"]{background:var(--ok);border-color:var(--ok);color:#fff}
.chip.st-chip-late[aria-pressed="true"]{background:var(--red);border-color:var(--red);color:#fff}
.chip.st-chip-behind[aria-pressed="true"]{background:var(--warn);border-color:var(--warn);color:#fff}
.dtable td{vertical-align:top}
.dtable td .why{display:inline-block;max-width:220px;white-space:normal;margin-top:4px}
.sort-btn{border:0;background:none;padding:0;font:inherit;font-family:var(--mono);font-size:.72rem;text-transform:uppercase;color:var(--muted);cursor:pointer;white-space:nowrap}
.sort-btn[aria-pressed="true"]{color:var(--ink)}
.r .sort-btn{text-align:right}
.pcell{min-width:170px}
.pnum{font-size:.88rem;white-space:nowrap}
.pace.ok{color:var(--ok);font-weight:700} .pace.warn{color:var(--warn);font-weight:700}
.pbar{position:relative;height:8px;border-radius:999px;background:var(--surface);margin-top:6px;overflow:visible}
.small-k .pbar,.dkpis .pbar{background:var(--bg)}
.pbar i{position:absolute;inset:0 auto 0 0;border-radius:999px;background:var(--blue)}
.pbar i.ok{background:var(--ok)} .pbar i.warn{background:var(--warn)}
.pbar s{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--ink);border-radius:1px}
.spark rect{fill:var(--blue);opacity:.45} .spark rect.now{opacity:1}
.dgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:14px;align-items:start}
.dlist{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.dlist li{display:grid;gap:1px;min-width:0}
.dl-t{text-align:left;font-weight:600;overflow-wrap:anywhere}
.dl-t[disabled]{color:var(--ink-2);cursor:default;text-decoration:none}
.small-t td,.small-t th{padding:8px 6px}
.plan-form .actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.plan-form .input{width:140px}
.rules ul{display:grid;gap:8px;padding-left:18px;margin:0}
.rules p{margin:0}
.rules{gap:12px}

/* ---------------------------------------------------------------- v0.5.0 */
body.modal-open{overflow:hidden}
.sales-link{gap:5px;color:var(--ink-2)}
.sales-link svg{opacity:.7}
.ship-form.narrow{width:min(480px,100%);justify-self:center}
.three{display:grid;grid-template-columns:1fr 150px 1fr;gap:12px}
@media (max-width:640px){.three{grid-template-columns:1fr 1fr}.three>:first-child{grid-column:1/-1}}
.note.ok{background:var(--ok-soft);color:var(--ok)}
.more-row{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap}
@media (hover:none){.hide-touch{display:none}}
/* task list: filters, rows with a sound switch for «На контроле» */
.t-filters .input{flex:1 1 240px}
.row-wrap{display:flex;gap:8px;align-items:stretch}
.row-wrap .task-row{flex:1;min-width:0}
.snd-btn{color:var(--ink-2);gap:6px;flex:none}
.row-wrap .snd-btn{background:var(--soft);border-radius:12px;padding:0 14px}
.snd-btn[aria-pressed="false"]{color:var(--muted)}
.tr-parent{font-weight:500}
/* the form: people as chips, repeat schedule */
.pchips{display:flex;gap:6px;flex-wrap:wrap;min-height:32px;align-items:center}
.pchip{display:inline-flex;align-items:center;gap:4px;background:var(--blue-soft);color:var(--ink);border-radius:999px;padding:4px 6px 4px 12px;font-size:.88rem;font-weight:600}
.pchip-x{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:1rem;line-height:1;width:24px;height:24px;border-radius:50%}
.pchip-x:hover{background:var(--surface);color:var(--danger)}
.check>span{line-height:1.4}
.rep-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.rep-row>.select{width:auto}
.wd-pick{display:inline-flex;gap:4px;flex-wrap:wrap}
.wd{position:relative}
.wd input{position:absolute;opacity:0;inset:0;cursor:pointer}
.wd span{display:inline-grid;place-items:center;min-width:38px;height:34px;border-radius:8px;background:var(--soft);font-size:.82rem;font-weight:600;color:var(--ink-2)}
.wd input:checked+span{background:var(--blue);color:var(--blue-ink)}
.wd input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}
.rep-day{display:inline-flex;gap:6px;align-items:center}.rep-day .input{width:76px;padding:7px 10px}
.tf-more{border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.tf-more summary{cursor:pointer;font-weight:600;color:var(--ink-2)}
.tf-more[open] summary{margin-bottom:12px}
.tf-more>.field+.field{margin-top:12px}
/* the task card */
.tv-parent{justify-self:start}
.tv-add{margin-left:8px;font-weight:500}
.tv-meta dd .due-edit .input[type="time"]{width:110px}
.tv-who{font-size:.88rem;color:var(--ink-2);display:flex;gap:6px 10px;flex-wrap:wrap;align-items:baseline}
.tv-who .label{margin-right:2px}
.who-list{flex-basis:100%;margin:4px 0 0;padding:10px 14px 10px 28px;background:var(--soft);border-radius:12px;display:grid;gap:4px}
.tv-main{padding:4px 0}
.tv-main .btn{min-height:44px;padding-inline:20px}
.tv-second{border-top:1px solid var(--line);padding-top:10px}
.tv-sec{display:grid;gap:10px;background:var(--soft);border-radius:14px;padding:12px 14px}
.tv-sec h3{font-size:.95rem;display:flex;gap:8px;align-items:baseline}
.subs{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.subs li{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 4px;border-radius:8px}
.subs li:hover{background:var(--surface)}
.subs li .check input{width:18px;height:18px}
.subs li.done .sub-t{color:var(--muted);text-decoration:line-through}
.sub-t{text-decoration:none;color:var(--ink);font-weight:600;text-align:left}
.sub-t:hover{text-decoration:underline}
.sub-add{display:flex;gap:8px}
.sub-add .input{padding:7px 10px}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.thumb{position:relative}
.thumb-b{display:block;width:100%;aspect-ratio:1;border:0;padding:0;border-radius:10px;overflow:hidden;cursor:zoom-in;background:var(--surface)}
.thumb-b img{width:100%;height:100%;object-fit:cover;display:block;max-height:none;border-radius:0}
.thumb-x{position:absolute;top:4px;right:4px;width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,40,90,.55);color:#fff;cursor:pointer;font-size:.95rem;line-height:1}
.docs{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.docs li{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.file-ic.red{background:var(--red)}.file-ic.ok{background:var(--ok)}.file-ic.blue{background:var(--blue)}
.cmt-act{margin-left:auto;display:inline-flex;gap:10px}
.link-btn.danger{color:var(--danger)}
.mention{color:var(--blue);font-weight:600;background:var(--blue-soft);border-radius:4px;padding:0 3px}
.cmt.mine .mention{background:var(--surface)}
.mention-wrap{position:relative}
.mention-pop{position:absolute;left:8px;bottom:calc(100% + 4px);z-index:5;min-width:240px;max-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(10,11,14,.18);padding:4px;display:grid}
.mp-i{display:flex;gap:8px;align-items:center;border:0;background:transparent;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer;font-weight:500;color:var(--ink)}
.mp-i[aria-selected="true"],.mp-i:hover{background:var(--blue-soft)}
.gal-back{margin-right:auto}
.ap-dept{display:grid;gap:4px;padding:4px 0}
/* new alerts pop up in the bottom right corner; the feedback toast stays in the middle */
.ntoasts{position:fixed;z-index:85;right:16px;bottom:16px;display:grid;gap:10px;width:min(380px,calc(100vw - 32px))}
.ntoast{display:flex;align-items:stretch;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);overflow:hidden;animation:nt-in .22s cubic-bezier(.16,1,.3,1)}
.ntoast.urgent{border-color:var(--red);background:#FFF8F9}
.ntoast.out{opacity:0;transform:translateY(6px);transition:opacity .25s,transform .25s}
.nt-open{flex:1;display:grid;gap:2px;text-align:left;border:0;background:transparent;color:inherit;padding:12px 14px;cursor:pointer;min-width:0}
.nt-k{font-family:var(--mono);font-size:.68rem;text-transform:uppercase;color:var(--blue);display:flex;align-items:center;gap:6px}
.nt-k::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.ntoast.urgent .nt-k{color:var(--red)}
.nt-t{font-size:.9rem;line-height:1.4;overflow-wrap:anywhere}
.nt-x{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:1.15rem;width:40px;flex:none}
.nt-x:hover{color:var(--ink)}
@keyframes nt-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.ntoast{animation:none}.ntoast.out{transition:none}}
@media (max-width:640px){.ntoasts{right:8px;left:8px;bottom:8px;width:auto}.toast{bottom:auto;top:16px}}
/* «Управление» */
.u-act{text-align:right;white-space:nowrap}
.u-act .muted{display:block;white-space:normal;text-align:left;margin-top:4px;max-width:320px}
.users .input,.users .select{padding:7px 10px;min-width:150px}
.input.saved{border-color:var(--ok);box-shadow:0 0 0 3px var(--ok-soft)}
/* journal */
.j-tools .input[type="search"]{flex:1 1 220px}
.j-date{display:inline-flex;gap:6px;align-items:center}.j-date .input{width:auto;padding:7px 10px}
.jlist{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.j-day{font-family:var(--mono);font-size:.72rem;text-transform:uppercase;color:var(--muted);padding:14px 4px 6px}
.j-row{display:grid;grid-template-columns:52px auto minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:9px 12px;border-radius:10px;background:var(--soft)}
.j-row.j-warn{background:var(--red-soft)}
.j-time{font-family:var(--mono);font-size:.8rem;color:var(--muted)}
.j-main{min-width:0;overflow-wrap:anywhere}
.j-text{text-align:left;color:var(--ink-2)}
button.j-text{color:var(--ink);text-decoration:none}
button.j-text:hover{text-decoration:underline;color:var(--blue)}
.j-ip{font-family:var(--mono)}
@media (max-width:640px){.j-row{grid-template-columns:44px minmax(0,1fr)}.j-row .tag{display:none}.j-ip{grid-column:2}}
/* login: where the sales portal moved */
.login-move{grid-column:1/-1;justify-self:center;max-width:640px;text-align:center;font-size:.9rem;color:var(--ink-2);background:var(--soft);border-radius:12px;padding:10px 16px}

/* ---------------------------------------------------------------- v0.5.0 polish: white + brand blue, phone first */
.ico{flex:none;vertical-align:-2px}
.tmeta{display:inline-flex;align-items:center;gap:4px;font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.tag .ico{margin-right:3px}
.tag.watch .ico{margin:0}
/* header: a compact user menu */
.umenu{position:relative}
.umenu-b{gap:8px;padding:4px 10px 4px 4px}
.umenu-b .av{background:var(--blue);color:var(--blue-ink)}
.umenu-p{position:absolute;right:0;top:calc(100% + 6px);z-index:60;min-width:240px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);padding:6px;display:grid}
.umenu-who{display:grid;gap:2px;padding:10px 12px;border-bottom:1px solid var(--line);margin-bottom:4px}
.umenu-i{display:flex;align-items:center;gap:6px;border:0;background:transparent;text-align:left;padding:10px 12px;border-radius:10px;cursor:pointer;color:var(--ink);font:inherit;font-weight:500;text-decoration:none;min-height:44px}
.umenu-i:hover{background:var(--soft)}
.umenu-sales{display:none}
/* task card: the current step first, the rest under «Ещё» */
.tv-personal .btn.watching{background:var(--blue-soft);color:var(--blue-deep)}
.tv-personal .btn[data-watch] .ico{margin-right:2px}
.tv-more{position:relative}
.tv-more>summary{list-style:none}
.tv-more>summary::-webkit-details-marker{display:none}
.tv-more>summary::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translate(-2px,-2px);margin-left:6px;opacity:.7}
.tv-more[open]>summary::after{transform:rotate(-135deg) translate(-1px,-1px)}
.tv-more-body{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0 2px}
.tv-dueopen{margin-left:8px;font-weight:500}
.btn.armed{background:var(--red-soft);color:var(--red)}
.toast{display:flex;gap:14px;align-items:center}
.toast.show{pointer-events:auto}
.toast-act{font-weight:600;white-space:nowrap}
.t-ftoggle{display:none}
/* phone: the shell gives the screen back to the work */
@media (max-width:760px){
  .top{position:static}
  .top-inner{padding:8px 12px;gap:8px}
  .top .logo{height:26px}
  .sales-link{display:none}
  .umenu-sales{display:flex}
  .umenu-n{display:none}
  .umenu-b{padding:4px}
  main{padding-block:16px 56px;gap:16px}
  .head h1,h1{font-size:1.5rem}
  .head-row>.head p{display:none}
  .seg.wrap.t-views{flex-wrap:nowrap;overflow-x:auto;max-width:100%;min-width:0;scrollbar-width:none}
  .toolbar:has(>.t-views){flex-wrap:nowrap;min-width:0}
  .t-filters .chips{min-width:0}
  .seg.wrap.t-views button{flex:none}
  .t-filters>.select{display:none}
  .t-filters.open>.select{display:block;flex:1 1 45%}
  .t-ftoggle{display:inline-flex}
  .t-filters .chips{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:2px}
  .chip,.seg button,.btn.sm{min-height:40px}
  .task-row{padding:12px 14px}
  .dnav{position:static;display:flex;overflow-x:auto;gap:6px;padding:6px}
  .dnav-i{flex:none;padding:8px 12px !important}
  .modal{padding:0;place-items:stretch}
  .modal-card{width:100%;max-height:none;height:100%;border-radius:0}
  .tv-meta{grid-template-columns:1fr 1fr}
  .tv-main .btn{flex:1 1 auto}
  .ntoasts{bottom:8px}
}
/* keyboard: the hidden file input shows its focus on the visible button; table rows that open a card are focusable */
.file-btn:focus-within{outline:2px solid var(--blue);outline-offset:2px}
tr[tabindex]:focus-visible td{background:var(--blue-soft)}
tr[tabindex]{cursor:pointer}
#t-checklists:empty{display:none}
/* demo login: the second button is a button too */
.demo-login .btn:not(.primary){background:var(--surface);border:1px solid var(--line)}
/* «Ещё» takes no room while closed and a whole row when open; the card never gets wider than the phone */
.tv-more:not([open])>.tv-more-body{display:none}
.tv-more[open]{flex-basis:100%}
.snz-date{flex-wrap:wrap}
.task-view{min-width:0}
.tv-meta dd{overflow-wrap:anywhere;min-width:0}
@media (max-width:760px){.tv-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.tv-who{display:block}.tv-who>*{margin-right:6px}}
/* ---------- v0.5.2 «телефон не ломается» ---------- */
/* the page column may shrink: a row of filter chips no longer stretches the whole page past the phone screen */
main{grid-template-columns:minmax(0,1fr)}
main>*{min-width:0}
/* a window is never wider than its card: wide tables scroll inside instead of pushing «Закрыть» off the screen */
.modal-card,.modal-body{grid-template-columns:minmax(0,1fr)}
/* the save row of a form stays at the bottom of the window while the form scrolls */
.form-body>form>.actions:last-child{position:sticky;bottom:-16px;z-index:3;background:var(--surface);margin:0 -16px -16px;padding:12px 16px;border-top:1px solid var(--line)}
/* incoming notifications never lie over a window's buttons: while a window is open they wait underneath it */
body.modal-open .ntoasts{z-index:45}
@media (max-width:760px){
  /* fields at 16px: with less, iPhone zooms the page on every tap into a field */
  .input,.textarea,.select,textarea,select,input[type="search"],input[type="text"],input[type="password"],input[type="date"],input[type="time"]{font-size:16px}
  /* filter chips keep their size and scroll in one row instead of squeezing into tall bubbles */
  .t-filters .chips .chip,.seg.wrap.t-views button{flex:none;white-space:nowrap}
  .toolbar .input{min-width:0}
  /* a long window title wraps instead of hiding «Закрыть» */
  .modal-head h3{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.3}
  /* full-screen windows keep clear of the notch and the home bar */
  .modal-card{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
  .modal{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
  /* the confirmation toast spans the screen in a line or two instead of a narrow column over the header */
  .toast{left:8px;right:8px;top:calc(8px + env(safe-area-inset-top,0px));bottom:auto;max-width:none;transform:translateY(-12px)}
  .toast.show{transform:none}
  .ntoasts{bottom:calc(8px + env(safe-area-inset-bottom,0px))}
}
/* a phone on its side: the header scrolls away and the content keeps clear of the notch */
@media (orientation:landscape) and (max-height:500px){
  .top{position:static}
  .top-inner,main{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
}
/* touch screens get finger-sized buttons at any width — unfolded foldables and tablets included */
@media (pointer:coarse){
  .btn,.btn.sm,.chip,.seg button,.tab{min-height:44px}
  .modal-head .btn{min-width:64px}
}
/* ---------- v0.5.3 ---------- */
/* «Готово» right in the row */
.row-wrap.has-check{align-items:stretch;gap:6px}
.tr-check{flex:none;width:44px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--muted);border-radius:12px;padding:0}
.tr-check svg{width:26px;height:26px}
.tr-check .ck{opacity:0;transition:opacity .15s}
.tr-check:hover,.tr-check:focus-visible{color:var(--ok);background:var(--ok-soft)}
.tr-check:hover .ck,.tr-check:focus-visible .ck,.tr-check.done .ck{opacity:1}
.tr-check.done{color:var(--ok)}
.tr-check[data-to="review"]:hover,.tr-check[data-to="review"]:focus-visible{color:var(--blue);background:var(--blue-soft)}
/* «Ещё» and «Что нового» */
.more-list{display:grid;gap:4px;width:min(480px,100%);justify-self:center}
.more-who{display:flex;gap:12px;align-items:center;padding:6px 4px 12px}
.more-who>span:last-child{display:grid}
.more-list hr{border:0;border-top:1px solid var(--line);margin:8px 0}
.more-i{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;padding:10px 14px;border:0;border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.more-i:hover{background:var(--blue-soft)}
.more-i.danger{color:var(--danger)}
.news{display:grid;gap:18px;width:min(620px,100%);justify-self:center}
.news-v h3{margin:0 0 8px}
.news-v ul{margin:0;padding-left:20px;display:grid;gap:8px;line-height:1.5}
.news-act{justify-content:flex-end}
/* the bottom bar: hidden on a computer */
.bnav{display:none}
.bn{border:0;background:transparent;display:grid;justify-items:center;align-content:center;gap:2px;padding:4px 2px;border-radius:14px;color:var(--ink-2);font:inherit;font-size:.68rem;font-weight:600;letter-spacing:-.01em;cursor:pointer;position:relative;min-height:54px;min-width:0}
.bn>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.bn svg{width:23px;height:23px}
.bn[aria-current="page"]{color:var(--blue)}
.bn-plus .bn-i{width:44px;height:36px;border-radius:14px;background:var(--blue);color:var(--blue-ink);display:grid;place-items:center;box-shadow:0 4px 12px rgba(0,107,230,.28)}
.bn-plus{color:var(--blue)}
.bn-n{position:absolute;top:3px;left:calc(50% + 5px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font-size:.66rem;font-weight:700;display:none;place-items:center;line-height:1}
.bn-n.has{display:grid}
@media (max-width:760px),(pointer:coarse){
  .bnav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;z-index:40;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:4px 6px calc(4px + env(safe-area-inset-bottom,0px));box-shadow:0 -6px 20px rgba(8,32,68,.07)}
  .top .tabs,.top .who,#t-new{display:none}
  main{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  .credits{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  .ntoasts{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .notif-panel{top:auto;bottom:calc(74px + env(safe-area-inset-bottom,0px));left:8px;right:8px;width:auto;max-height:min(70dvh,560px)}
}
/* unfolded foldables and tablets: a dock in the middle */
@media (min-width:600px) and (max-width:760px),(min-width:600px) and (pointer:coarse){
  .bnav{left:50%;right:auto;transform:translateX(-50%);bottom:calc(14px + env(safe-area-inset-bottom,0px));width:min(500px,calc(100% - 32px));border:1px solid var(--line);border-radius:24px;padding:6px 8px;box-shadow:var(--shadow-lg)}
  .notif-panel{left:50%;right:auto;transform:translateX(-50%);width:min(440px,calc(100% - 32px));bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  .ntoasts{bottom:calc(98px + env(safe-area-inset-bottom,0px))}
  .toast{bottom:calc(98px + env(safe-area-inset-bottom,0px))}
}
.news,.cl-modal,.more-list{align-content:start}
@media (max-width:760px){.news-act{display:grid;grid-template-columns:1fr 1fr;gap:8px}.news-act #news-ok{grid-column:1/-1;order:-1;min-height:48px}.news-act:not(:has(#news-all)) #news-idea{grid-column:1/-1}}
@media (max-width:380px){.bn{font-size:.6rem;letter-spacing:-.02em}}
.bn{grid-template-rows:36px auto;align-content:center}.bn>svg{align-self:center}.bn-plus .bn-i{align-self:center}
/* rows that scroll sideways: no scrollbar strip, the edge fades where there is more to swipe */
@media (max-width:760px){
  .t-filters .chips,.seg.wrap.t-views{scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .t-filters .chips::-webkit-scrollbar,.seg.wrap.t-views::-webkit-scrollbar{display:none}
  .fade-r{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent)}
  .fade-l{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 40px),transparent)}
  .fade-l.fade-r{-webkit-mask-image:linear-gradient(to right,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
}
/* «Что нового»: pictures of the update (v0.5.4) */
.news{width:min(880px,100%)}
.news-pics{display:grid;grid-template-columns:1fr;gap:18px;margin-top:16px}
.news-pics a{display:grid;gap:6px;color:var(--muted);font-size:.85rem;text-decoration:none}
.news-pics img{width:100%;height:auto;max-height:none;border-radius:14px;border:1px solid var(--line);background:#fff}
.news-pics a:hover img{border-color:var(--blue)}
