/* TeamGuide — дашборд руководителя (js/modules/dashboard.js). Префикс dsh-. Токены — «Сумерки» (dusk.css). */
.dsh { display: flex; flex-direction: column; gap: 16px; max-width: 1120px; }
.dsh > .back-btn { margin-bottom: -8px; align-self: flex-start; }
.dsh-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dsh-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.dsh-seg button { padding: 8px 14px; min-height: 36px; white-space: nowrap; }
[data-body] { display: flex; flex-direction: column; gap: 16px; }

/* герой: «На смене сейчас» / «Команда» — единственное свечение экрана */
.dsh-hero { gap: 12px; }
.dsh-herorow { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; }
.dsh-deps, .dsh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dsh-dep { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 11px; border-radius: 14px; background: var(--tg-dep, var(--tg-s2)); border: 0; color: var(--tg-fg-2);
  font: 400 13px var(--tg-f-ui); }
button.dsh-dep { cursor: pointer; }
.dsh-dep b { font-family: var(--tg-f-num); font-weight: 400; color: var(--tg-fg); font-variant-numeric: tabular-nums; }
.dsh-dep em { font-style: normal; font-size: 12px; }
.dsh-dep .ok, .dsh-fn.ok { color: var(--tg-ok); }
.dsh-dep .bad, .dsh-fn.bad { color: var(--tg-bad); }
.dsh-dep .warn, .dsh-fn.warn, .dsh-brow b.warn, .dsh-note .warn, .dsh-facts .warn { color: var(--tg-warn); }

/* факты с крупной цифрой */
.dsh-facts { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.dsh-facts > div { display: flex; flex-direction: column; gap: 6px; min-width: 92px; }
.dsh-fn { font-family: var(--tg-f-num); font-weight: 200; font-size: 32px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--tg-fg); }
.dsh-facts.sm .dsh-fn { font-weight: 300; font-size: 22px; letter-spacing: -.02em; }
.dsh-facts small { color: var(--tg-muted); font-size: 12px; line-height: 1.35; }

/* плитки как кнопки */
button.dsh-tile { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.dsh-tile small { display: flex; flex-direction: column; gap: 2px; }
.dsh-d { font-size: 12px; color: var(--tg-muted); }
.dsh-d.up { color: var(--tg-ok); }
.dsh-d.down { color: var(--tg-warn); }

/* секции и списки */
.dsh-sec { margin-bottom: 10px; }
.dsh-sec > :last-child:not(h4) { white-space: nowrap; }
.dsh-note { color: var(--tg-muted); font-size: 12.5px; margin: 0; }
.dsh-note a { color: var(--tg-acc); }
.dsh-ok { margin: 0; color: var(--tg-ok); font-size: 14px; }
.tg-card.dsh-ok { color: var(--tg-ok); }
.dsh-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.dsh-main b { font-weight: 500; font-size: 14px; color: var(--tg-fg); overflow-wrap: anywhere; }
.dsh-main small { color: var(--tg-muted); font-size: 12.5px; }
.dsh-muted { color: var(--tg-muted); font-weight: 400; }
.dsh-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; }
.tg-list .row.dsh-lrow { grid-template-columns: minmax(0, 1fr) auto; }
.tg-list .row .dsh-main { grid-column: auto; }
.dsh-av { width: 38px; height: 38px; border-radius: 50%; background: var(--tg-s2); color: var(--tg-fg-2); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.dsh-n { min-width: 28px; height: 28px; padding: 0 9px; box-sizing: border-box; border-radius: var(--tg-r-pill); display: inline-grid; place-items: center;
  background: var(--tg-s2); color: var(--tg-fg); font: 600 13px var(--tg-f-ui); font-variant-numeric: tabular-nums; }
.dsh-n.acc { background: var(--tg-acc); color: var(--tg-on-acc); }
.dsh-n.warn { background: color-mix(in srgb, var(--tg-warn) 16%, transparent); color: var(--tg-warn); }
.dsh-rows { list-style: none; margin: 0; padding: 0; }
.dsh-rows > li + li { border-top: 1px solid var(--tg-line); }
.dsh-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: none; color: var(--tg-fg); text-align: left; font: inherit; }
button.dsh-row { cursor: pointer; }
.dsh-hero .dsh-rows { border-top: 1px solid var(--tg-line); }
.dsh-btn { min-height: 38px; padding: 8px 14px; font-size: 13px; align-self: flex-start; }
.dsh-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

/* полосы */
.dsh-bar { display: block; height: 6px; border-radius: 3px; background: var(--tg-s3); overflow: hidden; margin: 4px 0 2px; }
.dsh-bar i { display: block; height: 100%; border-radius: 3px; background: var(--rc, var(--tg-acc)); }
.dsh-bars { display: flex; flex-direction: column; gap: 10px; }
.dsh-brow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 13px; color: var(--tg-fg); }
.dsh-brow.wide { grid-template-columns: 110px minmax(0, 1fr) 84px; }
.dsh-brow .dsh-bar { margin: 0; }
.dsh-brow b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* обязательные публикации */
.dsh-acks { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dsh-ack { display: flex; gap: 14px; align-items: flex-start; }
.dsh-rn { font-family: var(--tg-f-num); font-weight: 300; font-size: 17px; }
.dsh-ackrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; }
.dsh-ackrow .dsh-btns { margin: 0; }

