﻿@charset "UTF-8";
/* Oteamos — ОБЩИЕ СТИЛИ (токены + хром + переиспользуемые компоненты) */

/* Сегодня (it-lead-D-today.html) */

:root{
  --space-1:calc(4px * var(--density)); --space-2:calc(8px * var(--density));
  --space-3:calc(12px * var(--density)); --space-4:calc(16px * var(--density));
  --space-5:calc(20px * var(--density)); --space-6:calc(24px * var(--density));
  --space-7:calc(28px * var(--density));
  --space-8:calc(32px * var(--density));   /* шкала base-4 продолжена; шаг блоков шторки — 40 = --space-8 + --space-2 (§9.25) */
  --btn-pill-w:106px;
  /* акценты — названы по роли, а не по цвету, значения можно менять не трогая CSS */
  --accent-primary:#5A7489;         /* было --navy #7B93A8; затемнено для AA-контраста на card/canvas (было 3.0-3.2:1) */
  --accent-primary-soft:#E7ECEF;    /* новый: светлый тон accent-primary для выделения выбранной строки (список «Кому») */
  --accent-secondary:#517F79;       /* было --teal #6FA39D; затемнено для AA-контраста */
  --accent-highlight:#B95C30;       /* было --gold #D98F6C; затемнено для AA-контраста на светлых поверхностях */
  --accent-highlight-soft:#F6E4D8;  /* было --goldl, без изменений */
  --accent-highlight-strong:#95542F;/* было #B06A45 (3.41:1 на --accent-highlight-soft — не проходил
    AA даже для мелкого жирного текста, реальное использование 11.5-12px); затемнено до 4.74:1 */
  --accent-highlight-on-dark:#E1A68A; /* новый: светлый тон для текста поверх --ink-strong (раньше --gold на --charcoal = 3.72:1, не проходило) */

  /* статусы */
  --status-positive:#637C59;        /* было --green #86A17C; затемнено для AA-контраста */
  --status-positive-soft:#EAF0E5;   /* было --greenl, без изменений */
  --status-positive-strong:#4C6342; /* новый: тёмный тон для МЕЛКОГО зелёного текста/глифов на soft/canvas
    (--status-positive #637C59 давал 3.97:1 на soft и 4.34:1 на canvas — не проходил AA для обычного
    текста <18px). 5.71:1 на soft, 6.24:1 на canvas — WCAG AA. Тот же паттерн, что --accent-highlight-strong */
  --status-caution:#A16017;         /* янтарный (был #937136, амбер-коричневый — заменён по просьбе
    заказчика, «болотно-коричневых» тонов в проекте быть не должно); 4.7:1 как текст на canvas,
    5.0:1 белого текста на заливке (пилюля .idept.cl, .blocked-toggle.on) — WCAG AA в обоих случаях */
  --status-urgent:#C1493A;          /* было --red, контраст уже был в порядке, не менялся */
  --status-urgent-soft:#F7E4DE;     /* было --redl, без изменений */

  /* поверхности и текст */
  --surface-canvas:#FAF8F3;         /* было --canvas, без изменений */
  --surface-card:#FFFFFF;           /* было --card, без изменений */
  --surface-muted:#F1EEE7;          /* было --greyl, без изменений */
  --text-primary:#33302A;           /* было --ink, без изменений */
  --text-secondary:#686B70;         /* холодный сланцевый (был #767166, болотно-коричневый —
    заменён по просьбе заказчика: этот тон шёл вторичным текстом ВЕЗДЕ — даты, подписи, роли —
    и «красил» весь интерфейс в грязный оттенок); 4.9:1 на canvas, 5.2:1 на card — WCAG AA */
  --ink-strong:#4A4438;             /* было --charcoal, без изменений */
  --border-default:#E9E4D9;         /* было --line, без изменений */
  --border-neutral:#CBC4B5;         /* было --neutral, без изменений */
  --border-accent:#D3DDE3;          /* граница «Северной звезды»/акцентных карточек координаторского архетипа */
  --page-bg:#EBE6DC;                /* внешняя рамка вокруг канвы #app — было хардкодом в body, теперь токеном (задел на тему) */
  --shadow: var(--shadow-1);
  /* heat-шкала (розовый/жёлтый/зелёный) для карточек */
  --hot-warn-bg:#F8EEDD; --hot-warn-bd:#E6CDA6;
  --hot-crit-bg:#FBE7E0; --hot-crit-bd:#EBC3B7;

  --state-positive-surface:#D3E2C2; --state-positive-border:#C9DCB3; --state-positive-label:#46613D;
  --state-positive-strong:#2E4527; --state-positive-muted:#628257; --state-positive-foot:#496538;
  --state-positive-divider:rgba(36,55,31,.14);

  --state-caution-surface:#EEDAC4; --state-caution-border:#DEB17C; --state-caution-label:#885011;
  --state-caution-strong:#663B0A; --state-caution-foot:#794B15;
  --state-caution-divider:rgba(102,59,10,.16);

  --state-critical-surface:#EFC9C2; --state-critical-border:#E0A99A; --state-critical-label:#7A2E22;
  --state-critical-strong:#6B2419; --state-critical-foot:#8E4030;
  --state-critical-divider:rgba(107,36,25,.16);

  --on-state-secondary:#54575D;   /* пара --text-secondary   (5.32/5.33/4.76) */
  --on-state-positive:#41563A;    /* пара --status-positive  (5.90/5.91/5.27) */
  --on-state-urgent:#8E3A2A;      /* пара --status-urgent    (5.53/5.54/4.95) */

  --on-soft-accent:#4F6779;       /* пара --accent-primary   (минимум 4.76) */
  --on-soft-urgent:#B03F31;       /* пара --status-urgent    (минимум 4.69) */
  --on-soft-positive:#54694C;     /* пара --status-positive  (минимум 4.82) */
  --on-soft-caution:#935713;      /* пара --status-caution   (минимум 4.67) */

  --font-ui:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --font-display:var(--font-ui);   /* заголовки: скин может дать им свой шрифт */
  --radius-scale:1;                /* 0 — прямые углы, 1.5 — мягкая пластика */
  --density:1;                     /* плотность: 0.85 — компактно, 1.15 — просторно */

  --shadow-1:0 1px 2px rgba(51,48,42,.05), 0 8px 24px rgba(51,48,42,.06);
  --shadow-2:0 10px 26px rgba(51,48,42,.28);
  --shadow-3:0 20px 60px rgba(51,48,42,.18);
  --shadow-toast:0 14px 34px rgba(51,48,42,.24);   /* тост и диалог — над всем */
  --shadow-chip:0 8px 24px rgba(51,48,42,.28);     /* плавающая пилюля */
  --shadow-knob:0 1px 2px rgba(51,48,42,.3);       /* кружок тумблера */
  --shadow-sheet:0 0 30px rgba(51,48,42,.18);      /* шторка снизу */

  --text-on-accent:#FFFFFF;
  --text-on-dark:#EDE7D9;          /* подпись на --ink-strong (плашка-макет, кнопки) */
  --surface-hover:#F4F1EC;         /* подсветка строки под курсором */
  --text-placeholder:#ABA79E;
  --text-muted-num:#8A8578;        /* «из 12» в счётчиках */
  --text-pale:#A9C39A;

  /* Оттенки, которые раньше стояли литералами в правилах */
  --border-accent-soft:#CFD9E0;    /* граница выбранного чипа на accent-primary-soft */
  --border-highlight-soft:#EBD3C2; /* то же для accent-highlight-soft */
  --border-primary-soft:#D6DEE3;
  --ink-strong-hover:#3B3629;
  --status-positive-line:#9DBE8C;  /* левая полоса выполненной строки */
  --status-positive-icon:#CFE3C2;
  --status-positive-text:#47623E;
  --status-positive-trend:#5E7A55;
  --chart-undone:#3C526B;

  --hbar-pos-1:#8FB379; --hbar-pos-2:#52803F; --hbar-pos-urg:#24371F; --hbar-pos-empty:#EDF3E5;
  --hbar-warn-1:#D7A975; --hbar-warn-2:#C37822; --hbar-warn-empty:#F1E2D0;
  --hbar-crit-1:#DE9C8C; --hbar-crit-2:#B85C42; --hbar-crit-urg:#5C2015; --hbar-crit-empty:#F7E2DC;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
[hidden]{display:none !important;}
html,body{margin:0;padding:0;}
body{background:var(--page-bg); color:var(--text-primary);
  font-family:var(--font-ui);
  -webkit-font-smoothing:antialiased; padding:var(--space-5);
  display:flex; justify-content:center; align-items:flex-start; gap:var(--space-5); flex-wrap:wrap;}
#app{max-width:520px; margin:0 auto; background:var(--surface-canvas); height:min(940px, calc(100vh - 40px)); position:relative;
  display:flex; flex-direction:column; border-radius:calc(26px * var(--radius-scale)); overflow:hidden; box-shadow:var(--shadow-3);}
.screen{flex:1; overflow-y:auto; padding-bottom:88px; scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch;}
.screen::-webkit-scrollbar{width:0; height:0; display:none;}
.tnum{font-variant-numeric:tabular-nums; white-space:nowrap;}

.mock-ribbon{background:var(--ink-strong); color:var(--text-on-dark); font-size:12px; letter-spacing:.04em;
  text-align:center; padding:var(--space-1) var(--space-3); font-weight:600;}
.mock-ribbon b{color:var(--accent-highlight-on-dark);}

.topbar{position:sticky; top:0; z-index:20; background:var(--surface-canvas); padding:var(--space-4) var(--space-4) var(--space-2);
  display:flex; align-items:center; gap:var(--space-3);}
.topbar-mid{flex:1; min-width:0;}
.topbar-date{font-size:13px; color:var(--text-secondary); text-transform:capitalize;}
.topbar-role{font-size:16px; font-weight:700;}
/* строка «название · шестерёнка порядка/видимости» — шестерёнка вплотную к названию слева */
.topbar-role-row{display:flex; align-items:center; gap:var(--space-2); min-width:0;}
.title-gear{flex:0 0 auto; width:28px; height:28px; border-radius:calc(9px * var(--radius-scale)); border:1px solid var(--border-default);
  background:var(--surface-card); color:var(--text-secondary); cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;}
.title-gear svg{width:16px; height:16px;}
.title-gear:hover{background:var(--surface-muted); color:var(--text-primary);}
.title-gear:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.tb-btn{width:36px; height:36px; border-radius:calc(12px * var(--radius-scale)); background:var(--surface-card); border:1px solid var(--border-default);
  display:flex; align-items:center; justify-content:center; color:var(--text-secondary); flex:0 0 auto; cursor:pointer; position:relative;}
.tb-avatar{width:36px; height:36px; border-radius:calc(12px * var(--radius-scale)); background:var(--accent-primary); color:var(--text-on-accent); font-weight:700;
  font-size:13px; display:flex; align-items:center; justify-content:center; flex:0 0 auto;}
.tb-add{background:var(--accent-highlight); border-color:var(--accent-highlight); color:var(--text-on-accent);}

/* единая цветовая кодировка цифр счётчиков: срочно / решено */
.n-urgent{color:var(--status-urgent); font-weight:800;}
.n-total{color:var(--text-muted-num); font-weight:700;}
.n-pale{color:var(--text-pale); font-weight:600;}

.solved{margin:var(--space-1) var(--space-4) var(--space-2); background:var(--hb); border:1px solid var(--hbd);
  border-radius:calc(16px * var(--radius-scale)); padding:var(--space-4) var(--space-4); box-shadow:var(--shadow);
  --hb:var(--state-positive-surface); --hbd:var(--state-positive-border); --hcap:var(--state-positive-label);
  --hnum:var(--state-positive-strong); --hfoot:var(--state-positive-foot);
  --hbar1:var(--hbar-pos-1); --hbar2:var(--hbar-pos-2); --hbarurg:var(--hbar-pos-urg); --hbarempty:var(--hbar-pos-empty); --hdiv:var(--state-positive-divider);}
.solved.warn{--hb:var(--state-caution-surface); --hbd:var(--state-caution-border); --hcap:var(--state-caution-label);
  --hnum:var(--state-caution-strong); --hfoot:var(--state-caution-foot);
  --hbar1:var(--hbar-warn-1); --hbar2:var(--hbar-warn-2); --hbarurg:var(--state-caution-strong); --hbarempty:var(--hbar-warn-empty); --hdiv:var(--state-caution-divider);}
.solved.crit{--hb:var(--state-critical-surface); --hbd:var(--state-critical-border); --hcap:var(--state-critical-label);
  --hnum:var(--state-critical-strong); --hfoot:var(--state-critical-foot);
  --hbar1:var(--hbar-crit-1); --hbar2:var(--hbar-crit-2); --hbarurg:var(--hbar-crit-urg); --hbarempty:var(--hbar-crit-empty); --hdiv:var(--state-critical-divider);}
.solved-top{display:flex; align-items:flex-end; gap:var(--space-4); min-height:96px;}
.solved-l{flex:0 0 auto; display:flex; flex-direction:column; align-items:center; text-align:center;}
.solved-cap{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--hcap);}
.solved-num{line-height:1; margin-top:var(--space-2); font-variant-numeric:tabular-nums; white-space:nowrap;}
.solved-num .n-pale{font-size:46px; color:var(--hnum); font-weight:800; letter-spacing:-.02em;}
.solved-chart{flex:1; display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-1); height:88px;}
.solved-foot{display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-top:var(--space-3);
  padding-top:var(--space-3); border-top:1px solid var(--hdiv); font-size:13px; color:var(--hfoot);}
.solved-foot .flag-ct{display:flex; align-items:center; gap:var(--space-1); color:var(--on-state-urgent); font-weight:700; flex:0 0 auto;}
.solved-foot .flag-ct svg{width:12px; height:12px; flex:0 0 auto;}
.hero-status-word{font-weight:800; color:var(--hnum, var(--hfoot));}
.sc-col{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:var(--space-1); height:100%;}
.sc-bar{width:100%; max-width:14px; border-radius:calc(4px * var(--radius-scale)) calc(4px * var(--radius-scale)) calc(2px * var(--radius-scale)) calc(2px * var(--radius-scale)); background:var(--hbar1); position:relative; overflow:hidden;}
.sc-bar.today{background:var(--hbar2);}
.sc-bar.empty{background:var(--hbarempty);}
.sc-bar .urg{position:absolute; left:0; right:0; bottom:0; background:var(--hbarurg); border-radius:0 0 calc(2px * var(--radius-scale)) calc(2px * var(--radius-scale));}
.sc-d{font-size:12px; color:var(--hfoot); font-weight:600;}
.sc-col.today .sc-d{color:var(--hnum); font-weight:800;}

/* сегмент Сегодня / Все */
.seg{display:flex; gap:var(--space-1); background:var(--surface-muted); border-radius:calc(12px * var(--radius-scale)); padding:var(--space-1); margin:var(--space-2) var(--space-4) var(--space-1);}
.seg button{flex:1; font-family:inherit; text-align:center; font-size:14px; font-weight:700; color:var(--text-secondary);
  padding:var(--space-2) 0; border:0; background:transparent; border-radius:calc(8px * var(--radius-scale)); cursor:pointer;}
.seg button.on{background:var(--surface-card); color:var(--text-primary); box-shadow:var(--shadow);}

/* заголовок раздела + «+ добавить» справа */
.grp-h{display:flex; align-items:center; gap:var(--space-2); padding:var(--space-7) var(--space-4) var(--space-2); flex-wrap:nowrap;}
.grp-t{font-size:13px; font-weight:800; letter-spacing:.05em; color:var(--text-secondary); text-transform:uppercase; white-space:nowrap;}
.pill{font-size:13px; font-weight:800; border-radius:calc(20px * var(--radius-scale)); padding:var(--space-1) var(--space-2); font-variant-numeric:tabular-nums; white-space:nowrap; line-height:1.3; color:var(--text-on-accent);}
.pill.p-urgent{background:var(--status-urgent);}
.pill.p-count{background:var(--surface-muted); color:var(--text-secondary);}
.grp-add{margin-left:auto; font-size:13px; font-weight:700; color:var(--accent-highlight-strong); background:var(--accent-highlight-soft);
  border:1px solid var(--border-highlight-soft); border-radius:calc(20px * var(--radius-scale)); padding:var(--space-1) var(--space-3); cursor:pointer; display:flex;
  align-items:center; justify-content:center; gap:var(--space-1); flex:0 0 auto; min-width:var(--btn-pill-w);}
