/* Экраны многолетней истории (80 §3.6, шаг H4): «📜 История» клиента у тренера (trainer_history.js) и
   «📈 Мой путь» человека (app_v2_path.js). Разметку рисует static/js/history_view.js; цвета — токены tokens.css. */

/* ─── Общее ───────────────────────────────────────────────────────────────── */
.hv-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.hv-list li { padding: 6px 0; border-bottom: 1px solid var(--hair-soft); overflow-wrap: anywhere; color: var(--ink-2); }
.hv-list li:last-child { border-bottom: none; }
.hv-list b { color: var(--ink); }
.hv-empty { font-size: 13px; color: var(--ink-3); text-align: center; padding: 16px 8px; }
.hv-muted, .hv-note, .hv-sub { color: var(--ink-3); }
.hv-note { font-size: 11px; margin-top: 6px; }
.hv-sub { font-size: 11px; margin-top: 2px; }
.hv-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 120px; }
.hv-month { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.hv-month-n { font-size: 10px; color: var(--ink-2); min-height: 13px; }
.hv-bar { position: relative; width: 70%; flex: 1; display: flex; align-items: flex-end; }
.hv-bar-fill { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--cool, #8B6BFF); }
.hv-month-l { font-size: 10px; color: var(--ink-3); margin-top: 3px; }

/* ─── Тренер: окно и разделы ──────────────────────────────────────────────── */
html.hs-open, html.hs-open body { overflow: hidden; }
.hs-sheet [hidden] { display: none !important; }
.hs-sheet { position: fixed; inset: 0; z-index: 1200; overflow-y: auto; overscroll-behavior: contain;
    background: var(--lt-scrim, rgba(var(--shade-rgb), 0.85)); padding: 12px 10px calc(24px + var(--safe-b, 0px)); box-sizing: border-box; }
.hs-sheet > .jr-panel { max-width: 960px; }
.hv-scope { font-size: 12px; color: var(--ink-2); background: var(--cool-18); border: 1px solid var(--cool-55);
    border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.hv-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.hv-kpi { background: var(--well); border: 1px solid var(--hair); border-radius: 12px; padding: 10px; min-width: 0; }
.hv-kpi-label, .hv-kpi-note { font-size: 11px; color: var(--ink-3); }
.hv-kpi-value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.hv-sec { margin-top: 14px; }
.hv-h { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.hv-notes .hv-list li { color: var(--ink); }
.hv-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hv-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.hv-table th, .hv-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--hair-soft); vertical-align: top; }
.hv-table thead th { font-weight: 600; color: var(--ink-3); font-size: 11px; border-bottom: 1px solid var(--hair); }
.hv-table th[scope="row"] { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; min-width: 120px; }
.hv-table .hv-row-sub td { color: var(--ink-3); font-size: 11px; padding-top: 0; }
.hv-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hv-flag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(var(--fg-rgb), 0.08);
    color: var(--ink-2); }
.hv-flag--warn { box-shadow: inset 0 0 0 1px var(--amber); }
.hv-flag--ok { box-shadow: inset 0 0 0 1px var(--lt-ok-2, #0ca30c); }
.hv-cycle { border: 1px solid var(--hair); border-radius: 12px; margin-bottom: 8px; background: rgba(var(--fg-rgb), 0.03); }
.hv-cycle > summary { list-style: none; cursor: pointer; padding: 10px 12px; }
.hv-cycle > summary::-webkit-details-marker { display: none; }
.hv-cycle[open] > summary { border-bottom: 1px solid var(--hair-soft); }
.hv-cycle-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.hv-cycle-top b::before { content: '▸ '; color: var(--ink-3); }
.hv-cycle[open] .hv-cycle-top b::before { content: '▾ '; }
.hv-cycle-body { padding: 6px 12px 10px; }
.hv-pct { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(var(--fg-rgb), 0.08); }
@media (min-width: 600px) {
    .hv-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .hs-sheet { padding: 24px; }
}
.desk-dock .hs-sheet .hv-scope { margin-top: 0; }

/* ─── Человек: «📈 Мой путь» ──────────────────────────────────────────────── */
.path-family { padding: 8px 0; border-bottom: 1px solid var(--hair-soft); }
.path-family:last-of-type { border-bottom: none; }
.path-year-row, .path-record { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px;
    padding: 2px 0; overflow-wrap: anywhere; }
.path-record { flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--hair-soft); }
.path-record:last-child { border-bottom: none; }
.path-record > span:first-child { flex: 1 1 60%; min-width: 0; }
.path-cycle { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--hair-soft); overflow-wrap: anywhere; }
.path-cycle:last-child { border-bottom: none; }
.path-year { border: 1px solid var(--gold-soft, rgba(233,198,126,.28)); }
