/* --- сводка карточки доски при наведении (ktip.js) --------------------------------
   Пришла из демо «Максимального Размаха» 15.10.2026: этап, сумма, что берёт, шаг,
   кто ведёт — не открывая переписку. Пальцем: первое касание — сводка, второе — чат. */
.ktip { position: fixed; z-index: 950; width: 320px; max-width: calc(100vw - 16px); pointer-events: none;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .28); padding: 14px 16px 12px; font-size: 13px; line-height: 1.4; }
:root[data-theme="navy"] .ktip { background: #0f2350; }
.ktip__top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ktip__stage { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px;
  padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--stage) 22%, transparent); color: var(--text); }
.ktip__stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--stage); }
.ktip__sum { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.ktip__name { font-weight: 800; font-size: 15px; margin-top: 8px; }
.ktip__niche { font-size: 12px; }
.ktip__alarm { margin-top: 8px; font-weight: 700; color: #ff4d7d; }
.ktip__block { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ktip__row { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: baseline; }
.ktip__row > span { font-size: 12px; font-weight: 500; }
.ktip__row > b { font-weight: 600; min-width: 0; }
.ktip__row small { display: block; font-weight: 500; font-size: 12px; }
.ktip__row.is-warn > b { color: #f59e0b; }
.ktip__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ktip__foot { margin-top: 10px; font-size: 12px; color: var(--accent); font-weight: 600; }

/* появление сводки: выезжает со стороны карточки, строки проявляются по очереди */
.ktip { opacity: 0; visibility: hidden; transform: translateX(-10px) scale(.96); transform-origin: left top;
  transition: opacity .16s ease, transform .2s ease, visibility 0s linear .2s; }
.ktip[data-side="left"] { transform: translateX(10px) scale(.96); transform-origin: right top; }
.ktip.is-on { opacity: 1; visibility: visible; transform: none;
  transition: opacity .2s ease, transform .32s cubic-bezier(.2, .9, .25, 1.12), visibility 0s; }
.ktip.is-on > * { animation: ktipRow .34s cubic-bezier(.2, .8, .2, 1) both; }
.ktip.is-on > :nth-child(2) { animation-delay: .03s; }
.ktip.is-on > :nth-child(3) { animation-delay: .06s; }
.ktip.is-on > :nth-child(4) { animation-delay: .09s; }
.ktip.is-on > :nth-child(5) { animation-delay: .12s; }
.ktip.is-on > :nth-child(6) { animation-delay: .15s; }
.ktip.is-on > :nth-child(7) { animation-delay: .18s; }
.ktip.is-on > :nth-child(8) { animation-delay: .21s; }
@keyframes ktipRow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ktip, .ktip[data-side="left"], .ktip.is-on { transform: none; transition: opacity .12s ease, visibility 0s; }
  .ktip.is-on > * { animation: none; }
}
/* сводка на касание: по ней можно нажать (откроется переписка), выезжает сверху или снизу */
.ktip.is-touch { pointer-events: auto; cursor: pointer; }
.ktip[data-side="below"] { transform: translateY(-10px) scale(.96); transform-origin: center top; }
.ktip[data-side="above"] { transform: translateY(10px) scale(.96); transform-origin: center bottom; }
.ktip.is-on[data-side] { transform: none; }
.ktip[data-side="sheet"] { max-width: none; max-height: 72vh; overflow: auto; border-radius: 18px;
  transform: translateY(18px) scale(.98); transform-origin: center bottom; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.ktip.is-on[data-side] { transform: none; }
