/* стили: today (рабочий стол «Сегодня»), префикс .td- */
.td-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.td-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.td-kpi { display: block; text-align: left; border-radius: var(--r); transition: transform .18s var(--ease); min-width: 0; }
.td-kpi .card { height: 100%; transition: border-color .18s, box-shadow .18s; }
.td-kpi:hover { transform: translateY(-2px); }
.td-kpi:hover .card { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); box-shadow: var(--sh-l); }
.td-kpi .kpi .v { overflow: hidden; text-overflow: ellipsis; }

.td-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.td-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.td-card { scroll-margin-top: 16px; }
.td-card .card-h .tag { height: 22px; }
.td-b { padding: 4px 20px 10px; }
.td-b > .empty { padding: 28px 10px; }
.td-flash { animation: tdflash 1.2s var(--ease); }
@keyframes tdflash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue) 45%, transparent); } 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 18%, transparent); } }

/* строка списка */
.td-it { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.td-it:last-child { border-bottom: 0; }
.td-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.td-main b { font-size: 13.5px; line-height: 1.35; transition: color .15s; overflow-wrap: anywhere; }
.td-main small { font-size: 12px; color: var(--mute); line-height: 1.4; overflow-wrap: anywhere; }
a.td-main:hover b, a.td-it:hover .td-main b { color: var(--blue); }
.td-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 48%; }
.td-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; align-self: flex-start; margin-top: 6px; background: var(--mute); }
.td-red .td-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.td-amber .td-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-bg); }
.td-more { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--blue); }
.td-more svg.i { width: 15px; height: 15px; }
.td-left { min-width: 74px; justify-content: center; }
.td-left.plain { background: var(--bg2); }
.td-time { flex: none; width: 50px; font-size: 14px; font-weight: 600; color: var(--ink); }
.td-day { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 14px 0 4px; }
.td-day:first-child { padding-top: 10px; }

/* задачи */
.td-add { display: flex; gap: 8px; padding: 12px 0 6px; }
.td-add .in { flex: 1; }
.td-chk { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 1.5px solid #cfd4e4; display: grid; place-items: center; color: transparent; transition: .15s var(--ease); align-self: flex-start; margin-top: 1px; }
.td-chk svg.i { width: 14px; height: 14px; stroke-width: 2.6; }
.td-chk:hover { border-color: var(--green); background: var(--green-bg); color: var(--green); }

/* обращения */
.td-msg { color: inherit; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ch tag" "main main"; gap: 4px 10px; align-items: center; }
.td-msg .td-ch { grid-area: ch; width: auto; padding: 0; }
.td-msg .td-main { grid-area: main; }
.td-msg > .tag { grid-area: tag; }
.td-msg:hover { background: linear-gradient(90deg, transparent, var(--th) 12%, var(--th) 88%, transparent); }
.td-ch { flex: none; width: 92px; align-self: flex-start; padding-top: 2px; }

/* объекты без показов */
.td-thumb { flex: none; width: 88px; align-self: flex-start; }
.td-thumb .thumb { border-radius: 10px; }
.td-thumb .thumb-t, .td-thumb .thumb-x, .td-thumb .thumb-p { display: none; }
.td-tip { display: flex; gap: 6px; margin-top: 4px; padding: 7px 10px; border-radius: 10px; background: var(--gold-bg); color: #6f4f17 !important; }
.td-tip svg.i { width: 14px; height: 14px; color: var(--gold); margin-top: 1px; }

/* команда */
.td-team { display: flex; flex-direction: column; padding: 6px 0; }
.td-mate { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 12px; transition: background .15s; }
.td-mate:hover { background: var(--bg); }
.td-mate:hover b { color: var(--blue); }
.td-nums { display: flex; gap: 6px; flex: none; }
.td-nums .tag.plain { color: var(--mute); }

/* модалка шага */
.td-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.td-chips .chip { height: 30px; font-size: 12px; }

@media (max-width: 1240px) { .td-kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .td-grid { grid-template-columns: minmax(0, 1fr); } .td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .td-kpis, .td-kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .td-b { padding: 2px 16px 8px; }
  .td-it { flex-wrap: wrap; }
  .td-act { max-width: 100%; width: 100%; justify-content: flex-start; padding-left: 0; }
  .td-attn .td-act, .td-it.td-red .td-act, .td-it.td-amber .td-act { padding-left: 21px; }
  .td-task .td-act { width: auto; margin-left: 36px; }
  .td-thumb { width: 64px; }
  .td-quiet .td-act { padding-left: 76px; }
  .td-add { flex-wrap: wrap; } .td-add .in { flex-basis: 100%; }
  .td-nums { flex-direction: column; align-items: flex-end; gap: 4px; }
}
/* правая колонка уже: действия переносятся под текст */
.td-col + .td-col .td-it { flex-wrap: wrap; }
.td-col + .td-col .td-it .td-main, .td-it .td-main { flex: 1 1 160px; }
.td-col + .td-col .td-act { max-width: 100%; }
.td-col + .td-col #td-show .td-act { width: 100%; padding-left: 62px; justify-content: flex-start; }
.td-col + .td-col #td-show .td-act:empty { display: none; }
