/* "Seus treinos" (historico.js): a lista no fim do Resumo (#historico) e o
   painel de detalhe por cima do app (#histPainel). Tokens próprios porque
   o painel fica fora da aba. */
#historico, #histPainel{
  --h-s1:#0c1c18; --h-s2:#132922; --h-bd:#193229; --h-ink:#eafcf6; --h-ink2:#83a89c; --h-ink3:#4d6a61;
  --h-mint:#1affc2; --h-mintSoft:rgba(26,255,194,.13); --h-blue:#3B9AE0; --h-blueSoft:rgba(59,154,224,.15);
  --h-warn:#E8A33D; --h-warnSoft:rgba(232,163,61,.15); --h-baixo:#c9a58a;
  color:var(--h-ink);
}
#historico .num, #histPainel .num{ font-family:'IBM Plex Mono',ui-monospace,monospace; font-variant-numeric:tabular-nums; }
#historico{ margin-top:26px; }
.htTitulo{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.htTitulo small{ font-weight:500; font-size:11.5px; color:var(--h-ink3); }
.htFiltros{ display:flex; gap:6px; margin:0 0 6px; flex-wrap:wrap; }
.htFiltros button{ font:inherit; font-size:13px; padding:7px 13px; min-height:36px; border-radius:20px; background:var(--h-s1);
  border:1px solid var(--h-bd); color:var(--h-ink2); cursor:pointer; }
.htFiltros button.on{ background:var(--h-mintSoft); border-color:rgba(26,255,194,.4); color:var(--h-mint); }
.htMes{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--h-ink3); margin:16px 0 6px; }
.htVazio{ color:var(--h-ink2); font-size:14px; text-align:center; padding:18px 8px; margin:0; }
.htVazio.erro, .htCorrMsg.erro{ color:#ff8080; }
.htVazioMes{ color:var(--h-ink3); font-size:13px; margin:0 0 4px; }
.htCard{ background:var(--h-s1); border:1px solid var(--h-bd); border-radius:14px; overflow:hidden; }
.htItem{ display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:10px; align-items:center; width:100%; padding:11px 12px;
  border:0; border-bottom:1px solid var(--h-bd); background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.htItem:last-child{ border-bottom:0; }
.htItem:active{ background:var(--h-s2); }
.htIc{ width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:18px; background:var(--h-mintSoft); }
.htIc.c{ background:var(--h-blueSoft); } .htIc.h{ background:var(--h-warnSoft); } .htIc.e{ background:rgba(242,193,78,.14); }
.htIc.big{ width:46px; height:46px; font-size:22px; flex:none; }
.htTx{ min-width:0; }
.htTx b{ display:block; font-size:14.5px; }
.htTx span{ display:block; font-size:12.5px; color:var(--h-ink2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.htDt{ font-size:12px; color:var(--h-ink3); text-align:right; white-space:nowrap; }
.htDt i{ font-style:normal; display:block; color:var(--h-warn); font-size:11px; margin-top:2px; }
.htMais{ display:block; width:100%; margin:10px 0 0; padding:12px; min-height:44px; border:0; background:none; color:var(--h-mint);
  font:inherit; font-weight:700; font-size:14px; cursor:pointer; }

/* Dias da semana tocáveis (abas.js marca data-dia quando há treino). */
.rsStreak [data-dia]{ cursor:pointer; }
.rsStreak [data-dia]:active .rsDot{ transform:scale(.92); }

/* ---- Painel ---- */
body.htAberto{ overflow:hidden; }
#histPainel{ position:fixed; inset:0; z-index:200; background:#000; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#histPainel:empty{ display:none; }
.htPainelIn{ max-width:560px; margin:0 auto; padding:14px 16px 60px; }
.htVoltar{ background:none; border:0; color:var(--h-mint); font:inherit; font-weight:700; font-size:14px; padding:8px 0; min-height:40px; cursor:pointer; }
.htH{ font-size:18px; margin:6px 0 12px; }
.htCab{ display:flex; gap:12px; align-items:center; margin:4px 0 14px; }
.htCab b{ display:block; font-size:19px; }
.htCab span{ display:block; font-size:13px; color:var(--h-ink2); }
.htKpis{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.htKpi{ background:var(--h-s1); border:1px solid var(--h-bd); border-radius:12px; padding:9px 10px; min-width:0; }
.htKpi span{ font-size:10.5px; color:var(--h-ink3); text-transform:uppercase; letter-spacing:.05em; display:block; }
.htKpi b{ display:block; font-size:17px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.htKpi small{ font-size:11px; color:var(--h-ink2); }
.htKpi small.up{ color:var(--h-mint); }
.htEx{ padding:12px; border-bottom:1px solid var(--h-bd); }
.htEx:last-child{ border-bottom:0; }
.htExT{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.htExT b{ font-size:14.5px; }
.htPr{ font-size:10.5px; background:var(--h-warnSoft); color:var(--h-warn); padding:2px 7px; border-radius:10px; margin-left:6px; font-weight:600; white-space:nowrap; }
.htCmp{ font-size:12px; white-space:nowrap; font-family:'IBM Plex Mono',ui-monospace,monospace; }
.htCmp.up{ color:var(--h-mint); } .htCmp.eq{ color:var(--h-ink2); } .htCmp.dn{ color:var(--h-baixo); } .htCmp.n{ color:var(--h-ink3); font-family:inherit; }
.htExR{ font-size:13px; color:var(--h-ink2); margin-top:3px; }
.htSeries{ display:flex; gap:5px; margin-top:8px; flex-wrap:wrap; }
.htSerie{ background:#000; border:1px solid var(--h-bd); border-radius:8px; padding:4px 8px; font-size:12px; font-family:'IBM Plex Mono',ui-monospace,monospace; }
.htSerie em{ font-style:normal; color:var(--h-ink3); font-size:10px; display:block; font-family:'Archivo',sans-serif; }
.htSerie.q{ border-style:dashed; }
.htExA{ display:flex; gap:16px; margin-top:8px; }
.htExA button{ background:none; border:0; padding:4px 0; min-height:32px; font:inherit; font-size:12.5px; color:var(--h-mint); cursor:pointer; }
.htExA button[data-corrigir]{ color:var(--h-ink2); }
.htNota{ font-size:12px; color:var(--h-ink3); margin:8px 2px 0; line-height:1.45; }

/* correção */
.htCorr{ margin-top:10px; padding:12px; border-radius:12px; background:#000; border:1px solid var(--h-bd); }
.htCorrT{ margin:0 0 10px; font-size:13px; font-weight:700; }
.htCorrSub{ margin:12px 0 8px; font-size:12px; color:var(--h-ink2); }
.htCorrG{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.htCorrG label{ display:flex; flex-direction:column; gap:4px; font-size:11.5px; color:var(--h-ink2); min-width:0; }
.htCorrG input{ font:inherit; font-size:16px; color:var(--h-ink); background:var(--h-s1); border:1px solid var(--h-bd); border-radius:10px; padding:8px 10px; min-height:42px; width:100%; }
.htCorrG input:focus{ outline:none; border-color:var(--h-mint); }
.htCorrA{ display:flex; gap:10px; margin-top:12px; }
.htSalvar{ min-height:42px; padding:0 16px; border-radius:11px; border:0; background:var(--h-mint); color:#001a12; font:inherit; font-weight:800; cursor:pointer; }
.htSalvar:disabled{ opacity:.6; }
.htCancelar{ min-height:42px; padding:0 14px; border-radius:11px; border:1px solid var(--h-bd); background:none; color:var(--h-ink2); font:inherit; cursor:pointer; }
.htCorrMsg{ margin:8px 0 0; font-size:13px; color:var(--h-ink2); min-height:1em; }

/* tabelas, gráfico, percurso */
#histPainel .rsSecaoTitulo{ font-size:13px; font-weight:800; margin:18px 0 8px; color:var(--h-ink); }
.htTab{ width:100%; border-collapse:collapse; font-size:13px; }
.htTab th{ font-size:10.5px; color:var(--h-ink3); font-weight:600; text-align:right; padding:8px 10px; border-bottom:1px solid var(--h-bd); text-transform:uppercase; letter-spacing:.04em; }
.htTab td{ text-align:right; padding:8px 10px; border-bottom:1px solid var(--h-bd); font-family:'IBM Plex Mono',ui-monospace,monospace; }
.htTab th:first-child, .htTab td:first-child{ text-align:left; }
.htTab tr:last-child td{ border-bottom:0; }
.htBarra{ display:inline-block; height:6px; border-radius:3px; background:var(--h-blue); vertical-align:middle; margin-left:6px; }
.htGraf{ padding:12px 12px 6px; }
.htGraf p{ margin:0 0 6px; font-size:12px; color:var(--h-ink2); }
.htGraf svg{ width:100%; height:auto; display:block; }
.htGraf .gr line{ stroke:var(--h-bd); stroke-width:1; }
.htGraf .gr text, .htGraf .ax{ fill:var(--h-ink3); font-size:10px; font-family:'IBM Plex Mono',monospace; }
.htGraf path{ fill:none; stroke:var(--h-mint); stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round; }
.htGraf circle{ fill:var(--h-mint); stroke:#000; stroke-width:2; }
.htGraf circle.pr{ fill:var(--h-warn); }
.htGraf .ult{ fill:var(--h-ink); font-size:11px; font-weight:600; font-family:'IBM Plex Mono',monospace; }
.htRota{ display:flex; gap:14px; align-items:center; padding:12px; margin-bottom:4px; }
.htRota svg{ flex:none; }
.htRota polyline{ fill:none; stroke:var(--h-blue); stroke-width:2.6; stroke-linejoin:round; stroke-linecap:round; }
.htRota circle{ fill:var(--h-mint); }
.htRota p{ margin:0; font-size:13px; color:var(--h-ink2); line-height:1.5; }
.htRota p span{ font-size:11.5px; color:var(--h-ink3); }
.htSerieG{ padding:12px 12px 10px; }
.htSerieL{ margin:0 0 8px; font-size:12.5px; color:var(--h-ink2); min-height:1.5em; font-family:'IBM Plex Mono',ui-monospace,monospace; }
.htSerieL b{ font-weight:600; }
.htSerieW{ position:relative; }
.htSerieW svg{ width:100%; height:auto; display:block; touch-action:pan-y; cursor:crosshair; }
.htSerieW .base{ stroke:var(--h-bd); stroke-width:1; }
.htSerieW .cursor{ stroke:var(--h-ink); stroke-width:1; stroke-dasharray:3 3; opacity:.7; }
.htFaixaR{ position:absolute; left:4px; font-size:10.5px; font-weight:700; pointer-events:none; text-shadow:0 0 4px #000; }
.htSerieX{ display:flex; justify-content:space-between; font-size:10.5px; color:var(--h-ink3); font-family:'IBM Plex Mono',ui-monospace,monospace; margin-top:2px; }
@media (max-width:360px){ .htKpis, .htCorrG{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