.grp-add b{font-size:14px; line-height:1; font-weight:700;}
.sec-reorder{display:flex; gap:3px; flex:0 0 auto; align-self:center;}
.reord{width:26px; height:26px; border-radius:calc(8px * var(--radius-scale)); border:1px solid var(--border-default); background:var(--surface-card);
  color:var(--text-secondary); cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;}
.reord svg{width:15px; height:15px;}
.reord:hover:not(:disabled){background:var(--surface-muted); color:var(--text-primary);}
.reord:disabled{opacity:.28; cursor:not-allowed;}
.reord:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:1px;}
.ord-hint{font-size:13px; color:var(--text-secondary); line-height:1.4; margin:0 0 var(--space-5);}
.cd-label{display:block; font-size:13px; font-weight:800; letter-spacing:.03em; color:var(--text-secondary);
  text-transform:uppercase; margin:0 0 var(--space-2);}
/* тот же ритм, что у `.f-lbl`: 8 внутри группы, 24 до следующей */
.cd-label + .qadd-input{margin-bottom:var(--space-6);}
.ord-row{display:flex; align-items:center; gap:var(--space-3);}
.ord-name{flex:1 1 auto; font-size:14px; font-weight:600; color:var(--text-primary); white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;}

.qadd-input{display:block; width:100%; border:1px solid var(--border-default); border-radius:calc(12px * var(--radius-scale)); padding:var(--space-2) var(--space-3);
  font-size:16px; font-family:inherit; font-weight:400; line-height:1.45; background:var(--surface-card);
  color:var(--text-primary); resize:none;}
.qadd-input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}
.qadd-row{display:flex; align-items:center; gap:6px; margin-top:var(--space-2); flex-wrap:wrap;}
.qprop{display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 10px; border-radius:calc(9px * var(--radius-scale));
  border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary);
  font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap;}
.qprop svg{width:15px; height:15px; flex:0 0 auto;}
.qprop:hover{background:var(--surface-muted); color:var(--text-primary);}
.qprop:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.qprop.set{background:var(--accent-primary-soft); border-color:var(--border-accent-soft); color:var(--accent-primary);}
.qadd-tog{display:inline-flex; gap:5px; flex:0 0 auto; margin-left:auto;}
/* Ярлыки новой задачи — пилюлями сразу в форме (см. renderAddLabels): выбирают их
   мышью и по нескольку, поэтому список открыт, а не спрятан за поповером */
.qadd-labels{margin-top:var(--space-3);}
.qadd-labels[hidden]{display:none;}
/* подпись — та же грамматика, что «КОМУ» (.rsheet-sub); своим классом, потому что
   .rsheet-sub в этой же шторке ищут через querySelector и первым нашёлся бы этот */
.qadd-lblcap{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color:var(--text-secondary); margin-bottom:var(--space-2);}
.qadd-lbllist{display:flex; flex-wrap:wrap; gap:6px;}
.qlbl{font-family:inherit; font-size:13px; font-weight:700; line-height:1.5; padding:4px 11px; cursor:pointer;
  border-radius:calc(9px * var(--radius-scale)); border:1px solid var(--border-default);
  background:var(--surface-card); color:var(--text-secondary);}
.qlbl:hover{background:var(--surface-muted); color:var(--text-primary);}
.qlbl:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.qlbl.on{background:var(--accent-primary-soft); border-color:var(--border-accent-soft); color:var(--accent-primary);}
/* «＋ Ярлык» — та же пилюля, но пунктиром: это не выбор из списка, а заведение записи
   в справочнике отдела. Поле ввода встаёт на её место (см. openAddLabel) */
.qlbl-add{border-style:dashed; color:var(--text-secondary);}
.qlbl-add[hidden]{display:none;}
.qlbl-inp{font-family:inherit; font-size:13px; font-weight:700; line-height:1.5; padding:4px 11px; width:150px;
  border-radius:calc(9px * var(--radius-scale)); border:1px solid var(--border-accent-soft);
  background:var(--surface-card); color:var(--text-primary);}
.qlbl-inp[hidden]{display:none;}
.qlbl-inp:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.qflag, .qlock{width:30px; height:30px; border-radius:calc(9px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; color:var(--text-secondary); background:var(--surface-muted); cursor:pointer;}
.qflag svg, .qlock svg{width:15px; height:15px;}
.qflag.on{background:var(--status-urgent); color:var(--text-on-accent);}
.qlock .lock-closed{display:none;}
.qlock.on{background:var(--ink-strong); color:var(--text-on-accent);}
.qlock.on .lock-open{display:none;}
.qlock.on .lock-closed{display:block;}

.fpop{position:absolute; z-index:78; width:230px; max-height:260px; overflow-y:auto;
  background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(14px * var(--radius-scale));
  box-shadow:var(--shadow); padding:6px;}
.fpop-h{font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  color:var(--text-secondary); padding:6px 9px 4px;}
.fpop-i{display:flex; align-items:center; gap:9px; padding:8px 9px; border-radius:calc(9px * var(--radius-scale)); cursor:pointer;
  font-size:14px; font-weight:600; color:var(--text-primary);}
.fpop-t{flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.fpop-i:hover{background:var(--surface-muted);}
.fpop-i:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:-2px;}
.fpop-i.on{color:var(--accent-primary);}
.fpop-tick{width:15px; height:15px; color:var(--accent-primary); visibility:hidden;
  flex:0 0 auto; display:flex;}
.fpop-i.on .fpop-tick{visibility:visible;}
.fpop-sep{height:1px; margin:5px 6px; background:var(--border-default);}
.fpop-n{flex:0 0 auto; min-width:1.7em; text-align:right; font-size:12.5px; font-weight:600;
  color:var(--text-secondary); font-variant-numeric:tabular-nums;}
.fpop-i.on .fpop-n{color:var(--accent-primary);}
.fpop-i .fpop-ic{width:15px; height:15px; flex:0 0 auto; display:flex;}
.fpop-i.urgent{color:var(--status-urgent);}
.fpop-i.urgent .fpop-n{color:var(--status-urgent);}
.fpop-date{padding:4px 8px 6px;}
.fpop-date input{width:100%; font-family:inherit; font-size:14px; border:1px solid var(--border-default);
  border-radius:calc(9px * var(--radius-scale)); padding:6px 9px; color:var(--text-primary); background:var(--surface-card);}
.fpop-date input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}

[data-hint]{position:relative;}
[data-hint]::after{content:attr(data-hint); position:absolute; bottom:calc(100% + 7px); left:50%;
  transform:translateX(-50%) translateY(3px); background:var(--ink-strong); color:var(--text-on-accent); font-size:12px;
  font-weight:600; line-height:1; white-space:nowrap; padding:6px 9px; border-radius:calc(8px * var(--radius-scale));
  pointer-events:none; opacity:0; transition:opacity .12s ease, transform .12s ease; z-index:79;}
[data-hint]::before{content:''; position:absolute; bottom:calc(100% + 3px); left:50%; width:8px; height:8px;
  background:var(--ink-strong); transform:translateX(-50%) rotate(45deg) translateY(3px);
  pointer-events:none; opacity:0; transition:opacity .12s ease, transform .12s ease; z-index:79;}
[data-hint]:hover::after, [data-hint]:focus-visible::after{opacity:1; transform:translateX(-50%) translateY(0);}
[data-hint]:hover::before, [data-hint]:focus-visible::before{opacity:1; transform:translateX(-50%) rotate(45deg) translateY(0);}
@media (hover:none){ [data-hint]::after, [data-hint]::before{display:none;} }

.trow{display:flex; align-items:flex-start; gap:var(--space-3); background:var(--surface-card); border:1px solid var(--border-default);
  border-left:4px solid var(--border-neutral); border-radius:calc(16px * var(--radius-scale)); border-top-left-radius:0; border-bottom-left-radius:0;
  padding:var(--space-3) var(--space-4); margin:0 var(--space-4) var(--space-2);}
.trow.urgent{border-left-color:var(--status-urgent);}
.trow.daily{border-left-color:var(--accent-primary);}
.trow.blocked{border-left-color:var(--status-caution);}
.trow.done{background:var(--status-positive-soft); border-color:transparent; border-left-color:var(--status-positive-line);}
.tcheck{width:22px; height:22px; border-radius:calc(8px * var(--radius-scale)); border:2px solid var(--border-default); background:var(--surface-card); flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; color:var(--text-on-accent); font-size:13px; cursor:pointer;}
.trow.done .tcheck{background:var(--status-positive); border-color:var(--status-positive);}
.tbody{flex:1; min-width:0;}
.ttext{font-size:16px; font-weight:500; line-height:1.4;}
.trow.done .ttext{color:var(--text-secondary); text-decoration:line-through;}
.blocked-badge{flex:0 0 auto; font-size:12px; font-weight:800; letter-spacing:.02em; color:var(--text-on-accent);
  background:var(--status-caution); border-radius:calc(6px * var(--radius-scale)); padding:2px 6px; line-height:1.35;}

/* правый блок задачи: перепоручить → заблокировано → флаг (крайний справа) */
.tright{display:flex; align-items:center; gap:var(--space-2); flex:0 0 auto;}
.iconbtn{width:28px; height:28px; border-radius:calc(8px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center; justify-content:center; cursor:pointer;}
.reassign{background:var(--surface-card); border:1px solid var(--border-default); color:var(--text-secondary);}
.reassign svg{width:15px; height:15px;}
.blocked-toggle{background:transparent; border:1px solid var(--border-default); color:var(--text-secondary); cursor:pointer;}
.blocked-toggle svg{width:14px; height:14px;}
.blocked-toggle.on{background:var(--status-caution); border-color:var(--status-caution); color:var(--text-on-accent);}
.flag{background:transparent; border:1px solid var(--border-default); color:var(--text-secondary); cursor:pointer;}
.flag svg{width:14px; height:14px;}
.flag.on{background:var(--status-urgent); border-color:var(--status-urgent); color:var(--text-on-accent);}
/* корзина — та же анатомия, что у соседей по строке; без своего правила SVG
   растягивался на всю кнопку, и иконка выбивалась из ряда */
.tdel{background:transparent; border:1px solid var(--border-default); color:var(--text-secondary); cursor:pointer;}
.tdel svg{width:14px; height:14px;}
.lockbadge{background:var(--surface-muted); border:1px solid var(--border-default); color:var(--text-primary);}
.lockbadge svg{width:13px; height:13px;}

/* строка-заглушка «Спокойный день» внутри раздела без задач */
.empty-row{display:flex; align-items:center; gap:var(--space-3); background:var(--status-positive-soft); border:1px solid transparent;
  border-radius:calc(16px * var(--radius-scale)); padding:var(--space-3) var(--space-4); margin:0 var(--space-4) var(--space-2); color:var(--status-positive-text);}
.empty-row .ei{width:22px; height:22px; border-radius:calc(8px * var(--radius-scale)); background:var(--status-positive-icon); flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.empty-row .ei svg{width:12px; height:12px;}
.empty-row span{font-size:14px; font-weight:700;}

.mbar{position:absolute; left:0; right:0; bottom:0; z-index:30; display:flex;
  background:rgba(255,255,255,.94); backdrop-filter:blur(10px); border-top:1px solid var(--border-default);
  padding:6px var(--space-2) calc(6px + env(safe-area-inset-bottom));}
.mbar-btn{flex:1; min-width:0; position:relative; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:3px; padding:var(--space-2) var(--space-1); border:0; background:none;
  border-radius:calc(14px * var(--radius-scale)); font-family:inherit; font-size:12px; font-weight:700; letter-spacing:.01em;
  color:var(--text-secondary); cursor:pointer;}
.mbar-btn svg{width:22px; height:22px;}
.mbar-btn:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:-2px;}
/* открытая шторка подсвечивает свою кнопку — тот же признак «где я», что был у активной вкладки */
body.mnav-open .mbar-btn[data-mbar="nav"], body.mctx-open .mbar-btn[data-mbar="signals"]{color:var(--accent-primary);}
.mbar-btn .tb-bell-badge{top:2px; right:auto; left:calc(50% + 5px);}

/* Отдел (it-lead-C-team.html) */

/* демо-переключатель: показать, как фон hero-блока кодирует статус проекта */

.rings{margin:var(--space-1) var(--space-4) var(--space-2); background:var(--hb); border:1px solid var(--hbd);
  border-radius:calc(16px * var(--radius-scale)); padding:var(--space-4) var(--space-4); box-shadow:var(--shadow);
  --hb:var(--state-positive-surface); --hbd:var(--state-positive-border); --hlabel:var(--state-positive-label);
  --hfoot:var(--state-positive-foot); --hdiv:var(--state-positive-divider);}
.rings.warn{--hb:var(--state-caution-surface); --hbd:var(--state-caution-border); --hlabel:var(--state-caution-label);
  --hfoot:var(--state-caution-foot); --hdiv:var(--state-caution-divider);}
.rings.crit{--hb:var(--state-critical-surface); --hbd:var(--state-critical-border); --hlabel:var(--state-critical-label);
  --hfoot:var(--state-critical-foot); --hdiv:var(--state-critical-divider);}
.rings-row{display:flex; align-items:flex-start;}
.ring-item{flex:1; display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
  container-type:inline-size;}
.ring-item .ring{position:relative; width:78px; height:78px;}
.ring-item .ring .num{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap;}
.ring-label{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--hlabel);}
.rings-foot{display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-top:var(--space-3);
  padding-top:var(--space-3); border-top:1px solid var(--hdiv); font-size:13px; color:var(--hfoot);}
.rings-foot .flag-ct{display:flex; align-items:center; gap:var(--space-1); color:var(--on-state-urgent); font-weight:700; flex:0 0 auto;}
.rings-foot .flag-ct svg{width:12px; height:12px; flex:0 0 auto;}

/* переключатель периода — тот же компонент, что «Сегодня/Все» в D */

.seg button{font-family:inherit; border:0; background:transparent; flex:1; text-align:center; font-size:14px; font-weight:700; color:var(--text-secondary); padding:var(--space-2) 0; border-radius:calc(8px * var(--radius-scale)); cursor:pointer;}

.team-period-bar{position:sticky; top:57px; z-index:15; background:var(--surface-canvas);}

.sect-h{font-size:13px; font-weight:800; letter-spacing:.05em; color:var(--text-secondary); text-transform:uppercase;
  padding:var(--space-4) var(--space-4) var(--space-2);}

/* KPI rows */
.kpi{background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale)); padding:var(--space-3) var(--space-4); margin:0 var(--space-4) var(--space-2);}
.kpi-top{display:flex; align-items:baseline; gap:var(--space-2);}
.kpi-name{font-size:14px; font-weight:700;}
.kpi-val{margin-left:auto; font-size:16px; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums; white-space:nowrap;}
.kpi-val.ok{color:var(--status-positive);} .kpi-val.warn{color:var(--status-caution);}
.kpi-val.none{color:var(--text-secondary);}
.kpi-goal{font-size:13px; color:var(--text-secondary); margin-top:var(--space-1);}
.bar{height:7px; border-radius:calc(6px * var(--radius-scale)); background:var(--surface-muted); margin-top:var(--space-2); overflow:hidden;}
.bar i{display:block; height:100%; border-radius:calc(6px * var(--radius-scale));}
.bar i.ok{background:var(--status-positive);} .bar i.warn{background:var(--status-caution);}
.kpi-row{display:flex; align-items:center; gap:var(--space-2); margin-top:var(--space-2);}
.kpi-row .bar{flex:1; margin-top:0;}
.kpi-input{width:78px; flex:0 0 auto; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap;
  font-family:inherit; font-size:16px; font-weight:700; color:var(--text-primary);
  border:1px solid var(--border-default); border-radius:calc(8px * var(--radius-scale)); padding:4px 7px; background:var(--surface-card);}
