/* Пульт · компоненты: кнопки, поля, метки, карточки, таблицы, вкладки, переключатели, пустые состояния. */

/* ---------- кнопки */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; flex: none;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink);
  box-shadow: var(--sh); font-weight: 700; font-size: 14px; letter-spacing: -.005em; white-space: nowrap; text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), background-color .15s, color .15s;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); transition-duration: .05s; }
.btn .i { margin-left: -2px; }
.btn kbd { margin-left: 2px; margin-right: -4px; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: saturate(1.08) brightness(1.02); }
.btn-hl { background: var(--hl); }
.btn-dark { background: var(--ink); color: var(--cream); box-shadow: 0 2px 0 var(--accent); }
.btn-dark:hover { box-shadow: 0 3px 0 var(--accent); }
.btn-dark:active { box-shadow: 0 0 0 var(--accent); }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red-l); }
.btn-red:hover { background: #f6b0a5; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); font-weight: 600; }
.btn-ghost:hover { background: rgba(29, 28, 28, .06); box-shadow: none; transform: none; color: var(--ink); }
.btn-ghost:active { background: rgba(29, 28, 28, .1); transform: none; }
.btn-line { border-color: var(--line-2); box-shadow: none; background: var(--white); font-weight: 600; }
.btn-line:hover { border-color: var(--ink); box-shadow: none; transform: none; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; box-shadow: var(--sh-1); }
.btn-xs:hover { box-shadow: var(--sh); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15.5px; border-radius: 12px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-xs.btn-icon { width: 26px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; transform: none !important; box-shadow: var(--sh) !important; filter: grayscale(.4); }
.btn-ghost[disabled] { box-shadow: none !important; }
.btn.done { background: var(--green-l); }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.link { border: 0; padding: 0; background: none; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.link:hover { text-decoration-color: var(--ink); }
.link.mut { color: var(--mut); }
.data-link { border: 0; padding: 0 1px; background: linear-gradient(transparent 62%, var(--hl-soft) 62%); font: inherit; color: inherit; text-decoration: underline dotted var(--mut-2); text-underline-offset: 3px; cursor: pointer; border-radius: 2px; }
.data-link:hover { background: var(--hl); text-decoration-color: var(--ink); }

kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1.5px solid var(--line-2); border-bottom-width: 2.5px; border-radius: 6px; background: var(--white);
  font: 600 11px/1 var(--font); color: var(--ink-2); vertical-align: middle;
}
.btn-primary kbd, .btn-dark kbd { background: rgba(255,255,255,.35); border-color: rgba(29,28,28,.25); }
.btn-dark kbd { background: rgba(255,255,255,.12); border-color: rgba(253,246,227,.3); color: var(--cream); }

/* ---------- поля */
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink);
  font-size: 14.5px; font-weight: 500;
  transition: box-shadow .15s, border-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--mut-2); font-weight: 400; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 4px rgba(62, 140, 209, .28); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.55; resize: vertical; font-weight: 400; }
.input.sm, .select.sm { height: 34px; font-size: 13.5px; border-radius: 9px; }
/* выпадающий список: только свой шеврон, системная стрелка убрана */
.select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 40px; cursor: pointer; text-overflow: clip; white-space: nowrap;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75l4.5 4.5 4.5-4.5' fill='none' stroke='%231d1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center;
}
.select::-ms-expand { display: none; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > .lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > .hint { font-size: 12px; color: var(--mut); }
.input-wrap { position: relative; }
.input-wrap .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; }
.input-wrap .input { padding-left: 38px; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 20px; height: 20px; flex: none; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); display: grid; place-items: center; transition: background .15s, transform .12s; }
.check .box svg { width: 12px; height: 12px; stroke: var(--ink); stroke-width: 3; fill: none; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--ease-out); }
.check input:checked + .box { background: var(--hl); }
.check input:checked + .box svg { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.check:active .box { transform: scale(.92); }
.check.round .box { border-radius: 50%; }
.check.done-style input:checked + .box { background: var(--green); }
.check.done-style input:checked + .box svg { stroke: #fff; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 40px; height: 24px; flex: none; border: 2px solid var(--ink); border-radius: 999px; background: var(--grey-l); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); box-sizing: border-box; transition: transform .22s var(--ease-out); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--blue); outline-offset: 2px; }
.switch.sm .track { width: 34px; height: 20px; }
.switch.sm .track::after { width: 12px; height: 12px; }
.switch.sm input:checked + .track::after { transform: translateX(14px); }
.switch input:disabled + .track { opacity: .45; cursor: not-allowed; }

/* ---------- сегменты и вкладки */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 2px solid var(--ink); border-radius: 11px; background: var(--white); flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { background: var(--cream); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--cream); font-weight: 700; }
.seg button .n { font-size: 11.5px; opacity: .7; font-variant-numeric: tabular-nums; }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 12.5px; }

.tabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 2px solid var(--ink); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; background: transparent; font-weight: 600; font-size: 14.5px; color: var(--mut); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 4px; border-radius: 4px 4px 0 0; background: var(--ink); }
.tab .n { min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--cream-2); font-size: 11.5px; font-weight: 700; color: var(--ink-2); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .n { background: var(--hl); }
.drawer-tabs .tab { height: 38px; font-size: 13.5px; padding: 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--white); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--hl); color: var(--ink); box-shadow: var(--sh-1); }
.chip .n { font-size: 11.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: var(--ink-2); }

/* ---------- метки */
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; max-width: 100%;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--white);
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--ink); flex: none;
}
.tag .i { width: 12px; height: 12px; stroke-width: 2.2; }
.tag.red { background: var(--red-l); } .tag.yellow { background: var(--yellow-l); } .tag.blue { background: var(--blue-l); } .tag.green { background: var(--green-l); }
.tag.grey { background: var(--grey-l); color: var(--ink-2); border-color: rgba(29,28,28,.45); }
.tag.ink { background: var(--ink); color: var(--cream); }
.tag.hl { background: var(--hl); }
.tag.magenta { background: var(--magenta-l); }
.tag.line { border-color: var(--line-2); color: var(--ink-2); font-weight: 600; }
.tag.dash { border-style: dashed; background: transparent; color: var(--ink-2); font-weight: 600; }
.tag.solid-red { background: var(--red); color: #fff; border-color: var(--ink); }
.tag.lg { height: 26px; padding: 0 10px; font-size: 13px; }
.tag.sm { height: 19px; padding: 0 6px; font-size: 11px; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.blue { background: var(--blue); } .dot.green { background: var(--green); }
.dot.grey { background: var(--grey-l); } .dot.ink { background: var(--ink); } .dot.white { background: var(--white); } .dot.magenta { background: var(--magenta); }
.dot.live { animation: pulse-ring 1.8s infinite; border-color: var(--red); }
.dot.sm { width: 8px; height: 8px; border-width: 1.5px; }

.lvl { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink); font-size: 12.5px; font-weight: 800; flex: none; }
.lvl.A { background: var(--ink); color: var(--hl); }
.lvl.B { background: var(--white); }
.lvl.C { background: transparent; border-style: dashed; border-color: var(--ink-3); color: var(--ink-3); }
.lvl.none { background: transparent; border-style: dotted; border-color: var(--mut-2); color: var(--mut-2); }

.sev { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); font-size: 13px; font-weight: 800; flex: none; }
.sev.s1 { background: var(--red); color: #fff; }
.sev.s2 { background: var(--red-l); }
.sev.s3 { background: var(--yellow-l); }
.sev.s4 { background: var(--blue-xl); }

/* аватары: люди круглые, сценарии ИИ — квадрат с пунктиром */
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); font-size: 11.5px; font-weight: 800; flex: none; background: var(--white); letter-spacing: -.02em; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.av.lg { width: 40px; height: 40px; font-size: 15px; border-width: 2px; }
.av.xl { width: 56px; height: 56px; font-size: 20px; border-width: 2px; }
.av.yellow { background: var(--yellow); } .av.blue { background: var(--blue-l); } .av.green { background: var(--green-l); } .av.red { background: var(--red-l); } .av.grey { background: var(--grey-l); } .av.cream { background: var(--yellow-xl); } .av.magenta { background: var(--magenta-l); }
.av.ai { border-radius: 8px; border-style: dashed; background: var(--cream); color: var(--ink); }
.av.ai .i { width: 15px; height: 15px; }
.av.sm.ai .i { width: 12px; height: 12px; }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -7px; box-shadow: 0 0 0 2px var(--white); }
.person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; white-space: nowrap; }
.person .nm { overflow: hidden; }