/* недели использования */
.dsh-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; height: 132px; align-items: end; margin-bottom: 4px; }
.dsh-wk { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.dsh-wk i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--tg-s3); }
.dsh-wk.cur i { background: var(--tg-acc); }
.dsh-wv { font-size: 11.5px; color: var(--tg-muted); font-variant-numeric: tabular-nums; }
.dsh-wk.cur .dsh-wv { color: var(--tg-acc); font-weight: 600; }
.dsh-wl { font-size: 11px; color: var(--tg-muted); }

/* ошибки по блюдам */
.dsh-err { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--tg-f-num); font-weight: 300; font-size: 20px; }
.dsh-err small { font-family: var(--tg-f-ui); font-size: 11.5px; color: var(--tg-muted); }
.dsh-err.warn { color: var(--tg-warn); }
.dsh-err.bad { color: var(--tg-bad); }

.dsh-block { display: flex; flex-direction: column; gap: 14px; }
.dsh-block .dsh-sec { margin: 0; }
.dsh-cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.dsh-cols > section { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.dsh-cols > section.dsh-block { gap: 14px; }
.dsh-cols > section > .dsh-btn, .dsh-cols > section > .dsh-note { margin-top: 10px; }
@media (min-width: 720px) {
  .dsh-acks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* компьютер: две колонки «каменной кладкой» — блоки разной высоты без дыр */
@media (min-width: 1024px) {
  .dsh-cols { display: block; columns: 2; column-gap: 16px; }
  .dsh-cols > section { break-inside: avoid; margin-bottom: 16px; }
}
@media (max-width: 420px) {
  .dsh-brow { grid-template-columns: 82px minmax(0, 1fr) 42px; }
  .dsh-brow.wide { grid-template-columns: 90px minmax(0, 1fr) 78px; }
  .dsh-facts { gap: 12px 20px; }
}

/* ---------- активность по сотрудникам (2.0.10) ---------- */
.dsh-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.dsh-search { flex: 1 1 220px; min-height: 44px; padding: 10px 14px; border-radius: var(--tg-r-sm); border: 1px solid var(--tg-line); background: var(--tg-s1); color: var(--tg-fg); font: 400 16px var(--tg-f-ui); }
.dsh-sort select { min-height: 44px; padding: 10px 12px; border-radius: var(--tg-r-sm); border: 1px solid var(--tg-line); background: var(--tg-s1); color: var(--tg-fg); font: 500 14px var(--tg-f-ui); }
.dsh-filters { margin: 0; padding: 0; }
@media (max-width: 719px) { .dsh-filters { margin: 0 -16px; padding: 0 16px; } }
.tg-list .row.dsh-prow { grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; }
.dsh-prow .dsh-main { gap: 5px; }
.dsh-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.dsh-pn { display: flex; flex-direction: column; align-items: flex-end; min-width: 48px; }
.dsh-pn b { font-family: var(--tg-f-num); font-weight: 300; font-size: 24px; line-height: 1; color: var(--tg-fg); font-variant-numeric: tabular-nums; }
.dsh-pn small { font-size: 11.5px; color: var(--tg-muted); }
.dsh-pn.warn b { color: var(--tg-warn); }
.dsh-pn.bad b { color: var(--tg-bad); }
/* полоса дней: заходил — латунь, смена без захода — рамка «внимание», выходной — дорожка */
.dsh-strip { display: flex; gap: 2px; max-width: 100%; }
.dsh-strip i { flex: 1 1 0; max-width: 14px; min-width: 4px; height: 12px; border-radius: 3px; background: var(--tg-s3); }
.dsh-strip i.on { background: var(--tg-acc); }
.dsh-strip i.miss { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tg-warn); }
.dsh-strip.wk i { max-width: 22px; }
.dsh-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dsh-legend .dsh-strip { display: inline-flex; }
.dsh-legend .dsh-strip i { width: 12px; flex: none; }
.dsh-legend .dsh-strip:not(:first-child) { margin-left: 6px; }
/* карточка сотрудника */
.dsh-person { display: flex; flex-direction: column; gap: 16px; }
.dsh-person .tg-sub { margin: -6px 0 0; }
.dsh-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 28px)); gap: 4px; margin-top: 8px; }
.dsh-cal span { font-size: 10.5px; color: var(--tg-muted); text-align: center; }
.dsh-cal i { aspect-ratio: 1; border-radius: 5px; background: var(--tg-s3); }
.dsh-cal i.on { background: var(--tg-acc); }
.dsh-cal i.miss { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tg-warn); }
.dsh-cal i.out { background: transparent; }
.dsh-cal i.today { outline: 2px solid var(--tg-fg); outline-offset: 1px; }
a.dsh-row { text-decoration: none; color: var(--tg-fg); }
.dsh-entry { margin: 0; }
.dsh-av svg { width: 18px; height: 18px; }
.dsh-chev { color: var(--tg-acc); font-size: 20px; }