.kpi-input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}

/* team roster — левая полоса как индикатор риска, тот же язык, что срочность задач в «Сегодня» */
.member{display:flex; align-items:center; gap:var(--space-3); background:var(--surface-card); border:1px solid var(--border-default);
  border-left:4px solid var(--border-neutral); border-radius:calc(16px * var(--radius-scale)); border-top-left-radius:0; border-bottom-left-radius:0;
  padding:var(--space-3) var(--space-4); margin:0 var(--space-4) var(--space-2);}
.member.risk-row{border-left-color:var(--status-urgent);}
.m-av{background:var(--av-color, var(--av-data, var(--accent-primary))); width:36px; height:36px; border-radius:calc(12px * var(--radius-scale)); color:var(--text-on-accent); font-weight:700; font-size:13px; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;}
.m-b{flex:1; min-width:0;}
.m-top{display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap;}
.m-name{font-size:16px; font-weight:700;}
.m-role{font-size:13px; color:var(--text-secondary);}
.m-load{height:6px; border-radius:calc(4px * var(--radius-scale)); background:var(--surface-muted); margin-top:var(--space-2); overflow:hidden; display:flex;}
.m-load .lseg{height:100%;}
.m-load .lseg.done{background:var(--load-done, var(--seg-data, var(--status-positive)));}
.m-load .lseg.rest{background:var(--load-rest, var(--seg-data, var(--surface-muted)));}
.m-stat{font-size:13px; color:var(--text-secondary); margin-top:var(--space-1);}
.risk{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; color:var(--text-on-accent);
  background:var(--status-urgent); border-radius:calc(20px * var(--radius-scale)); padding:var(--space-1) var(--space-2);}
.away-badge{display:inline-flex; align-items:center; width:fit-content; font-size:13px; font-weight:800;
  text-transform:uppercase; letter-spacing:.03em; color:var(--text-secondary);
  background:var(--surface-muted); border:1px solid var(--border-default); border-radius:calc(20px * var(--radius-scale)); padding:3px var(--space-2);}
.m-right{display:flex; flex-direction:column; align-items:flex-end; gap:var(--space-1); margin-left:auto; flex:0 0 auto;}
.m-done{font-size:13px; font-weight:700; color:var(--text-secondary); font-variant-numeric:tabular-nums; white-space:nowrap;}
.award-badge{cursor:pointer; transition:transform .12s ease;}
.award-badge:active{transform:scale(.88);}
@media (prefers-reduced-motion: reduce){ .award-badge{transition:none;} .award-badge:active{transform:none;} }

.head-awards{display:inline-flex; align-items:center; gap:var(--space-1); flex:0 0 auto;}
.head-award{display:inline-flex; align-items:center;}
.head-award svg{width:19px; height:19px;}
.crown-badge svg{width:20px; height:20px;}   /* корона чуть крупнее */
/* корона на карточке участника «Отдела» (отдельно от дневных наград «Сегодня») */
.m-crown{display:inline-flex; align-items:center; flex:0 0 auto; margin-left:5px;}
.m-crown svg{width:20px; height:20px;}
.kpi-award, .dg-award{display:inline-flex; align-items:center; flex:0 0 auto;}
.kpi-award{align-self:center;}
.kpi-award svg{width:24px; height:24px;}   /* печать «KPI достигнут» — крупно, хорошо видно */
.dg-award{vertical-align:middle; margin-left:5px;}
.dg-award svg{width:19px; height:19px;}    /* кубок «лучший на неделе» в дайджесте */
.idea-rocket{position:absolute; top:12px; right:14px; display:inline-flex;}
.idea-rocket svg{width:36px; height:36px; filter:drop-shadow(0 2px 3px rgba(150,110,20,.22));}

.award-pop{position:absolute; z-index:70; width:216px; background:var(--surface-card);
  border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale)); padding:14px 30px 14px 14px;
  box-shadow:var(--shadow-toast); display:flex; gap:10px; align-items:flex-start;
  animation:award-pop-in .15s cubic-bezier(.22,.75,.25,1);}
.award-pop-arrow{position:absolute; width:12px; height:12px; left:16px; background:var(--surface-card);
  border:1px solid var(--border-default); transform:rotate(45deg);}
.award-pop.dir-down .award-pop-arrow{top:-7px; border-right:0; border-bottom:0;}
.award-pop.dir-up .award-pop-arrow{bottom:-7px; border-left:0; border-top:0;}
.award-pop-ic{flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.award-pop-ic svg{width:34px; height:34px;}
.award-pop-b{flex:1; min-width:0; display:flex; flex-direction:column; gap:var(--space-1);}
.award-pop-t{font-size:14px; font-weight:800; line-height:1.3;}
.award-pop-d{font-size:13px; color:var(--text-secondary); line-height:1.45;}
.award-pop-close{position:absolute; top:9px; right:9px; width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; color:var(--text-secondary); cursor:pointer;}
.award-pop-close svg{width:10px; height:10px;}
@keyframes award-pop-in{ from{opacity:0; transform:translateY(4px) scale(.96);} to{opacity:1; transform:none;} }
@media (prefers-reduced-motion: reduce){ .award-pop{animation:none;} }

.icontip{position:absolute; z-index:75; max-width:220px; background:var(--ink-strong); color:var(--text-on-accent);
  font-size:13px; font-weight:600; line-height:1.4; padding:8px 12px; border-radius:calc(10px * var(--radius-scale));
  box-shadow:var(--shadow-2); animation:icontip-in .15s cubic-bezier(.22,.75,.25,1);}
.icontip-arrow{position:absolute; width:10px; height:10px; background:var(--ink-strong); transform:rotate(45deg);}
.icontip.dir-left .icontip-arrow{right:-5px;}
.icontip.dir-right .icontip-arrow{left:-5px;}
@keyframes icontip-in{ from{opacity:0; transform:scale(.96);} to{opacity:1; transform:none;} }
@media (prefers-reduced-motion: reduce){ .icontip{animation:none;} }

.mflag{display:flex; align-items:center; gap:var(--space-1); color:var(--status-urgent); font-weight:700; font-size:13px;}
.mflag svg{width:11px; height:11px; flex:0 0 auto;}

.trend{margin:var(--space-1) var(--space-4) var(--space-2); background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale)); padding:var(--space-4) var(--space-4);}
.trend-h{display:flex; align-items:center; gap:var(--space-2); margin-bottom:var(--space-3);}
.trend-t{font-size:14px; font-weight:700;}
.trend-tag{margin-left:auto; font-size:13px; color:var(--status-positive-trend); font-weight:700;}
.trend-legend{display:flex; align-items:center; gap:var(--space-3); font-size:12px; color:var(--text-secondary); margin-bottom:var(--space-3);}
.trend-legend span{display:flex; align-items:center; gap:var(--space-1);}
.trend-legend i{width:7px; height:7px; border-radius:calc(2px * var(--radius-scale)); display:inline-block;}
.bars{display:flex; align-items:flex-end; gap:var(--space-2); height:72px;}
.bars .col{flex:1; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:var(--space-1);}
.bars .col .stack{width:100%; max-width:18px; border-radius:calc(6px * var(--radius-scale)) calc(6px * var(--radius-scale)) calc(3px * var(--radius-scale)) calc(3px * var(--radius-scale)); overflow:hidden; display:flex; flex-direction:column;}
.bars .col .undone{width:100%; background:var(--chart-undone);}
.bars .col .done{width:100%; background:var(--accent-primary);}
.bars .col small{font-size:12px; color:var(--text-secondary);}

/* Идеи (ideas-board.html) */

.add-idea{display:flex; align-items:center; justify-content:center; gap:var(--space-2); margin:var(--space-2) var(--space-4) var(--space-2);
  background:var(--accent-highlight); border:0; border-radius:calc(16px * var(--radius-scale)); padding:var(--space-4); cursor:pointer; box-shadow:var(--shadow);}
.add-idea .plus{width:24px; height:24px; border-radius:50%; background:rgba(255,255,255,.28); color:var(--text-on-accent); flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; line-height:1;}
.add-idea .lab{font-size:14px; font-weight:800; color:var(--text-on-accent);}
.add-hint{font-size:13px; color:var(--text-secondary); text-align:center; padding:0 var(--space-5) var(--space-1);}

.idea{position:relative; display:flex; gap:var(--space-3); background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale));
  padding:var(--space-3) var(--space-4); margin:0 var(--space-4) var(--space-2);}
.idea.low{opacity:.6;}
/* у популярной идеи текст не заезжает под ракету в правом верхнем углу */
.idea.has-rocket .itext{padding-right:44px;}
.ivote{display:flex; flex-direction:column; align-items:center; gap:var(--space-1); flex:0 0 auto; width:26px;}
.ivote-btn{width:24px; height:22px; border-radius:calc(8px * var(--radius-scale)); display:flex; align-items:center; justify-content:center;
  color:var(--text-secondary); cursor:pointer;}
.ivote-btn svg{width:15px; height:15px;}
.ivote-btn.up.on{background:var(--status-positive-soft); color:var(--status-positive-strong);}
.ivote-btn.down.on{background:var(--status-urgent-soft); color:var(--status-urgent);}
.ivote-score{font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--text-primary); padding:var(--space-1) 0;}
.ivote-score.neg{color:var(--status-urgent);}
.ibody{flex:1; min-width:0;}
.itext{font-size:16px; font-weight:600; line-height:1.4;}
.imeta{display:flex; align-items:center; gap:var(--space-2); margin-top:var(--space-2);}
.idept{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--text-on-accent);
  border-radius:calc(20px * var(--radius-scale)); padding:var(--space-1) var(--space-2); flex:0 0 auto;
  background:var(--ink-strong);}
.idept.it{background:var(--accent-primary);}
.idept.mk{background:var(--accent-highlight);}
.idept.sl{background:var(--status-caution);}
.idept.cl{background:var(--status-positive);}
.idept.fn{background:var(--accent-secondary);}
.icmt{display:flex; align-items:center; gap:var(--space-1); margin-left:auto; color:var(--text-secondary); font-weight:700;
  font-size:13px; cursor:pointer; flex:0 0 auto;}
.icmt svg{width:13px; height:13px; flex:0 0 auto;}
.icmt.on{color:var(--text-primary);}

.cmt-panel{margin-top:var(--space-3);}
/* Лента обсуждения идеи: раньше панель была только на запись — комментарий уходил
   в базу, счётчик рос, а прочитать написанное было негде, включая своё */
.cmt-list{display:flex; flex-direction:column; gap:var(--space-2); margin-bottom:var(--space-3);}
.cmt-list:empty{display:none;}
.cmt-row{border-left:2px solid var(--border-default); padding-left:var(--space-3);}
.cmt-row.mine{border-left-color:var(--accent-highlight);}
.cmt-who{display:flex; align-items:baseline; gap:var(--space-2); color:var(--text-secondary);
  font-size:12px; font-weight:700;}
.cmt-when{font-weight:500;}
.cmt-text{color:var(--text-primary); font-size:14px; line-height:1.45; white-space:pre-wrap; word-break:break-word;}
.cmt-none{color:var(--text-secondary); font-size:13px; margin-bottom:var(--space-3);}
.cmt-input{display:block; width:100%; border:1px solid var(--border-default); border-radius:calc(12px * var(--radius-scale)); padding:var(--space-3) var(--space-3);
  font-size:16px; font-family:inherit; line-height:1.4; background:var(--surface-card); color:var(--text-primary); resize:none;}
.cmt-input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}
.cmt-actions{display:flex; gap:var(--space-2); margin-top:var(--space-2);}
.cmt-send{flex:1; border:0; background:var(--ink-strong); color:var(--text-on-accent); font-weight:700; font-size:13px;
  font-family:inherit; border-radius:calc(12px * var(--radius-scale)); padding:var(--space-2) 0; cursor:pointer;}
.cmt-cancel{flex:1; border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary); font-weight:700; font-size:13px;
  font-family:inherit; border-radius:calc(12px * var(--radius-scale)); padding:var(--space-2) 0; cursor:pointer;}

[role="button"]{outline-offset:2px;}
[role="button"]:focus-visible{outline:2px solid var(--accent-highlight);}

/* колокольчик с бейджем непрочитанных */
.tb-bell{position:relative;}
.tb-bell-badge{position:absolute; top:-5px; right:-5px; min-width:16px; height:16px; padding:0 var(--space-1);
  border-radius:calc(8px * var(--radius-scale)); background:var(--status-urgent); color:var(--text-on-accent); font-size:12px; font-weight:800;
  display:flex; align-items:center; justify-content:center; font-variant-numeric:tabular-nums; white-space:nowrap;}

/* центр оповещений — накрывает экран телефона поверх, свой скролл, без скроллбара */
.notif{position:absolute; inset:0; z-index:50; background:var(--surface-canvas); display:flex; flex-direction:column;}
.notif[hidden]{display:none !important;}
.notif-top{display:flex; align-items:center; gap:10px; padding:var(--space-4) var(--space-4) var(--space-3); border-bottom:1px solid var(--border-default);}
.notif-title{font-size:16px; font-weight:700;}
.notif-read-all{font-size:13px; font-weight:700; color:var(--accent-highlight-strong);
  background:var(--accent-highlight-soft); border:1px solid var(--border-highlight-soft); border-radius:calc(20px * var(--radius-scale)); padding:5px 11px; cursor:pointer;}
/* «Архив» / «← Активные» — первый пункт справа, толкает всю группу к правому краю */
.notif-link{margin-left:auto; font-size:13px; font-weight:700; color:var(--text-secondary); cursor:pointer;}
.notif-link:hover{color:var(--accent-highlight-strong); text-decoration:underline;}
.notif-close{width:36px; height:36px; border-radius:calc(12px * var(--radius-scale)); background:var(--surface-card); border:1px solid var(--border-default);
  display:flex; align-items:center; justify-content:center; color:var(--text-secondary); flex:0 0 auto; cursor:pointer;}