/* ---------- карточки и панели */
.card { position: relative; background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-2); min-width: 0; }
.card.flat { box-shadow: none; }
.card.paper { background: var(--paper); }
.card.cream { background: var(--cream); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1.5px solid var(--line); }
.card-head .h3 { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }
.card-foot { padding: 12px 18px; border-top: 1.5px solid var(--line); }
.card.hover { cursor: pointer; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.card.hover:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.card.hover:active { transform: translateY(1px); box-shadow: var(--sh); }
.panel { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.panel.white { background: var(--white); }
.panel.dash { border-style: dashed; background: transparent; }
.panel.warn { background: var(--yellow-xl); border-color: var(--ink); }
.panel.bad { background: var(--red-xl); border-color: var(--ink); }
.panel.good { background: var(--green-xl); border-color: var(--ink); }
.panel.info { background: var(--blue-xl); border-color: var(--ink); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow-xl); font-size: 13.5px; }
.callout .i { margin-top: 1px; }
.callout.red { background: var(--red-xl); }
.callout.blue { background: var(--blue-xl); }
.callout.green { background: var(--green-xl); }
.callout.magenta { background: var(--magenta-xl); }

/* цифры */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.kpi { position: relative; padding: 14px 16px 13px; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--sh); min-width: 0; text-align: left; }
button.kpi { cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; font: inherit; color: inherit; }
button.kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.kpi .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); display: flex; align-items: center; gap: 6px; }
.kpi .v { margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 700; color: var(--mut); letter-spacing: -.01em; margin-left: 3px; }
.kpi .d { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; line-height: 1.35; }
.kpi .spark { position: absolute; right: 12px; top: 14px; width: 72px; height: 26px; }
.kpi.hl { background: var(--hl); }
.kpi.dark { background: var(--ink); color: var(--cream); }
.kpi.dark .k, .kpi.dark .d { color: rgba(253,246,227,.7); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12.5px; }
.delta.up { color: #1f8a5b; } .delta.down { color: #c4321f; }

/* полосы */
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--grey-xl); border: 1.5px solid var(--ink); overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ink); }
.bar.green > i { background: var(--green); } .bar.yellow > i { background: var(--yellow); } .bar.red > i { background: var(--red); } .bar.blue > i { background: var(--blue); } .bar.accent > i { background: var(--accent); }
.bar.thin { height: 6px; border-width: 1px; }
.segbar { display: flex; gap: 3px; height: 10px; }
.segbar i { flex: 1; border-radius: 3px; background: var(--grey-l); border: 1.5px solid rgba(29,28,28,.18); }
.segbar i.ok { background: var(--green); border-color: var(--ink); }
.segbar i.bad { background: var(--red); border-color: var(--ink); }
.segbar i.warn { background: var(--yellow); border-color: var(--ink); }
.segbar i.na { background: transparent; border-style: dashed; }