.notif-close svg{width:16px; height:16px;}
.notif-list{flex:1; overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none;}
.notif-list::-webkit-scrollbar{width:0; height:0; display:none;}
.notif-item{position:relative; display:flex; align-items:flex-start; gap:var(--space-3); padding:14px var(--space-4); border-bottom:1px solid var(--border-default); cursor:pointer;}
.notif-item.unread{background:var(--surface-card);}
.notif-ic{width:32px; height:32px; border-radius:calc(9px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.notif-ic svg{width:16px; height:16px;}
.notif-ic.crit{background:var(--status-urgent-soft); color:var(--status-urgent);}
.notif-ic.warn{background:var(--state-caution-surface); color:var(--state-caution-strong);}
.notif-ic.calm{background:var(--status-positive-soft); color:var(--status-positive);}
.notif-b{flex:1; min-width:0;}
.notif-t{font-size:14px; font-weight:500; line-height:1.4;}
.notif-item.unread .notif-t{font-weight:600;}
.notif-time{font-size:13px; color:var(--text-secondary); margin-top:var(--space-1);}
/* Правая колонка строки: отметка сверху, действие снизу. Полоса стоит В ПОТОКЕ —
   абсолютная точка ложилась поверх текста везде, где иконки действия у сигнала нет */
.notif-r{flex:0 0 28px; align-self:stretch; display:flex; flex-direction:column; align-items:center;}
/* точка непрочитанного — по оптическому центру первой строки текста */
.notif-dot{flex:0 0 auto; margin-top:6px; width:7px; height:7px; border-radius:50%; background:var(--status-urgent);}
/* прочитанное — на месте точки крестик «в архив» (та же колонка, реальная кнопка) */
.notif-arch{flex:0 0 auto; margin-top:-2px; width:24px; height:24px; border-radius:calc(8px * var(--radius-scale)); border:1px solid var(--border-default);
  background:var(--surface-card); color:var(--text-secondary); display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;}
.notif-arch svg{width:12px; height:12px;}
.notif-arch:hover{background:var(--status-urgent-soft); color:var(--status-urgent); border-color:transparent;}
.notif-arch:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.notif-item.read{cursor:default;}
/* ПОГАШЕННЫЙ СИГНАЛ — хвост истории в рельсе. Условие ушло, сигнал ничего уже не
   требует, но исчезать ему нельзя: «что у нас горело вчера» — вопрос, с которым в
   рельс и приходят. Одна пара классов на все три карточки рельса (центр оповещений
   отдела, `.ctx-card` в CRM и «Персонале», `.acard` пульта) — расходиться им незачем.
   Приглушённость тут вторая примета: первая — слово «погашен» в подписи (§10.5). */
.notif-item.resolved, .ctx-card.resolved, .acard.resolved{background:var(--surface-canvas);}
.notif-item.resolved .notif-t, .ctx-card.resolved .ctx-tt, .acard.resolved .acard-tt{
  color:var(--text-secondary); font-weight:600;}
.notif-item.resolved .notif-ic, .ctx-card.resolved .ctx-ic, .acard.resolved .acard-ic{opacity:.55;}
.notif-empty{padding:48px var(--space-6); text-align:center; color:var(--text-secondary); font-size:14px;}
.notif-meta{font-size:13px; color:var(--text-secondary); margin-top:6px;}
.notif-meta b{color:var(--status-urgent); font-weight:800;}
.notif-act{margin-top:auto; flex:0 0 auto;}
/* «N новых · Прочитать все» — над списком, только когда есть что читать */
.notif-bar{display:flex; align-items:center; gap:var(--space-3); padding:10px var(--space-4);
  border-bottom:1px solid var(--border-default);}
.notif-bar-n{font-size:13px; font-weight:700; color:var(--text-secondary);}
.notif-bar .notif-read-all{margin-left:auto;}
.notif-reward{background:var(--surface-card); border:1px solid var(--border-default); color:var(--status-caution);}

.digest-btn{display:flex; align-items:center; gap:var(--space-3); width:calc(100% - 32px); margin:2px var(--space-4) var(--space-2);
  background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale));
  padding:var(--space-3) 14px; cursor:pointer; text-align:left; font-family:inherit;}
.digest-btn:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.digest-btn-ic{width:34px; height:34px; border-radius:calc(10px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; background:var(--accent-highlight-soft); color:var(--accent-highlight-strong);}
.digest-btn-ic svg{width:18px; height:18px;}
.digest-btn-b{flex:1; min-width:0;}
.digest-btn-t{display:block; font-size:14px; font-weight:700; color:var(--text-primary);}
.digest-btn-sub{display:block; font-size:13px; color:var(--text-secondary); margin-top:2px;}
.digest-btn-chev{color:var(--text-secondary); flex:0 0 auto; display:flex;}
.digest-btn-chev svg{width:18px; height:18px; transform:rotate(-90deg);}

.digest{position:absolute; inset:0; z-index:50; background:var(--surface-canvas); display:flex; flex-direction:column;}
.digest[hidden]{display:none !important;}
.digest-top{display:flex; align-items:center; gap:10px; padding:var(--space-4) var(--space-4) var(--space-3); border-bottom:1px solid var(--border-default);}
.digest-head{flex:1; min-width:0;}
.digest-title{font-size:16px; font-weight:700;}
.digest-sub{font-size:13px; color:var(--text-secondary); margin-top:2px;}
.digest-close{width:36px; height:36px; border-radius:calc(12px * var(--radius-scale)); background:var(--surface-card); border:1px solid var(--border-default);
  display:flex; align-items:center; justify-content:center; color:var(--text-secondary); flex:0 0 auto; cursor:pointer; position:relative;}
.digest-close::before{content:''; position:absolute; inset:-6px;}
.digest-close svg{width:16px; height:16px;}
/* Кнопки «Печать» / «Сохранить HTML» в шапке дайджеста */
.digest-act{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border-radius:calc(12px * var(--radius-scale));
  background:var(--surface-card); border:1px solid var(--border-default); color:var(--text-secondary);
  font-size:14px; font-weight:700; cursor:pointer; flex:0 0 auto; white-space:nowrap;}
.digest-act:hover{background:var(--surface-muted);}
.digest-act svg{width:15px; height:15px; flex:0 0 auto;}
.digest-act:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
/* на узком экране (телефон) — только иконки, чтобы не тесно рядом с заголовком */
@media (max-width:700px){ .digest-act-t{display:none;} .digest-act{padding:0; width:36px; justify-content:center;} }
.digest-list{flex:1; overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none; padding:var(--space-2) 0 var(--space-4);}
.digest-list::-webkit-scrollbar{width:0; height:0; display:none;}
.dg-group{padding:var(--space-3) var(--space-4) 2px;}
.dg-gh{display:flex; align-items:center; gap:var(--space-2); margin-bottom:10px;}
.dg-gt{font-size:13px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--text-secondary);}
.dg-count{margin-left:auto; font-size:13px; font-weight:800; border-radius:calc(20px * var(--radius-scale)); padding:3px 9px;
  font-variant-numeric:tabular-nums; white-space:nowrap; line-height:1.3; background:var(--surface-muted); color:var(--text-secondary);}
.dg-count.pos{background:var(--status-positive-soft); color:var(--status-positive-strong);}
.dg-count.warn{background:var(--state-caution-surface); color:var(--state-caution-strong);}
.dg-count.crit{background:var(--status-urgent-soft); color:var(--status-urgent);}
.dg-row{display:flex; align-items:flex-start; gap:10px; background:var(--surface-card); border:1px solid var(--border-default);
  border-left:4px solid var(--border-neutral); border-radius:calc(12px * var(--radius-scale)); border-top-left-radius:0; border-bottom-left-radius:0;
  padding:10px var(--space-3); margin-bottom:var(--space-2);}
.dg-row[data-mi]{cursor:pointer; transition:background-color .15s;}
.dg-row[data-mi]:hover, .dg-row[data-mi]:focus-visible{background:var(--surface-hover, var(--surface-hover));}
.dg-row.pos{border-left-color:var(--status-positive-line);}
.dg-row.crit{border-left-color:var(--status-urgent);}
.dg-row.warn{border-left-color:var(--status-caution);}
.dg-row.mut{border-left-color:var(--accent-primary);}
.dg-row-b{flex:1; min-width:0;}
.dg-row-t{font-size:14px; font-weight:600; line-height:1.4; color:var(--text-primary);}
.dg-row-sub{font-size:13px; color:var(--text-secondary); margin-top:3px;}
.dg-row-list{margin:var(--space-1) 0 0; padding:0; list-style:none;}
.dg-row-list li{font-size:13px; color:var(--text-secondary); line-height:1.5; padding-left:var(--space-3); position:relative;}
.dg-row-list li::before{content:'·'; position:absolute; left:2px; color:var(--status-urgent); font-weight:800;}
.dg-row-list.done li::before{content:'✓'; left:0; font-size:12px; color:var(--status-positive-strong);}
.dg-frac{font-size:14px; font-weight:800; color:var(--text-primary); flex:0 0 auto; font-variant-numeric:tabular-nums; white-space:nowrap;}
.dg-badge{display:inline-block; font-size:12px; font-weight:800; color:var(--status-urgent);
  background:var(--status-urgent-soft); border-radius:calc(6px * var(--radius-scale)); padding:1px 6px; margin-left:6px; vertical-align:middle;}
.dg-empty{font-size:13px; color:var(--status-positive-strong); background:var(--status-positive-soft);
  border-radius:calc(10px * var(--radius-scale)); padding:10px var(--space-3);}

/* единые размеры для иконок, заменивших unicode-глифы (стрелки/галочки/тренд) */
.tb-btn svg{width:19px; height:19px;}
.tcheck svg{width:14px; height:14px; opacity:0; transition:opacity .12s;}
.trow.done .tcheck svg{opacity:1;}
.trow.done .flag, .trow.done .reassign, .trow.done .blocked-toggle, .trow.done .blocked-badge{display:none;}
.tbody{display:flex; align-items:flex-start; gap:var(--space-2);}
.ttext{position:relative; flex:1 1 auto; min-width:0; cursor:pointer;
  overflow:hidden; max-height:1.4em; transition:max-height .32s cubic-bezier(.22,.75,.25,1);}
.trow.expanded .ttext{max-height:20em;}
@media (prefers-reduced-motion: reduce){
  .ttext{transition:none;}
}
.ttext.truncated::after{content:''; position:absolute; right:0; bottom:0; width:22px; height:1.4em;
  background:linear-gradient(to right, transparent, var(--surface-card) 65%); pointer-events:none;}
.ttext.truncated::before{content:''; position:absolute; right:1px; bottom:.45em; width:6px; height:6px;
  border-right:2px solid var(--text-secondary); border-bottom:2px solid var(--text-secondary);
  transform:rotate(45deg); pointer-events:none;}
.trow.done .ttext.truncated::after{background:linear-gradient(to right, transparent, var(--status-positive-soft) 65%);}
.trow.expanded .ttext.truncated::after, .trow.expanded .ttext.truncated::before{display:none;}
/* яркая метка SLA перед текстом, когда до нарушения регламента < 3ч */
.sla-badge{flex:0 0 auto; font-size:12px; font-weight:800; letter-spacing:.02em; color:var(--text-on-accent);
  background:var(--status-urgent); border-radius:calc(6px * var(--radius-scale)); padding:2px 6px; line-height:1.35; font-variant-numeric:tabular-nums; white-space:nowrap;}

/* колокольчик: красный при наличии красного оповещения, иначе зелёный */
.tb-bell-badge.red{background:var(--status-urgent);}
.tb-bell-badge.green{background:var(--status-positive);}
.tb-bell.has-red{color:var(--status-urgent);}
.tb-bell.has-green{color:var(--status-positive);}

.rsheet{position:absolute; inset:0; z-index:60; display:flex; flex-direction:column; justify-content:flex-end;}
.rsheet[hidden]{display:none !important;}
.rsheet-backdrop{position:absolute; inset:0; background:rgba(51,48,42,.35); opacity:0; transition:opacity .28s ease;}
.rsheet.open .rsheet-backdrop{opacity:1;}
.rsheet-card{position:relative; background:var(--surface-card); border-radius:0;
  padding:0; box-shadow:none;
  height:100%; max-height:none; overflow-y:auto;
  display:flex; flex-direction:column;
  transform:translateY(100%); transition:transform .32s cubic-bezier(.22,.75,.25,1);}
.rsheet.open .rsheet-card{transform:translateY(0);}
@media (prefers-reduced-motion: reduce){
  .rsheet-backdrop, .rsheet-card{transition:none;}
}
/* полоса прокрутки шторки — общая тонкая (см. блок «ПОЛОСА ПРОКРУТКИ» в конце файла) */
.qadd-input, .rsheet-comment-input, .cmt-input{scrollbar-width:none; -ms-overflow-style:none;}
.qadd-input::-webkit-scrollbar, .rsheet-comment-input::-webkit-scrollbar, .cmt-input::-webkit-scrollbar{
  width:0; height:0; display:none;}
.rsheet-head{position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:var(--space-3);
  padding:14px var(--space-4); border-radius:0; flex:0 0 auto;
  background:var(--surface-card); border-bottom:1px solid var(--border-default);}
.rsheet-body{padding:var(--space-4) var(--space-4) var(--space-6); flex:1 1 auto; display:flex; flex-direction:column;}
.rsheet-body > *{flex:0 0 auto;}
.rsheet-title{flex:1; min-width:0; font-size:16px; font-weight:800; color:var(--text-primary);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sheet-x{flex:0 0 auto; width:32px; height:32px; border-radius:50%; border:1px solid var(--border-default);
  background:var(--surface-card); color:var(--text-secondary); cursor:pointer; display:flex; align-items:center;
  justify-content:center; padding:0;}
.sheet-x svg{width:15px; height:15px;}
.sheet-x:hover{background:var(--surface-muted); color:var(--text-primary);}
.sheet-x:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.rsheet-addfields{margin-bottom:var(--space-6);}
.rsheet-comment{margin-bottom:var(--space-6);}
.rsheet-comment-input{display:block; width:100%; border:1px solid var(--border-default); border-radius:calc(12px * var(--radius-scale)); padding:10px var(--space-3);
  font-size:16px; font-family:inherit; line-height:1.4; background:var(--surface-card); color:var(--text-primary); resize:none;}
.rsheet-comment-input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}
.rsheet-sub{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--text-secondary); margin-bottom:var(--space-2);}
.rsheet-list{display:flex; flex-direction:column; gap:var(--space-2); margin-bottom:var(--space-4);}
.rsheet-person{display:flex; align-items:center; gap:11px; padding:11px var(--space-3); border:1px solid var(--border-default);
  border-radius:calc(12px * var(--radius-scale)); background:var(--surface-card); cursor:pointer; text-align:left;
  transition:border-color .15s ease, background-color .15s ease;}
.rsheet-person.selected{border-color:var(--accent-primary); background:var(--accent-primary-soft);}
.rsheet-person.away{opacity:.6; cursor:not-allowed;}
.rsheet-av{width:30px; height:30px; border-radius:calc(9px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  background:var(--accent-primary); color:var(--text-on-accent); font-weight:700; font-size:13px;}
.rsheet-b{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.rsheet-name{font-size:14px; font-weight:600; color:var(--text-primary);}
.rsheet-load{font-size:13px; font-weight:600; color:var(--text-secondary);}
.rsheet-load b{color:var(--status-urgent); font-weight:800;}
.rsheet-away{margin-top:2px;}
.rsheet-check{width:22px; height:22px; border-radius:calc(8px * var(--radius-scale)); border:2px solid var(--border-default); background:var(--surface-card);
  flex:0 0 auto; display:flex; align-items:center; justify-content:center; color:var(--text-on-accent);}
.rsheet-check svg{width:13px; height:13px; opacity:0; transition:opacity .12s;}
.rsheet-person.selected .rsheet-check{background:var(--accent-primary); border-color:var(--accent-primary);}
.rsheet-person.selected .rsheet-check svg{opacity:1;}
.rsheet-actions{display:flex; gap:var(--space-2); margin-top:auto; padding-top:var(--space-6);}
.rsheet-send{flex:1; border:0; background:var(--ink-strong); color:var(--text-on-accent); font-weight:700; font-size:14px;
  font-family:inherit; border-radius:calc(12px * var(--radius-scale)); padding:11px 0; cursor:pointer;}
.rsheet-send:disabled{opacity:.45; cursor:not-allowed;}
.rsheet-cancel{flex:1; border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary);
  font-weight:700; font-size:14px; font-family:inherit; border-radius:calc(12px * var(--radius-scale)); padding:11px 0; cursor:pointer;}

.member-wrap{background:var(--surface-card); border:1px solid var(--border-default);
  border-left:4px solid var(--border-neutral); border-radius:0 calc(16px * var(--radius-scale)) calc(16px * var(--radius-scale)) 0; margin:0 var(--space-4) var(--space-2); overflow:hidden;}
.member-wrap.at-risk{border-left-color:var(--status-urgent);}
.member{background:none; border:0; border-radius:0; margin:0; box-shadow:none; cursor:pointer;}
.m-chev{width:28px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; color:var(--text-secondary); transition:transform .25s;}
.m-chev svg{width:16px; height:16px;}
.member.open .m-chev{transform:rotate(180deg);}
.member-tasks{max-height:0; overflow:hidden; transition:max-height .3s ease; margin:0;}
.member-tasks.open{max-height:640px;}
.mtask{display:flex; align-items:flex-start; gap:var(--space-3); padding:11px var(--space-4); border-top:1px solid var(--border-default);}
.mtask-ic{width:36px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.mtask-dot{width:8px; height:8px; border-radius:calc(2px * var(--radius-scale)); background:var(--border-neutral);}
.mtask.urgent .mtask-dot{background:var(--status-urgent);}
.mtask.done .mtask-dot{background:var(--status-positive);}
.mtask-text{position:relative; flex:1; min-width:0; font-size:14px; font-weight:500; line-height:1.35;
  cursor:pointer; overflow:hidden; max-height:1.35em; transition:max-height .32s cubic-bezier(.22,.75,.25,1);}
.mtask.expanded .mtask-text{max-height:20em;}
@media (prefers-reduced-motion: reduce){
  .mtask-text{transition:none;}
}
.mtask-text.truncated::after{content:''; position:absolute; right:0; bottom:0; width:22px; height:1.35em;
  background:linear-gradient(to right, transparent, var(--surface-card) 65%); pointer-events:none;}
.mtask-text.truncated::before{content:''; position:absolute; right:1px; bottom:.42em; width:6px; height:6px;
  border-right:2px solid var(--text-secondary); border-bottom:2px solid var(--text-secondary);
  transform:rotate(45deg); pointer-events:none;}
.mtask.expanded .mtask-text.truncated::after, .mtask.expanded .mtask-text.truncated::before{display:none;}
.mtask.done .mtask-text{color:var(--text-secondary); text-decoration:line-through;}
.mtask-deleg{width:28px; height:28px; border-radius:calc(8px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  background:var(--surface-card); border:1px solid var(--border-default); color:var(--text-secondary); cursor:pointer;}
.mtask-deleg svg{width:15px; height:15px;}
.mtask-deleg-spacer{width:28px; flex:0 0 auto;}
.trend-tag{display:inline-flex; align-items:center; gap:var(--space-1);}
.trend-tag svg{width:13px; height:13px;}

.toast{position:absolute; left:16px; right:16px; bottom:84px; z-index:70; pointer-events:none;
  display:flex; align-items:center; gap:var(--space-3); background:var(--ink-strong); color:var(--text-on-accent);
  border-radius:calc(14px * var(--radius-scale)); padding:var(--space-3) 14px; box-shadow:var(--shadow-chip);
  transform:translateY(140%); opacity:0;
  transition:transform .3s cubic-bezier(.22,.75,.25,1), opacity .3s ease;}
.toast.show{transform:translateY(0); opacity:1; pointer-events:auto;}
.toast-msg{flex:1; min-width:0; font-size:14px; font-weight:600; line-height:1.35;}
.toast-undo{flex:0 0 auto; font-family:inherit; border:0; background:transparent;
  color:var(--accent-highlight-on-dark); font-weight:800; font-size:14px; cursor:pointer; padding:var(--space-1) 6px;}
.toast-undo:focus-visible{outline:2px solid var(--accent-highlight-on-dark); outline-offset:2px; border-radius:calc(6px * var(--radius-scale));}
@media (prefers-reduced-motion: reduce){
  .toast{transition:opacity .2s ease;}
  .toast.show{transform:translateY(0);}
}

/* Тач-таргеты (HIG/Material: не меньше 44×44) */

/* изолированные — щедро во все стороны */
.tcheck::before{content:''; position:absolute; inset:-11px;}
.mtask-deleg::before, .notif-act::before{content:''; position:absolute; inset:-8px;}
.notif-close::before{content:''; position:absolute; inset:-6px;}
.tcheck, .mtask-deleg, .notif-act, .notif-close{position:relative;}

.tright .iconbtn::before{content:''; position:absolute; top:-12px; bottom:-12px; left:-4px; right:-4px;}
.qadd-row .qflag::before, .qadd-row .qlock::before, .qadd-row .qtmpl::before{
  content:''; position:absolute; top:-9px; bottom:-9px; left:-4px; right:-4px;}
.tright .iconbtn, .qadd-row .qflag, .qadd-row .qlock, .qadd-row .qtmpl{position:relative;}

.ivote-btn::before{content:''; position:absolute; top:-2px; bottom:-2px; left:-10px; right:-10px;}
.ivote-btn{position:relative;}

/* ЭКРАН «НАСТРОЙКИ» (вкладка вместо «Ещё») — карточки-группы со строками-настройками */
.set-wrap{padding:var(--space-2) 0 var(--space-3);}
.set-h{font-size:13px; font-weight:800; letter-spacing:.05em; color:var(--text-secondary);
  text-transform:uppercase; padding:var(--space-4) var(--space-4) var(--space-2);}
.set-card{background:var(--surface-card); border:1px solid var(--border-default); border-radius:calc(16px * var(--radius-scale));
  margin:0 var(--space-4); overflow:hidden;}
/* строка настройки: слева иконка+текст(+подпись), справа управляющий элемент */
.set-row{display:flex; align-items:center; gap:var(--space-3); padding:13px var(--space-4); min-height:52px;}
.set-row + .set-row{border-top:1px solid var(--border-default);}
.set-ic{width:30px; height:30px; border-radius:calc(9px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; background:var(--surface-muted); color:var(--text-secondary);}
.set-ic svg{width:16px; height:16px;}
.set-b{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.set-label{font-size:14px; font-weight:600; color:var(--text-primary);}
.set-sub{font-size:13px; color:var(--text-secondary); line-height:1.35;}
.set-time{font-size:16px; font-weight:700; color:var(--text-primary); font-variant-numeric:tabular-nums; white-space:nowrap;
  letter-spacing:.01em; margin-top:2px;}
.set-val{font-size:14px; font-weight:600; color:var(--text-secondary); flex:0 0 auto;}
/* строка-ссылка (открывает под-экран / действие) — вся кликабельна, шеврон справа */
.set-row.link{cursor:pointer;}

.ctx-empty{font-size:14px; color:var(--text-secondary); font-weight:600; padding:var(--space-3);
  line-height:1.45;}
.ctx-card{display:flex; gap:10px; width:100%; text-align:left; background:var(--surface-card);
  border:1px solid var(--border-default); border-radius:calc(14px * var(--radius-scale));
  padding:var(--space-3); margin-bottom:var(--space-2); font-family:inherit; color:inherit; cursor:pointer;}
.ctx-card:hover{background:var(--surface-canvas);}
.ctx-card:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
/* срочная просьба — полосой слева, а не только цветом текста (§10.5) */
.ctx-card.urgent{border-left:3px solid var(--status-urgent);}
.ctx-ic{width:36px; height:36px; border-radius:calc(10px * var(--radius-scale)); flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-muted); color:var(--text-secondary);}
.ctx-ic svg{width:18px; height:18px;}
.ctx-ic.crit{background:var(--state-critical-surface); color:var(--state-critical-strong);}
.ctx-ic.warn{background:var(--state-caution-surface); color:var(--state-caution-label);}
.ctx-ic.ok{background:var(--status-positive-soft); color:var(--status-positive-strong);}
.ctx-b{flex:1; min-width:0;}
.ctx-tt{display:block; font-size:14px; font-weight:800; line-height:1.25;}
.ctx-sub{display:block; font-size:13px; color:var(--text-secondary); margin-top:3px; line-height:1.4;}
.ctx-due{font-variant-numeric:tabular-nums; white-space:nowrap;}
.ctx-tag{display:inline-block; margin-top:6px; font-size:12px; font-weight:800; letter-spacing:.05em;
  text-transform:uppercase; padding:2px 6px; border-radius:calc(6px * var(--radius-scale));
  background:var(--accent-highlight-soft); color:var(--accent-highlight-strong);}
.ctx-note{font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-secondary); padding:0 var(--space-1) var(--space-2);}
.ctx-h{font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-secondary); padding:var(--space-4) var(--space-1) var(--space-2);}
.ctx-all{display:flex; align-items:center; justify-content:center; gap:6px; width:100%;
  margin-top:var(--space-2); padding:10px var(--space-3); border:1px solid var(--border-default);
  border-radius:calc(12px * var(--radius-scale)); background:var(--surface-card); font-family:inherit;
  font-size:14px; font-weight:700; color:var(--accent-primary); cursor:pointer;}
.ctx-all svg{width:14px; height:14px; transform:rotate(-90deg);}
/* Возврат — та же плашка без иконки: стрелка уже в подписи («← Активные») */
.ctx-all:hover{background:var(--surface-muted);}
.ctx-all:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}

button.set-row{width:100%; text-align:left; background:none; border:0; font:inherit;
  color:inherit; cursor:pointer;}
.set-row .set-pick{color:var(--accent-primary); flex:0 0 auto; display:flex;}
.set-row .set-pick svg{width:18px; height:18px;}
.set-row.link .set-chev{color:var(--border-neutral); flex:0 0 auto; display:flex;}
.set-row.link .set-chev svg{width:18px; height:18px; transform:rotate(-90deg);}
.set-row.danger .set-label{color:var(--status-urgent);}
.set-row.danger .set-ic{color:var(--status-urgent);}
.set-row.st-confirm{align-items:flex-start; flex-wrap:wrap; row-gap:10px;}
.set-row.st-confirm .set-ic{background:none;}
.set-row.st-confirm .set-label{font-weight:600; line-height:1.35;}
.set-confirm-acts{display:flex; gap:var(--space-2); margin-left:auto; flex:0 0 auto;}
.set-confirm-acts .btn{flex:0 0 auto; padding:9px var(--space-4); font-size:13px;
  background:var(--surface-muted); color:var(--text-secondary);}
.set-confirm-acts .btn.danger{background:var(--status-urgent); color:var(--text-on-accent);}

/* ШТОРКА «НАСТРОЙКИ» ЭКРАНА ОТДЕЛА: ОДНА СЕТКА НА ВСЕ БЛОКИ (бренд-бук §9.25) */
.set-block + .set-block{margin-top:calc(var(--space-8) + var(--space-2));}
.set-block:empty{display:none;}
.set-wrap .set-h{padding:0 0 10px;}
.set-wrap .set-card{margin:0;}
.set-wrap .set-note{padding:10px 0 0;}
.set-wrap .set-lead{padding:0 0 var(--space-8);}
.set-wrap .set-row{min-height:56px; padding:14px var(--space-4);}
.set-wrap .set-foot{padding:var(--space-8) 0 0;}
.set-wrap .set-foot-note{display:block; line-height:1.5; margin-bottom:6px;}
.set-wrap .lbl-row .set-input{border-color:transparent; background:transparent; font-size:14px;
  font-weight:600; padding:7px var(--space-2); margin-left:calc(var(--space-2) * -1);}
.set-wrap .lbl-row .set-input:hover,
.set-wrap .lbl-row .set-input:focus{border-color:var(--border-default); background:var(--surface-card);}
.set-wrap .set-card > .thr-table{margin:0; padding:14px var(--space-4); row-gap:14px;
  grid-template-columns:1fr repeat(var(--thr-cols, 2), auto); column-gap:var(--space-6);}
.set-wrap .set-card > .thr-table .thr-cell{justify-content:flex-end;}
.set-wrap .set-card > .thr-table .thr-lbl{justify-content:flex-start;}

/* тумблер (iOS-стиль): пилюля-трек + бегунок; on — акцент-primary. Доступен с клавиатуры */
.switch{width:44px; height:26px; border-radius:calc(20px * var(--radius-scale)); background:var(--border-neutral); position:relative;
  flex:0 0 auto; cursor:pointer; transition:background-color .18s ease; border:0; padding:0;}
.switch::after{content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%;
  background:var(--surface-card); box-shadow:var(--shadow-knob); transition:transform .18s ease;}
.switch.on{background:var(--accent-primary);}
.switch.on::after{transform:translateX(18px);}
.switch:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.switch:disabled{opacity:.4; cursor:not-allowed;}
@media (prefers-reduced-motion: reduce){ .switch, .switch::after{transition:none;} }

/* РЕЛЬС РАЗДЕЛОВ — ВНЕШНИЙ ВИД (общий для обеих раскладок) */
#railNav{ display:flex; flex-direction:column; gap:6px; background:var(--surface-canvas);
  padding:var(--space-5) var(--space-4); overflow-y:auto; scrollbar-width:none; }
#railNav::-webkit-scrollbar{ width:0; }
.rail-brand{ display:flex; align-items:center; gap:9px; padding:6px var(--space-2) var(--space-7); }
.rail-logo{ width:30px; height:30px; border-radius:calc(9px * var(--radius-scale)); background:var(--accent-primary); color:var(--text-on-accent);
  font-weight:800; font-size:13px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.rail-bn{ font-size:14px; font-weight:800; letter-spacing:-.01em; line-height:1.15; }
.rail-bn span{ display:block; font-size:12px; font-weight:600; color:var(--text-secondary); letter-spacing:0; }
.rail-cap{ font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--text-secondary);
  margin:var(--space-4) 0 var(--space-1); padding-left:12px; }
.rail-brand-link{ display:contents; color:var(--text-primary); }
.rail-brand-link:link, .rail-brand-link:visited, .rail-brand-link:hover, .rail-brand-link:active{ color:var(--text-primary); text-decoration:none; }
.rail-brand-link .rail-logo, .rail-brand-link .rail-bn{ cursor:pointer; }
.rail-brand-link:focus-visible .rail-logo{ outline:2px solid var(--accent-primary); outline-offset:2px; }
.rail-gear{ margin-left:auto; flex:0 0 auto; width:32px; height:32px; border-radius:calc(10px * var(--radius-scale));
  border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary);
  cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.rail-gear svg{ width:17px; height:17px; }
.rail-gear:hover{ background:var(--surface-muted); color:var(--text-primary); }
.rail-gear:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.rail-x{ margin-left:auto; flex:0 0 auto; width:32px; height:32px; border-radius:50%;
  border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary);
  cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.rail-x svg{ width:15px; height:15px; }
.rail-x:hover{ background:var(--surface-muted); color:var(--text-primary); }
.rail-x:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.rnav{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) 14px; border-radius:calc(12px * var(--radius-scale));
  color:var(--text-secondary); font-size:14px; font-weight:600; cursor:pointer; }
.rnav svg{ width:20px; height:20px; flex:0 0 auto; }
.rnav:hover{ background:var(--surface-muted); }
.rnav:link, .rnav:visited, .rnav:hover, .rnav:active{ text-decoration:none; color:var(--text-secondary); }
.rnav.on{ background:var(--surface-card); color:var(--accent-primary); box-shadow:var(--shadow); font-weight:700; }
.rnav:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.rnav-badge{ margin-left:auto; flex:0 0 auto; min-width:20px; height:20px; padding:0 6px;
  border-radius:calc(10px * var(--radius-scale)); background:var(--surface-muted); color:var(--text-secondary);
  font-size:13px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap;
  display:flex; align-items:center; justify-content:center; }
.rnav-badge.is-crown{ background:none; padding:0; width:20px; }
.rnav-badge.is-crown svg{ width:18px; height:18px; }
.rail-spacer{ flex:1 1 auto; }
.rail-me{ display:flex; align-items:center; gap:10px; padding:10px 14px; font-size:14px; font-weight:600;
  border-radius:calc(12px * var(--radius-scale)); cursor:pointer; }