/* ---------- таблица */
.tbl-wrap { position: relative; overflow: auto; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--sh-2); }
.tbl { width: 100%; font-size: 13.5px; }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1.5px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.tbl thead th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.tbl thead th[aria-sort] button { color: var(--ink); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--hl-soft); }
.tbl tbody tr.sel { background: var(--hl-soft); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .cell-t { font-weight: 700; color: var(--ink); line-height: 1.3; }
.tbl .cell-s { display: block; font-size: 12px; color: var(--mut); margin-top: 2px; font-weight: 400; line-height: 1.3; }
.tbl.compact th, .tbl.compact td { padding-top: 8px; padding-bottom: 8px; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1.5px solid var(--line); font-size: 13px; color: var(--mut); background: var(--paper); border-radius: 0 0 12px 12px; }

/* список строк */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1.5px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; transition: background .12s; }
.li.click:hover { background: var(--hl-soft); }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 600; line-height: 1.35; }
.li .t span { display: block; font-size: 12.5px; color: var(--mut); line-height: 1.4; }

/* описания */
.props { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 9px 16px; font-size: 13.5px; }
.props dt { color: var(--mut); font-weight: 600; }
.props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }

/* блок раздела внутри страницы */
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.sec-head .note { font-size: 13px; color: var(--mut); }

/* ---------- пустое состояние */
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 48px 24px 52px; }
.empty .art { width: 168px; height: 128px; margin-bottom: 4px; }
.empty h3 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.empty p { max-width: 460px; color: var(--ink-3); font-size: 14.5px; line-height: 1.55; }
.empty .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.empty.sm { padding: 24px 16px; gap: 8px; }
.empty.sm .art { width: 110px; height: 84px; }
.empty.sm h3 { font-size: 16px; }
.empty.sm p { font-size: 13.5px; }

/* лента событий и история */
.feed { display: grid; }
.feed-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 0 0 16px; }
.feed-item::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 1.5px; background: var(--line-2); }
.feed-item:last-child::before { display: none; }
.feed-item .body { padding-top: 3px; font-size: 13.5px; line-height: 1.45; min-width: 0; }
.feed-item .when { font-size: 12px; color: var(--mut); margin-top: 2px; }
.feed-item .diff { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.feed-item .diff s { color: var(--mut); text-decoration-thickness: 1.5px; }
.feed-item .ico { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--white); display: grid; place-items: center; }
.feed-item .ico .i { width: 14px; height: 14px; }