.rail-me:hover{ background:var(--surface-muted); }
.rail-me:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.rail-av{ width:28px; height:28px; border-radius:calc(9px * var(--radius-scale)); background:var(--accent-primary); color:var(--text-on-accent);
  font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.rail-me-b{ display:flex; flex-direction:column; min-width:0; gap:1px; }
.rail-me-role{ font-size:12px; font-weight:600; color:var(--text-secondary); }
.rail-me-chev{ margin-left:auto; flex:0 0 auto; display:flex; color:var(--text-secondary);
  transition:transform .18s ease; }
.rail-me-chev svg{ width:16px; height:16px; }
.rail-me[aria-expanded="true"] .rail-me-chev{ transform:rotate(180deg); }

/* ЯРЛЫКИ ЗАДАЧ (`.tlabel`) И СТРОКА ПОИСКА/ФИЛЬТРА (`.sbar`) */
.tlabels{ flex:1 0 100%; display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.trow.has-labels .tbody{ flex-wrap:wrap; }
.tlabel{ font-size:12px; font-weight:700; line-height:1.5; padding:1px 8px; border-radius:calc(8px * var(--radius-scale));
  background:var(--surface-muted); color:var(--text-secondary); border:1px solid var(--border-default); }
.trow.done .tlabel{ opacity:.7; }

/* ПОИСК И ФИЛЬТРЫ ЭКРАНА «СЕГОДНЯ» (`.sbar`) */
.sbar{ display:flex; align-items:stretch; height:38px; margin:var(--space-2) var(--space-4) var(--space-1);
  border:1px solid var(--border-default); border-radius:calc(11px * var(--radius-scale)); background:var(--surface-card);
  overflow:hidden; }
.sbar:focus-within{ border-color:var(--accent-primary); box-shadow:0 0 0 2px var(--accent-primary-soft); }
.sbar-go{ display:flex; align-items:center; justify-content:flex-start; flex:0 0 auto;
  padding:0 var(--space-2) 0 calc(var(--space-4) + 3px);
  border:0; background:transparent; color:var(--text-secondary); cursor:text; }
.sbar-go svg{ width:16px; height:16px; flex:0 0 auto; }
.sbar:focus-within .sbar-go{ color:var(--accent-primary); }
.sbar-in{ flex:1 1 auto; min-width:0; border:0; padding:0 8px 0 4px; font-family:inherit; font-size:16px;
  color:var(--text-primary); background:transparent; }
.sbar-in:focus{ outline:none; }
.sbar-in::placeholder{ color:var(--text-placeholder); }
.sbar-in::-webkit-search-cancel-button{ display:none; }   /* свой крестик, нативный не в стиле */
.sbar-x{ border:0; background:none; color:var(--border-neutral); cursor:pointer; padding:0 9px;
  flex:0 0 auto; display:flex; align-items:center; }
.sbar-x:hover{ color:var(--status-urgent); }
.sbar-x svg{ width:13px; height:13px; }
.sbar-f{ display:flex; align-items:center; justify-content:center; gap:6px; padding:0 11px; border:0;
  border-left:1px solid var(--border-default); background:var(--surface-card);
  color:var(--text-secondary); font-family:inherit; font-size:13.5px; font-weight:650;
  cursor:pointer; flex:0 0 auto; white-space:nowrap; min-width:var(--btn-pill-w); }
.sbar-f:hover{ background:var(--surface-muted); color:var(--text-primary); }
.sbar-f svg{ width:15px; height:15px; flex:0 0 auto; }
.sbar-f.on{ background:var(--accent-primary); color:var(--text-on-accent); }
.sbar-f.on.urgent{ background:var(--status-urgent); }
@media (max-width:359px){
  .sbar-f:not(.on) .lbl{ display:none; }
  .sbar-f{ padding:0 10px; }
  .sbar-f:not(.on), .grp-add{ min-width:0; }
}
.sbar-wrap{ position:relative; }
.sbar-wrap .fpop{ top:calc(100% - var(--space-1)); right:var(--space-4); }
/* Строка результата — только когда что-то ищут или фильтруют; в покое её нет вовсе */
.sfound{ display:flex; align-items:center; gap:8px; margin:0 var(--space-4) var(--space-1);
  font-size:13px; color:var(--text-secondary); }
.sfound b{ color:var(--text-primary); font-weight:700; font-variant-numeric:tabular-nums; }
/* подсветка совпадения в тексте задачи */
.tmark{ background:var(--accent-highlight-soft); color:var(--accent-highlight-strong);
  border-radius:calc(3px * var(--radius-scale)); padding:0 1px; font-weight:700; }

/* ФОРМА ЗАДАЧИ: ДЕДЛАЙН ДАТОЙ И ВЫБОР ЯРЛЫКОВ */
.qadd-field{ display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); margin-top:var(--space-2); }
.qadd-field-h{ font-size:13px; font-weight:700; color:var(--text-secondary); flex:0 0 auto; }
.qadd-date{ flex:0 0 auto; font-size:14px; font-family:inherit; color:var(--text-primary);
  border:1px solid var(--border-default); border-radius:calc(10px * var(--radius-scale)); padding:5px 10px; background:var(--surface-card); }
.qadd-date:focus{ outline:2px solid var(--accent-highlight); outline-offset:1px; }
.qlbl{ flex:0 0 auto; font-size:13px; font-weight:600; padding:5px 11px; border-radius:calc(999px * var(--radius-scale)); cursor:pointer;
  border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary); }
.qlbl.on{ background:var(--accent-primary-soft); border-color:var(--accent-primary); color:var(--accent-primary); font-weight:700; }
.qlbl:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }

/* РЕДАКТОР ЯРЛЫКОВ В НАСТРОЙКАХ */
.lbl-row .set-b{ flex:1 1 auto; min-width:0; }
.lbl-row .set-input{ margin:0; }
.lbl-row .reord{ flex:0 0 auto; }
.lbl-row.is-hidden .set-input{ color:var(--text-secondary); }
/* Корзина ярлыка: та же анатомия, что у корзины задачи (`.tdel`) — своих цветов
   у неё нет, красной она становится только под курсором: удаление физическое,
   и кнопка не должна звать к себе в спокойном состоянии */
.lbl-row .lbl-del{ background:transparent; border:1px solid var(--border-default);
  color:var(--text-secondary); margin-left:var(--space-2); }
.lbl-row .lbl-del svg{ width:14px; height:14px; }
.lbl-row .lbl-del:hover{ border-color:var(--status-urgent); color:var(--status-urgent); }
.lbl-row .lbl-del:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.set-row.set-add{ color:var(--accent-primary); font-weight:700; cursor:pointer; }
.set-row.set-add .set-ic{ color:var(--accent-primary); }

/* МЕНЮ РОЛИ ПРОСМОТРА (под именем в рельсе) */
.rolemenu{ margin:0 0 6px; padding:6px; border:1px solid var(--border-default); border-radius:calc(14px * var(--radius-scale));
  background:var(--surface-card); box-shadow:var(--shadow); }
.rolemenu-h{ padding:6px 10px 4px; font-size:12px; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; color:var(--text-secondary); }
.rolemenu-item{ display:flex; align-items:flex-start; gap:8px; padding:8px 10px;
  border-radius:calc(10px * var(--radius-scale)); cursor:pointer; }
.rolemenu-item:hover{ background:var(--surface-muted); }
.rolemenu-item:focus-visible{ outline:2px solid var(--accent-highlight); outline-offset:2px; }
.rolemenu-check{ flex:0 0 auto; width:16px; height:16px; margin-top:2px; color:var(--accent-primary);
  display:flex; align-items:center; justify-content:center; visibility:hidden; }
.rolemenu-item.on .rolemenu-check{ visibility:visible; }
.rolemenu-check svg{ width:14px; height:14px; }
.rolemenu-b{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.rolemenu-t{ font-size:14px; font-weight:600; line-height:1.3; }
.rolemenu-item.on .rolemenu-t{ font-weight:700; color:var(--accent-primary); }
.rolemenu-s{ font-size:12px; color:var(--text-secondary); line-height:1.35; }
.rolemenu-sep{ height:1px; margin:6px; background:var(--border-default); }
/* Выход под именем (shared/modules/rail-me.js): опасное действие красится как строка
   «Выйти» в настройках, а иконка занимает то же место, что галочка выбранной роли */
.rolemenu-item.danger .rolemenu-check{ visibility:visible; color:var(--status-urgent); }
.rolemenu-item.danger .rolemenu-t{ color:var(--status-urgent); }

/* КОНТЕКСТ ПОД МЕНЮ (ссылка «Дайджест к планёрке») */
#railContext{ display:contents; }

/* АДАПТИВ — добавлен ПОВЕРХ мобильного каркаса (правила выше не тронуты) */

/* < 1200px — МОБИЛЬНАЯ РАСКЛАДКА */
@media (max-width:1199px){
  /* зазор под нижнюю панель (была 88px под таб-бар той же высоты) */
  .screen{ padding-bottom:calc(84px + env(safe-area-inset-bottom)); }

  #railNav{ position:absolute; z-index:35; inset:0; width:auto;
    padding-bottom:calc(84px + env(safe-area-inset-bottom));
    transform:translateX(-102%); visibility:hidden;
    transition:transform .26s cubic-bezier(.22,.75,.25,1), visibility .26s; }
  body.mnav-open #railNav{ transform:translateX(0); visibility:visible; }
  .rail-gear{ display:none; }          /* настройки — отдельная кнопка нижней панели */

  #ctxRail{ position:absolute; z-index:35; inset:0; display:flex; flex-direction:column;
    background:var(--surface-canvas); padding:var(--space-4) var(--space-4) calc(84px + env(safe-area-inset-bottom));
    overflow-y:auto; transform:translateX(102%); visibility:hidden;
    transition:transform .26s cubic-bezier(.22,.75,.25,1), visibility .26s; }
  body.mctx-open #ctxRail{ transform:translateX(0); visibility:visible; }

  .topbar .title-gear, .topbar .tb-gear, .topbar .tb-bell, .topbar .tb-settings{ display:none; }
}

/* ≤ 720px — ЭКРАН ЦЕЛИКОМ, БЕЗ «РАМКИ ТЕЛЕФОНА» */
@media (max-width:720px){
  body{ display:block; padding:0; gap:0; }
  #app{ width:100%; max-width:none; margin:0; border-radius:0; box-shadow:none;
    height:100vh; height:100dvh; }
}

@media (min-width:1200px){
  body{ padding:var(--space-6); }

  #app{ flex:1 1 auto; min-width:0; max-width:1400px; margin:0; --rail-l:267px; --rail-r:433px;
    height:min(900px, calc(100vh - 48px)); border-radius:calc(20px * var(--radius-scale));
    display:grid; grid-template-columns:var(--rail-l) minmax(0,1fr) var(--rail-r); grid-template-rows:100%; }

  #digestPanel{ left:var(--rail-l); right:var(--rail-r); top:0; bottom:0;
    border-left:1px solid var(--border-default); border-right:1px solid var(--border-default); box-shadow:var(--shadow); }

  #app > .screen{ grid-column:2; grid-row:1; min-width:0; padding:0 var(--space-2) var(--space-7);
    border-left:1px solid var(--border-default); border-right:1px solid var(--border-default); }
  /* больше воздуха между карточками контента */
  #app > .screen .trow, #app > .screen .kpi,
  #app > .screen .member-wrap, #app > .screen .idea{ margin-bottom:var(--space-3); }

  /* нижняя панель уходит в рельсы */
  .mbar{ display:none; }

  /* ЛЕВЫЙ РЕЛЬС — КОЛОНКА СЕТКИ (вид — выше, в общем блоке) */
  #railNav{ grid-column:1; grid-row:1; }
  /* рельс здесь не шторка, а колонка: крестик «закрыть» не нужен */
  .rail-x{ display:none; }

  /* ПРАВЫЙ РЕЛЬС — ТОЛЬКО ОПОВЕЩЕНИЯ, ВО ВСЮ ВЫСОТУ */
  #ctxRail{ display:flex; grid-column:3; grid-row:1; flex-direction:column;
    padding:var(--space-5) 18px var(--space-2); background:var(--surface-canvas); overflow:hidden; }
  /* заголовок фиксирован сверху, список скроллится внутри — оповещений может быть много */
  #ctxRail .notif-top{ display:none; }
  #ctxRail .notif-title{ font-size:13px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
    color:var(--text-secondary); }
  #ctxRail .notif-close{ display:none; }
  #ctxRail .notif-list{ flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none; }
  #ctxRail .notif-list::-webkit-scrollbar{ width:0; }
  /* больше воздуха внутри строки — иконка не липнет к левому краю (по фидбэку) */
  #ctxRail .notif-item{ padding:var(--space-4) var(--space-2); gap:10px; }
  #ctxRail .notif-bar{ padding:var(--space-2) var(--space-2) 10px; }
  #ctxRail .notif-ic{ width:40px; height:40px; }
  #ctxRail .notif-ic svg{ width:20px; height:20px; }

  /* КРУПНЕЕ на большом экране (по решению: шрифт и кольца) */
  #app > .screen .topbar-role{ font-size:20px; }
  #app > .screen .kpi-name{ font-size:16px; }
  #app > .screen .kpi-val{ font-size:20px; }
  #app > .screen .solved, #app > .screen .rings,
  #app > .screen .hero, #app > .screen .lhero{ height:248px; }
  #app > .screen .solved, #app > .screen .rings{ display:flex; flex-direction:column; padding:var(--space-5) 22px; }

  /* «Сегодня» — вариант B: две зоны (число ПО ЦЕНТРУ и КРУПНЕЕ · разделитель · крупный график) */
  #app > .screen .solved-top{ flex:1 1 auto; gap:var(--space-6); align-items:stretch; }
  #app > .screen .solved-l{ flex:0 0 36%; display:flex; flex-direction:column;
    align-items:center; justify-content:center; text-align:center; }
  #app > .screen .solved-num{ margin-top:10px; }
  #app > .screen .solved-num .n-pale{ font-size:56px; }   /* десктоп-размер hero-числа (мобайл 46); единственная новая display-величина */
  #app > .screen .solved-chart{ --sc-scale:1.35; height:auto; gap:6px; align-items:flex-end;
    border-left:1px solid var(--hdiv); padding-left:var(--space-6); }
  #app > .screen .sc-bar{ max-width:30px; }

  #app > .screen .rings-row{ flex:1 1 auto; align-items:center; }
  #app .ring-item{ gap:var(--space-3); }
  #app .ring-item .ring{ --ring-d:clamp(84px, 74cqi, 140px); width:var(--ring-d); height:var(--ring-d); }
  #app .ring-item .ring svg{ width:100%; height:100%; }
  #app .ring-item .ring .num{ font-size:calc(var(--ring-d) * 0.2); }
  #app .ring-label{ font-size:13px; }
}

/* строка приглушается, когда её тумблер выключен главным (напр. все оповещения при выкл. пуше) */
.set-row.muted{opacity:.45; pointer-events:none;}

.set-profile{display:flex; align-items:center; gap:14px; padding:var(--space-4);}
.set-av{background:var(--av-color, var(--av-data, var(--accent-primary)));width:52px; height:52px; border-radius:calc(16px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; background:var(--accent-primary); color:var(--text-on-accent); font-weight:700; font-size:20px;
  border:0; cursor:pointer; padding:0; position:relative; transition:transform .12s ease;}
.set-av:active{transform:scale(.94);}
.set-av::after{content:''; position:absolute; right:-4px; bottom:-4px; width:20px; height:20px;
  border-radius:50%; border:2px solid var(--surface-card); background:var(--accent-highlight)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19h4L18 10l-4-4L5 15z'/%3E%3C/svg%3E") center/11px 11px no-repeat;}
.set-av:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.set-profile-b{flex:1; min-width:0;}
.set-input{display:block; width:100%; border:1px solid var(--border-default); border-radius:calc(12px * var(--radius-scale));
  padding:11px var(--space-3); font-size:16px; font-family:inherit; background:var(--surface-card); color:var(--text-primary);}
.set-input:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}
.set-profile-role{display:block; font-size:13px; color:var(--text-secondary); margin-top:6px; padding-left:2px;}

.set-colorpick{display:flex; align-items:center; gap:var(--space-3); padding:2px var(--space-4) var(--space-4); flex-wrap:wrap;}
.set-colorpick[hidden]{display:none;}
.set-swatch{background:var(--av-color, var(--av-data, var(--accent-primary)));width:30px; height:30px; border-radius:50%; border:0; padding:0; cursor:pointer; flex:0 0 auto;
  position:relative; transition:transform .12s ease;}
.set-swatch:active{transform:scale(.9);}
.set-swatch.on{box-shadow:0 0 0 2px var(--surface-card), 0 0 0 4px var(--text-primary);}
.set-swatch:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:3px;}

.set-note{font-size:13px; color:var(--text-secondary); line-height:1.5; padding:var(--space-2) var(--space-5) 0;}
.set-foot{text-align:center; font-size:13px; color:var(--text-secondary); padding:var(--space-5) var(--space-4) var(--space-2);}

@media print {
  body.digest-open{ background:var(--surface-card); padding:0; display:block; }
  body.digest-open #railNav, body.digest-open #ctxRail,
  body.digest-open .mbar, body.digest-open .notif, body.digest-open .rsheet,
  body.digest-open .toast, body.digest-open .award-pop, body.digest-open #app > .screen{ display:none !important; }
  body.digest-open #app{ display:block; position:static; max-width:none; width:auto; height:auto;
    box-shadow:none; border-radius:0; overflow:visible; }
  body.digest-open #digestPanel{ position:static !important; left:auto; right:auto; top:auto; bottom:auto;
    height:auto; box-shadow:none; border:0; display:flex !important; }
  body.digest-open #digestPanel .digest-act, body.digest-open #digestPanel .digest-close{ display:none !important; }
  body.digest-open #digestPanel .digest-list{ overflow:visible !important; }
}

/* ТЕМЫ ОФОРМЛЕНИЯ (используется координаторскими экранами: dashboard.php) */
:root[data-theme="onlytell"]{
  --accent-primary:#2C777E; --accent-primary-soft:#DCF0F1;   /* свежий аквамарин (затемн.) */
  --accent-secondary:#7A6660;                                /* тёплый шоколад-таупе */
  --accent-highlight:#C25E28; --accent-highlight-soft:#FBE7D9; --accent-highlight-strong:#A8461B; /* солнечный импульс */
  --status-positive:#3E7D58; --status-positive-soft:#E3F0E5; /* прибыль/ok — тёплый зелёный */
  --status-caution:#A16017;                                  /* амбер — отличается от импульса */
  --status-urgent:#B23A2E; --status-urgent-soft:#F7E1DD;     /* терракотовый красный */
  --page-bg:#EFE7DF;
  --surface-canvas:#F8F4F0; --surface-card:#FFFFFF; --surface-muted:#F1EBE5; /* молочный / карточка / приглушённый */
  --text-primary:#4E3F3F; --text-secondary:#6E5C5C; --ink-strong:#3B2F2F;    /* тёмный шоколад */
  --border-default:#EBE1D8; --border-neutral:#CBBDB1;
  --border-accent:#BFE0E1;                                   /* аквамариновая граница «Северной звезды» */
  --shadow: 0 1px 2px rgba(78,63,63,.05), 0 8px 24px rgba(78,63,63,.07);
  --state-positive-surface:#D7E9C9; --state-positive-border:#C6DCB0;
  --state-caution-surface:#F3E1CB; --state-caution-border:#E1B889; --state-caution-label:#7E4A12;
  --state-critical-surface:#F3D2CB; --state-critical-border:#E3A89B; --state-critical-strong:#6B2419;
  --hot-warn-bg:#F7EBD8; --hot-warn-bd:#E7CDA4;
  --hot-crit-bg:#FBE3DB; --hot-crit-bd:#ECC2B6;
}

/* HERO КООРДИНАТОРСКОГО АРХЕТИПА (`.hero`, dashboard.php/personnel.php) */
.hero{border-radius:calc(16px * var(--radius-scale)); padding:var(--space-5); margin-bottom:var(--space-2); border:1px solid transparent; box-shadow:var(--shadow);
  background:var(--state-positive-surface); border-color:var(--state-positive-border);}
.hero.calm{background:var(--state-positive-surface); border-color:var(--state-positive-border);}
.hero.warn{background:var(--state-caution-surface); border-color:var(--state-caution-border);}
.hero.crit{background:var(--state-critical-surface); border-color:var(--state-critical-border);}
.hero-top{display:flex; align-items:flex-start; gap:var(--space-4);}
.hero-l{flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:2px;}
.hero-cap{font-size:12px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--state-positive-label);}
.hero.calm .hero-cap{color:var(--state-positive-label);}
.hero.warn .hero-cap{color:var(--state-caution-label);}
.hero.crit .hero-cap{color:var(--state-critical-strong);}
.hero-status-word{font-weight:800;}
.hero-num{margin-top:2px; font-weight:800; letter-spacing:-.02em; color:var(--text-primary); line-height:1;
  display:flex; align-items:baseline; gap:7px;}
.hero-num .big{font-size:44px;}
.hero-num .tot{font-size:20px; opacity:.55; font-weight:700;}
.hero-num .u{font-size:16px; font-weight:700; color:var(--on-state-secondary);}
.hero-num .hn-more{font-size:20px; font-weight:800; color:var(--accent-highlight); align-self:flex-start; line-height:1;}
.hero-num:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:3px; border-radius:calc(6px * var(--radius-scale));}
.hero-bar{height:7px; width:100%; max-width:230px; border-radius:calc(5px * var(--radius-scale)); background:rgba(51,48,42,.1); overflow:hidden; margin-top:9px;}
.hero-bar i{display:block; height:100%; border-radius:calc(5px * var(--radius-scale)); background:var(--status-positive);}
.hero.warn .hero-bar i{background:linear-gradient(90deg, var(--state-caution-label), var(--accent-highlight));}
.hero.crit .hero-bar i{background:linear-gradient(90deg, var(--accent-highlight), var(--status-urgent));}
.hero-barcap{font-size:12px; color:var(--on-state-secondary); font-weight:600; margin-top:5px;}
.hero-r{flex:0 0 auto; align-self:center;}
.hero-signals{display:flex; flex-direction:column; gap:8px;}
.hero-stat{display:flex; align-items:center; justify-content:flex-end; gap:7px; cursor:pointer;}
.hero-stat:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px; border-radius:calc(6px * var(--radius-scale));}
.hs-ic{width:22px; height:22px; border-radius:calc(7px * var(--radius-scale)); flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.hs-ic svg{width:13px; height:13px;}
.hs-ic.warn{background:var(--state-caution-surface); color:var(--state-caution-label);}
.hs-ic.crit{background:var(--state-critical-surface); color:var(--state-critical-strong);}
.hs-ic.wait{background:var(--accent-primary-soft); color:var(--accent-primary);}
.hs-v{font-size:16px; font-weight:800; color:var(--text-primary);}
.hero-money{display:flex; gap:var(--space-5); margin-top:var(--space-4); padding-top:var(--space-3); border-top:1px solid rgba(51,48,42,.09);}
.hm-i{flex:1; min-width:0;}
.hm-l{font-size:12px; font-weight:600; color:var(--on-state-secondary);}
.hm-v{margin-top:2px; font-size:16px; font-weight:800; color:var(--text-primary);}
.hm-v.pos{color:var(--on-state-positive);}
.hero-money-locked{display:flex; align-items:center; gap:8px; margin-top:var(--space-4); padding-top:var(--space-3);
  border-top:1px solid rgba(51,48,42,.09); font-size:13px; color:var(--on-state-secondary); font-weight:600;}
.hero-money-locked svg{width:14px; height:14px; flex:0 0 auto; opacity:.7;}

/* РЕЛЬС КООРДИНАТОРСКОГО ЭКРАНА — БРЕНД-БУК §9.16 (`#railNav`/`#ctxRail`) */
@media (min-width:1200px){
  .rail-logo img{width:100%; height:100%; object-fit:cover; border-radius:inherit;}
  .rail-back{display:flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:calc(10px * var(--radius-scale));
    border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary); cursor:pointer; flex:0 0 auto;}
  .rail-back svg{width:16px; height:16px;}
  .rail-back:hover{background:var(--surface-muted); color:var(--text-primary);}
  .rail-hire{margin-left:auto; flex:0 0 auto; width:32px; height:32px; border-radius:calc(10px * var(--radius-scale));
    border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary);
    cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;}
  .rail-hire svg{width:16px; height:16px;}
  .rail-hire:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
  .rnav .rn-badge{margin-left:auto; flex:0 0 auto; min-width:20px; height:20px; padding:0 6px; border-radius:calc(10px * var(--radius-scale));
    background:var(--surface-muted); color:var(--text-secondary); font-size:13px; font-weight:800;
    font-variant-numeric:tabular-nums; white-space:nowrap; display:flex; align-items:center; justify-content:center;}
  .rnav.on .rn-badge{background:var(--accent-primary-soft); color:var(--on-soft-accent);}
  .rail-me-av{width:28px; height:28px; border-radius:calc(9px * var(--radius-scale)); background:var(--accent-primary); color:var(--text-on-accent);
    font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:0 0 auto;}
  .rail-me-n{font-size:14px; font-weight:700;}
  .rail-me-r{font-size:13px; color:var(--text-secondary);}
}

/* ДИАЛОГ ПОДТВЕРЖДЕНИЯ `.confirm` — БРЕНД-БУК §9.22. Модальное окно поверх */
.confirm{position:absolute; inset:0; z-index:80; display:flex; align-items:center; justify-content:center;}
.confirm[hidden]{display:none !important;}
.confirm-backdrop{position:absolute; inset:0; background:rgba(51,48,42,.42); opacity:0; transition:opacity .18s ease;}
.confirm.open .confirm-backdrop{opacity:1;}
.confirm-card{position:relative; background:var(--surface-card); border-radius:calc(16px * var(--radius-scale)); padding:var(--space-5); width:300px; max-width:calc(100% - 40px);
  box-shadow:var(--shadow); transform:scale(.96); opacity:0; transition:transform .18s ease, opacity .18s ease;}
.confirm.open .confirm-card{transform:none; opacity:1;}
.confirm-msg{font-size:14px; font-weight:700; line-height:1.4; margin-bottom:var(--space-4);}
.confirm-acts{display:flex; gap:var(--space-3);}
.confirm-cancel{flex:1; padding:10px; border-radius:calc(10px * var(--radius-scale)); border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-primary); font-weight:700; font-size:14px; cursor:pointer;}
.confirm-ok{flex:1; padding:10px; border-radius:calc(10px * var(--radius-scale)); border:0; background:var(--status-urgent); color:var(--text-on-accent); font-weight:800; font-size:14px; cursor:pointer;}
@media (prefers-reduced-motion: reduce){ .confirm-backdrop, .confirm-card{transition:none;} }

/* ЗАБЛОКИРОВАННЫЙ КОНТЕНТ ПО ПРАВАМ `.locked` — БРЕНД-БУК §9.21. Честная */
.locked{background:var(--surface-muted); border:1px dashed var(--border-neutral); border-radius:calc(16px * var(--radius-scale)); padding:var(--space-5);
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:2px;}
.locked svg{width:22px; height:22px; color:var(--text-secondary);}
.locked .t{font-size:14px; font-weight:700; margin-top:8px;}
.locked .s{font-size:13px; color:var(--text-secondary); margin-top:4px;}

/* СТЕППЕР `.stepper` — числовой ввод +/- (напр. дни отпуска, ставка). * */
.stepper{display:flex; align-items:center; gap:2px; flex:0 0 auto;}
.stepper button{width:28px; height:28px; border-radius:calc(8px * var(--radius-scale)); border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-primary); font-size:16px; font-weight:800; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; line-height:1;}
.stepper button:hover{background:var(--surface-muted);}
.stepper .stepper-v{min-width:26px; text-align:center; font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap;}
.stepper.sm{gap:1px;}
.stepper.sm button{width:22px; height:22px; border-radius:calc(6px * var(--radius-scale)); font-size:14px; font-weight:600;}
.stepper.sm button:hover{background:var(--surface-muted); color:var(--text-primary);}
.stepper.sm .stepper-v{min-width:17px; font-size:14px; font-weight:400;}

/* ТАБЛИЦА ПОРОГОВ НАГРУЗКИ `.thr-table` — строки-уровни (Жёлтый/Красный) × */
.thr-table{display:grid; grid-template-columns:auto repeat(var(--thr-cols, 3), 1fr); column-gap:6px; row-gap:10px; align-items:center; margin-top:var(--space-2);}
.thr-row{display:contents;}
.thr-cell{display:flex; align-items:center; justify-content:center; min-width:0;}
.thr-head .thr-cell{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; color:var(--text-secondary); text-align:center;}
.thr-lbl{justify-content:flex-start; gap:6px; font-size:13px; font-weight:700; white-space:nowrap; flex:0 0 auto;}
.thr-dot{width:10px; height:10px; border-radius:50%; flex:0 0 auto; background:var(--border-neutral);}
.thr-dot.warn{background:var(--status-caution);}
.thr-dot.crit{background:var(--status-urgent);}
.set-card > .thr-table{margin:0; padding:13px var(--space-4);}

/* ОБЩИЕ КНОПКИ `.btn` И ФИЛЬТР-ЧИПЫ `.chip`/`.chipset` */
.chipset{display:flex; flex-wrap:wrap; gap:var(--space-2);}
.chip{font-size:13px; font-weight:700; padding:8px 12px; border-radius:calc(20px * var(--radius-scale)); border:1px solid var(--border-default); background:var(--surface-card); color:var(--text-secondary); cursor:pointer; font-family:inherit;}
.chip.on{background:var(--accent-primary-soft); border-color:var(--accent-primary); color:var(--accent-primary);}
.chip:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.btn{flex:1; border:0; border-radius:calc(12px * var(--radius-scale)); padding:13px; font-weight:800; font-size:14px; cursor:pointer; font-family:inherit;}
.btn.primary{background:var(--ink-strong); color:var(--text-on-accent);}
.btn.primary:disabled{opacity:.45; cursor:not-allowed;}
.btn.ghost{background:var(--surface-muted); color:var(--text-secondary); flex:0 0 auto; padding:13px var(--space-5);}
.btn:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}

/* ЕДИНЫЙ ИНФОРМЕР — ОДИН РАЗМЕР НА ВЕСЬ ПРОЕКТ (БРЕНД-БУК §9.2) */
.solved, .rings, .hero, .lhero{
  box-sizing:border-box; height:200px; overflow:hidden;
  margin:0 var(--space-4) var(--space-3);
  border-radius:calc(16px * var(--radius-scale)); box-shadow:var(--shadow);}
.hero, .lhero{display:flex; flex-direction:column;}
.hero-top, .lhero-top{flex:1 1 auto; min-height:0; align-items:stretch;}
.hero-l, .lhero-l{justify-content:center;}

/* НИЖНИЙ ШИТ С ФОРМОЙ (`.sheet`) И ПОЛЯ ФОРМ (`.f-*`) — ОБЩИЙ ХРОМ */
.sheet-back{position:absolute; inset:0; background:rgba(51,48,42,.42); opacity:0; transition:opacity .25s; z-index:40;}
.sheet-back.open{opacity:1;}
.sheet{position:absolute; left:0; right:0; top:0; bottom:0; z-index:41; background:var(--surface-card); border-radius:0;
  box-shadow:var(--shadow-sheet); padding:0 var(--space-4) var(--space-6); transform:translateY(100%); transition:transform .25s;
  display:flex; flex-direction:column; overflow-y:auto;}
.sheet.open{transform:translateY(0);}
.sheet-grip{display:none;}
.sheet-title{font-size:16px; font-weight:800; margin-bottom:var(--space-4);}
.sheet-head{position:sticky; top:0; z-index:3; flex:0 0 auto;
  display:flex; align-items:center; gap:var(--space-3); background:var(--surface-card);
  margin:0 calc(var(--space-4) * -1) var(--space-6); padding:var(--space-5) var(--space-4) var(--space-4);}