/* комментарии */
.comment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.comment .bubble { background: var(--white); border: 1.5px solid var(--line-2); border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.comment .bubble .who { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.comment .bubble .who b { font-weight: 700; font-size: 13px; }
.comment .bubble .who span { font-size: 11.5px; color: var(--mut); }
.mention { display: inline-block; padding: 0 5px; border-radius: 6px; background: var(--blue-xl); border: 1px solid var(--blue-l); font-weight: 600; color: #22598c; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .textarea { min-height: 44px; height: 44px; resize: none; padding-top: 10px; }
.mention-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; }

/* переписка: пузыри как в мессенджере */
.thread { display: grid; gap: 14px; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; max-width: 92%; }
.msg.out { margin-left: auto; grid-template-columns: minmax(0, 1fr) 30px; }
.msg.out .av { order: 2; }
.msg .bub { padding: 10px 13px; border: 1.5px solid var(--ink); border-radius: 4px 16px 16px 16px; background: var(--white); font-size: 13.5px; line-height: 1.5; box-shadow: var(--sh-1); }
.msg.out .bub { border-radius: 16px 4px 16px 16px; background: var(--yellow-xl); }
.msg .meta { font-size: 11.5px; color: var(--mut); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg.out .meta { justify-content: flex-end; text-align: right; }
.msg .orig { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); color: var(--ink-3); font-size: 12.5px; font-style: italic; }
.msg.sys { max-width: 100%; grid-template-columns: 1fr; justify-items: center; }
.msg.sys .bub { border-style: dashed; box-shadow: none; background: transparent; font-size: 12.5px; color: var(--mut); border-radius: 999px; padding: 5px 12px; }
.typing { display: inline-flex; gap: 4px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 4px 16px 16px 16px; background: var(--white); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }

/* QR и ссылка */
.qr { width: 104px; height: 104px; padding: 7px; background: var(--white); border: 2px solid var(--ink); border-radius: 10px; flex: none; }
.qr svg { width: 100%; height: 100%; }
.short-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1.5px dashed var(--ink); border-radius: 9px; background: var(--white); font-family: var(--mono); font-size: 13px; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; }

/* ленточка WCD: четыре цвета */
.ribbon { display: flex; height: 5px; border-radius: 3px; overflow: hidden; }
.ribbon i { flex: 1; }
.ribbon i:nth-child(1) { background: var(--red); } .ribbon i:nth-child(2) { background: var(--yellow); } .ribbon i:nth-child(3) { background: var(--blue); } .ribbon i:nth-child(4) { background: var(--green); }

/* скелет загрузки */
.skel { background: linear-gradient(90deg, var(--grey-xl) 0, #fff 40px, var(--grey-xl) 80px) var(--grey-xl); background-size: 400px 100%; animation: shimmer 1.2s infinite linear; border-radius: 6px; }

/* мелочи */
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.badge-count.red { background: var(--red); color: #fff; }
.badge-count.light { background: var(--cream-2); color: var(--ink-2); }
.timer { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12.5px; }
.timer.hot { color: #c4321f; }
.src { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--mut); font-weight: 500; }
.src .i { width: 12px; height: 12px; }
.est { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; height: 19px; border-radius: 6px; border: 1.5px dashed var(--ink-3); font-size: 11.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 4px; border-radius: 2px; background: var(--ink); }
.legend .sw.dash { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }
.legend .sw.dot { background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px); }
.legend .sw.box { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--ink); }

@media (max-width: 720px) {
  .props { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .props dd { margin-bottom: 8px; }
  .kpis, .kpis.tasks-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 12px 13px 11px; }
  .kpi .k { font-size: 10px; letter-spacing: .06em; }
  .kpi .v { font-size: 26px; }
  .kpi .d { font-size: 12px; }
  .kpi .spark { display: none; }
  .tbl-wrap.cards { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tbody tr { margin-bottom: 10px; padding: 12px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--sh); }
  .tbl.cards td { border: 0; padding: 3px 0 !important; }
  .tbl.cards td[data-l] { position: relative; min-height: 28px; padding-left: 122px !important; text-align: left; align-content: center; }
  .tbl.cards td[data-l]::before { content: attr(data-l); position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 112px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; line-height: 1.25; text-transform: uppercase; color: var(--mut); }
  .tbl.cards td.n { text-align: left; }
  .tbl.cards td.hide-m { display: none; }
  .tbl.cards td .tag { white-space: normal; height: auto; min-height: 22px; padding-top: 3px; padding-bottom: 3px; line-height: 1.25; }
  .tbl.cards td[colspan] { display: block; }
}

/* Поиск с подсказками вместо длинного выпадающего списка */
.picker { position: relative; min-width: 0; }
.picker-wrap { position: relative; }
.picker-wrap > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; }
.picker-in.input { padding-left: 38px; padding-right: 40px; }
.picker-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--mut); display: grid; place-items: center; cursor: pointer; }
.picker-clear:hover { background: var(--grey-l); color: var(--ink); }
.picker-list { position: fixed; z-index: 330; overflow: auto; padding: 6px; background: var(--white); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.picker-list[hidden] { display: none; }
.picker-g { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.picker-it { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.picker-it > svg { flex: none; color: var(--mut); }
.picker-it .t { font-weight: 600; min-width: 0; }
.picker-it .s { margin-left: auto; padding-left: 12px; font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.picker-it[aria-selected="true"], .picker-it:hover { background: var(--pill); }
.picker-it mark { background: transparent; color: var(--blue); font-weight: 700; }
.picker-empty, .picker-hint { padding: 10px; font-size: 13px; color: var(--mut); }
.picker-hint { border-top: 1px solid var(--line); margin-top: 4px; }
@media (max-width: 700px) { .picker-it .s { display: none; } }