.sheet-head .sheet-title{flex:1; min-width:0; margin-bottom:0;}
.sheet-acts{flex:0 0 auto; display:flex; gap:var(--space-2); margin-top:auto; padding-top:var(--space-6);}
.f-lbl{font-size:13px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; color:var(--text-secondary); margin:var(--space-6) 0 var(--space-2); display:block;}
.f-in{width:100%; border:1px solid var(--border-default); border-radius:calc(10px * var(--radius-scale)); padding:10px var(--space-3); font:inherit; font-size:16px; background:var(--surface-card); color:var(--text-primary);}
.f-in:focus{outline:2px solid var(--accent-highlight); outline-offset:1px;}
textarea.f-in{resize:none; min-height:64px;}
.f-row{display:flex; gap:var(--space-3);} .f-row .f-col{flex:1; min-width:0;}
@media (prefers-reduced-motion:reduce){ .sheet, .sheet-back{transition:none;} }

/* ПРАВИЛО ПРОЕКТА: ОВЕРЛЕЙ ОТКРЫВАЕТСЯ ТОЛЬКО НА ШИРИНУ ЦЕНТРАЛЬНОЙ */
@media (min-width:1200px){
  #app .rsheet, #app .sheet, #app .sheet-back, #app .notif, #app .confirm{
    left:var(--rail-l); right:var(--rail-r); }
  /* тост — та же колонка плюс его собственные боковые поля */
  #app .toast{ left:calc(var(--rail-l) + var(--space-4)); right:calc(var(--rail-r) + var(--space-4)); }
}

/* ПОЛОСА ПРОКРУТКИ — ОДНА НА ВСЁ ПРИЛОЖЕНИЕ */
*{ scrollbar-width:thin; scrollbar-color:rgba(51,48,42,.16) transparent; }
*::-webkit-scrollbar{ width:3px; height:3px; }
*::-webkit-scrollbar-track{ background:transparent; }
*::-webkit-scrollbar-thumb{ background:rgba(51,48,42,.16); border-radius:calc(99px * var(--radius-scale)); }
*::-webkit-scrollbar-thumb:hover{ background:rgba(51,48,42,.3); }

/* ВНУТРЕННЯЯ ПЕРЕПИСКА — ОБЩИЙ БЛОК ПРАВОГО РЕЛЬСА (shared/modules/messages.js) */
.msgs-seg{flex:0 0 auto; margin:0 0 var(--space-3);}
.msgs-dot{display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--status-urgent);
  margin-left:6px; vertical-align:2px;}

.msgs-panel{position:absolute; inset:0; z-index:30; display:flex; flex-direction:column;
  background:var(--surface-canvas); padding:inherit;}
.msgs-panel[hidden]{display:none;}
.msgs-list{flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none;
  display:flex; flex-direction:column; gap:var(--space-2); padding-bottom:var(--space-3);}
.msgs-list::-webkit-scrollbar{width:0; height:0; display:none;}
.msgs-list > *, .msgs-picks > *, .msgs-feed > *{flex:0 0 auto;}
.msgs-empty{font-size:14px; font-weight:600; color:var(--text-secondary); text-align:center;
  padding:var(--space-6) var(--space-3);}
.msgs-note{display:flex; gap:8px; align-items:flex-start; font-size:12px; line-height:1.4;
  color:var(--text-secondary); background:var(--surface-muted); border:1px solid var(--border-default);
  border-radius:calc(12px * var(--radius-scale)); padding:9px 11px;}
.msgs-note svg{width:14px; height:14px; flex:0 0 auto; margin-top:1px;}
.msgs-note.warn{color:var(--state-caution-label); background:var(--state-caution-surface);
  border-color:var(--state-caution-border);}

/* строка ветки */
.msgs-th{display:flex; gap:10px; width:100%; text-align:left; background:var(--surface-card);
  border:1px solid var(--border-default); border-radius:calc(14px * var(--radius-scale));
  padding:11px 12px; cursor:pointer; font-family:inherit;}
.msgs-th:hover{background:var(--surface-hover);}
.msgs-th.new{border-color:var(--border-neutral); box-shadow:var(--shadow-1);}
.msgs-th:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.msgs-av{width:36px; height:36px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:calc(11px * var(--radius-scale)); font-size:12px; font-weight:800;
  color:var(--text-on-accent); background:var(--av-color, var(--av-data, var(--accent-primary)));}
.msgs-b{flex:1; min-width:0;}
.msgs-top{display:flex; align-items:baseline; gap:8px;}
.msgs-n{font-size:14px; font-weight:800; color:var(--text-primary); white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis;}
.msgs-when{margin-left:auto; font-size:12px; color:var(--text-secondary); white-space:nowrap;
  font-variant-numeric:tabular-nums;}
.msgs-snip{font-size:13px; color:var(--text-secondary); line-height:1.35; margin-top:2px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.msgs-snip b{color:var(--text-primary); font-weight:600;}
.msgs-foot{display:flex; align-items:center; gap:6px; margin-top:7px; flex-wrap:wrap;}
.msgs-pill{font-size:11px; font-weight:800; letter-spacing:.03em; color:var(--text-on-accent);
  border-radius:calc(20px * var(--radius-scale)); padding:2px 8px;
  background:var(--av-color, var(--av-data, var(--accent-primary)));}
/* Ветка команды: руководитель видит её по праву, а не как участник (§9.16б) */
.msgs-tag{display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:800;
  letter-spacing:.03em; color:var(--text-secondary); background:var(--surface-muted);
  border:1px solid var(--border-default); border-radius:calc(20px * var(--radius-scale)); padding:2px 8px;}
.msgs-tag svg{width:12px; height:12px;}
.msgs-unread{margin-left:auto; display:inline-flex; align-items:center; gap:5px; font-size:12px;
  font-weight:800; color:var(--status-urgent); font-variant-numeric:tabular-nums;}
.msgs-unread i{width:8px; height:8px; border-radius:50%; background:var(--status-urgent); display:block;}

.msgs-head{display:flex; align-items:center; gap:10px; padding:0 0 var(--space-3);
  border-bottom:1px solid var(--border-default); margin-bottom:var(--space-3);}
.msgs-ic{width:32px; height:32px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:calc(10px * var(--radius-scale)); border:1px solid var(--border-default);
  background:var(--surface-card); color:var(--text-secondary); cursor:pointer; font-family:inherit;}
.msgs-ic:hover{background:var(--surface-hover); color:var(--text-primary);}
.msgs-ic svg{width:16px; height:16px;}
.msgs-hb{flex:1; min-width:0;}
.msgs-hn{display:block; font-size:15px; font-weight:800; line-height:1.2; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;}
.msgs-hs{display:block; font-size:12px; color:var(--text-secondary); margin-top:1px;}

/* лента сообщений */
.msgs-feed{display:flex; flex-direction:column; gap:var(--space-3);}
.msgs-list[data-feed] > :first-child{margin-top:auto;}
.msgs-day{display:flex; align-items:center; gap:10px; font-size:12px; font-weight:800; letter-spacing:.05em;
  text-transform:uppercase; color:var(--text-secondary);}
.msgs-day::before, .msgs-day::after{content:""; flex:1; height:1px; background:var(--border-default);}
.msgs-m{display:flex; flex-direction:column; max-width:86%;}
.msgs-m.out{align-self:flex-end; align-items:flex-end;}
.msgs-who{font-size:12px; font-weight:700; color:var(--text-secondary); margin-bottom:3px;}
.msgs-bub{background:var(--surface-card); border:1px solid var(--border-default);
  border-radius:calc(14px * var(--radius-scale)) calc(14px * var(--radius-scale))
               calc(14px * var(--radius-scale)) calc(5px * var(--radius-scale));
  padding:10px 12px; font-size:14px; line-height:1.45; color:var(--text-primary); white-space:pre-wrap;}
.msgs-m.out .msgs-bub{background:var(--accent-primary-soft); border-color:var(--accent-primary-soft);
  border-radius:calc(14px * var(--radius-scale)) calc(14px * var(--radius-scale))
               calc(5px * var(--radius-scale)) calc(14px * var(--radius-scale));}
.msgs-meta{display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text-secondary);
  margin-top:4px; font-variant-numeric:tabular-nums;}

.msgs-file{display:flex; align-items:center; gap:9px; margin-top:8px; background:var(--surface-muted);
  border:1px solid var(--border-default); border-radius:calc(10px * var(--radius-scale)); padding:8px 10px;
  color:inherit; text-decoration:none;}
a.msgs-file:hover{background:var(--surface-hover); border-color:var(--border-neutral);}
a.msgs-file:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.msgs-m.out .msgs-file{background:var(--surface-card);}
.msgs-fic{width:28px; height:28px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:calc(8px * var(--radius-scale)); background:var(--accent-primary); color:var(--text-on-accent);}
.msgs-fic svg{width:15px; height:15px;}
.msgs-fn{display:block; font-size:13px; font-weight:700; line-height:1.25; word-break:break-word;}
.msgs-fs{display:block; font-size:11px; color:var(--text-secondary); font-variant-numeric:tabular-nums;}

.msgs-comp{flex:0 0 auto; border-top:1px solid var(--border-default); background:var(--surface-canvas);
  padding:var(--space-3) 0; display:flex; flex-direction:column;
  gap:var(--space-2);}
.msgs-to{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-secondary); flex-wrap:wrap;}
.msgs-chip{display:inline-flex; align-items:center; gap:7px; background:var(--surface-card);
  border:1px solid var(--border-neutral); border-radius:calc(20px * var(--radius-scale)); padding:3px 4px;
  font-size:13px; font-weight:700; color:var(--text-primary);}
.msgs-chip .msgs-av{width:22px; height:22px; border-radius:calc(7px * var(--radius-scale)); font-size:10px;}
.msgs-x{width:20px; height:20px; flex:0 0 auto; border-radius:50%; border:0; background:transparent;
  color:var(--text-secondary); display:flex; align-items:center; justify-content:center; cursor:pointer;
  font-family:inherit;}
.msgs-x:hover{color:var(--status-urgent);}
.msgs-x svg{width:11px; height:11px;}
.msgs-atts{display:flex; flex-direction:column; gap:6px;}
.msgs-att{display:flex; align-items:center; gap:9px; background:var(--surface-card);
  border:1px solid var(--border-default); border-radius:calc(10px * var(--radius-scale)); padding:6px 8px;}
.msgs-att .msgs-fic{width:26px; height:26px;}
.msgs-att .msgs-x{margin-left:auto; width:24px; height:24px; border-radius:calc(8px * var(--radius-scale));}
.msgs-att .msgs-x svg{width:12px; height:12px;}
.msgs-box{display:flex; align-items:flex-end; gap:6px; background:var(--surface-card);
  border:1px solid var(--border-default); border-radius:calc(14px * var(--radius-scale)); padding:6px;}
.msgs-box:focus-within{border-color:var(--accent-primary); box-shadow:0 0 0 2px var(--accent-primary-soft);}
.msgs-in{flex:1; min-width:0; border:0; background:transparent; resize:none; font-family:inherit;
  font-size:14px; line-height:1.45; color:var(--text-primary); padding:7px 2px; max-height:132px;
  overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none;}
.msgs-in::-webkit-scrollbar{width:0; height:0; display:none;}
.msgs-in::placeholder{color:var(--text-placeholder);}
.msgs-in:focus{outline:none;}
.msgs-btn{width:34px; height:34px; flex:0 0 auto; border-radius:calc(10px * var(--radius-scale)); border:0;
  background:transparent; color:var(--text-secondary); display:flex; align-items:center;
  justify-content:center; cursor:pointer; font-family:inherit;}
.msgs-btn:hover{background:var(--surface-muted); color:var(--text-primary);}
.msgs-btn svg{width:18px; height:18px;}
.msgs-btn.send{background:var(--accent-primary); color:var(--text-on-accent);}
.msgs-btn.send[disabled]{background:var(--surface-muted); color:var(--text-placeholder); cursor:not-allowed;}
.msgs-hint{display:flex; flex-direction:column; gap:2px; font-size:11px; line-height:1.35;
  color:var(--text-secondary);}
.msgs-ro{flex:0 0 auto; border-top:1px solid var(--border-default); padding:var(--space-3) 0;
  font-size:12px; color:var(--text-secondary); text-align:center;}

/* выбор адресатов: галочками, людей и отделов сразу */
.msgs-picks{display:flex; flex-direction:column; gap:6px;}
.msgs-row{display:flex; align-items:center; gap:10px; width:100%; text-align:left; font-family:inherit;
  background:var(--surface-card); border:1px solid var(--border-default);
  border-radius:calc(12px * var(--radius-scale)); padding:9px 11px; cursor:pointer;}
.msgs-row:hover{background:var(--surface-hover);}
.msgs-row.on{border-color:var(--accent-primary); background:var(--accent-primary-soft);}
.msgs-rn{display:block; font-size:14px; font-weight:700; line-height:1.2; color:var(--text-primary);}
.msgs-rs{display:block; font-size:12px; color:var(--text-secondary); margin-top:1px;}
.msgs-ck{margin-left:auto; width:20px; height:20px; flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; border:2px solid var(--border-neutral);
  border-radius:calc(6px * var(--radius-scale)); color:transparent;}
.msgs-row.on .msgs-ck{border-color:var(--accent-primary); background:var(--accent-primary);
  color:var(--text-on-accent);}
.msgs-ck svg{width:12px; height:12px;}

/* «Новое сообщение» — подвал рельса: список едет под кнопкой, кнопка стоит */
.msgs-foot-btn{flex:0 0 auto; border-top:1px solid var(--border-default);
  background:var(--surface-canvas); padding:var(--space-3) 0;}
.msgs-new{display:flex; align-items:center; justify-content:center; gap:7px; width:100%;
  font-family:inherit; font-size:14px; font-weight:700; color:var(--text-on-accent);
  background:var(--accent-primary); border:1px solid var(--accent-primary);
  border-radius:calc(12px * var(--radius-scale)); padding:11px; cursor:pointer;}
.msgs-new[disabled]{background:var(--surface-muted); border-color:var(--border-default);
  color:var(--text-placeholder); cursor:not-allowed;}
.msgs-new svg{width:15px; height:15px;}
.msgs-title{display:flex; align-items:center; gap:8px; flex:0 0 auto; font-size:13px; font-weight:800;
  letter-spacing:.06em; text-transform:uppercase; color:var(--text-secondary);
  padding:0 0 var(--space-3);}
.msgs-title svg{width:15px; height:15px; flex:0 0 auto;}
.msgs-title .cnt{margin-left:auto; white-space:nowrap; color:var(--text-primary);
  font-variant-numeric:tabular-nums;}
.mbar-btn.msgs-has-new{position:relative;}
.mbar-btn.msgs-has-new::after{content:""; position:absolute; top:4px; left:50%; margin-left:7px;
  width:7px; height:7px; border-radius:50%; background:var(--status-urgent);}
@media (min-width:1200px){
  #ctxRail{ position:relative; }
}
.notif > .msgs-seg{ margin:var(--space-3) var(--space-4); }
.notif > .msgs-panel{ padding:var(--space-3) var(--space-4); }

.msgs-panel .sbar{ margin:0 0 var(--space-2); }
.msgs-panel .sfound{ margin:0 0 var(--space-2); }

.msgs-older{display:block; width:100%; font-family:inherit; font-size:12px; font-weight:700;
  color:var(--text-secondary); background:var(--surface-muted); border:1px solid var(--border-default);
  border-radius:calc(20px * var(--radius-scale)); padding:7px 12px; margin-bottom:var(--space-2);
  cursor:pointer; text-align:center;}
.msgs-older:hover{background:var(--surface-hover); color:var(--text-primary);}
.msgs-older:focus-visible{outline:2px solid var(--accent-highlight); outline-offset:2px;}
.msgs-older.wait{cursor:default; color:var(--text-placeholder);}
.msgs-att.wait{justify-content:center; color:var(--text-secondary); font-size:12px; font-weight:700;
  background:var(--surface-muted);}
