/* =========================================================================
   FIT KIT — TRAINING PRO (đi kèm training-pro.js) — phong cách liquid glass tối
   ========================================================================= */
.tp-wrap{ display:contents; }

/* ---- Thẻ chu kỳ trên màn Tập luyện ---- */
.tp-cycle{ cursor:pointer; padding:14px 16px; }
.tp-cycle:focus-visible{ outline:2px solid var(--mint,#5EE6C7); outline-offset:2px; }
.tp-cyc-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tp-cyc-top small{ display:block; font-size:12px; letter-spacing:.06em; color:var(--text-muted); font-weight:600; }
.tp-cyc-top b{ font-family:var(--font-head,"Inter Tight",sans-serif); font-weight:600; font-size:26px; line-height:1.15; color:#fff; }
.tp-cyc-top b span{ font-size:16px; color:var(--text-muted); font-weight:500; }
.tp-cyc-ic{ font-size:30px; color:var(--mint,#5EE6C7); width:34px; height:34px; }
.tp-cyc-ic svg{ width:30px; height:30px; }
.tp-cyc-tag{ display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; padding:7px 11px; border-radius:999px; background:rgba(94,230,199,.14); color:var(--mint-2,#9AF1DD); border:1px solid rgba(94,230,199,.3); white-space:nowrap; }
.tp-cyc-tag.dl{ background:rgba(255,122,69,.16); color:#FFB08A; border-color:rgba(255,122,69,.45); }
.tp-cyc-tag svg, .tp-cyc-tag .material-symbols-rounded{ width:15px; height:15px; font-size:15px; }
.tp-cyc-bar{ display:flex; gap:4px; margin:12px 0 4px; }
.tp-cyc-bar i{ flex:1; height:8px; border-radius:4px; background:rgba(255,255,255,.14); position:relative; }
.tp-cyc-bar i.done{ background:var(--mint,#5EE6C7); opacity:.75; }
.tp-cyc-bar i.dl{ background:repeating-linear-gradient(135deg, rgba(255,122,69,.55) 0 4px, rgba(255,122,69,.2) 4px 8px); }
.tp-cyc-bar i.done.dl{ background:rgba(255,122,69,.7); }
.tp-cyc-bar i.cur{ background:#fff; box-shadow:0 0 0 2px rgba(94,230,199,.6); opacity:1; }
.tp-cyc-bar i.cur.dl{ background:var(--coral,#FF7A45); box-shadow:0 0 0 2px rgba(255,176,138,.7); }
.tp-cycle .small-note{ margin-top:8px; }
.tp-cyc-dl{ border-color:rgba(255,122,69,.35) !important; }
.tp-cyc-done{ cursor:default; }
.tp-cyc-res{ margin-top:8px; }
.tp-cyc-res small.up{ color:var(--mint,#5EE6C7); font-weight:700; }
.tp-cyc-res small.down{ color:#FFB08A; font-weight:700; }
.tp-cyc-now{ display:flex; align-items:baseline; justify-content:space-between; }
.tp-cyc-now b{ font-family:var(--font-head,"Inter Tight",sans-serif); font-size:22px; font-weight:600; }
.tp-cyc-now span{ font-size:13px; color:var(--text-muted); }
.tp-explain{ margin-top:14px; padding:12px 14px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); }
.tp-explain p{ font-size:13px; line-height:1.55; color:var(--text-muted); }
.tp-explain p + p{ margin-top:6px; }
.tp-explain b{ color:#fff; font-weight:600; }
.tp-tpl-cyc{ display:flex; gap:6px; align-items:flex-start; margin-top:10px; color:var(--mint-2,#9AF1DD) !important; }
.tp-tpl-cyc svg, .tp-tpl-cyc .material-symbols-rounded{ width:16px; height:16px; flex:none; margin-top:1px; }

/* ---- Tag nhỏ trong danh sách bài ---- */
.tp-tag{ display:inline-block; font-size:12px; font-weight:700; line-height:1; padding:3px 7px; border-radius:6px; vertical-align:1px; letter-spacing:.02em; }
.tp-am-tag{ background:rgba(255,122,69,.2); color:#FFB08A; border:1px solid rgba(255,122,69,.45); font-size:12px; font-weight:700; padding:3px 7px; border-radius:6px; letter-spacing:.03em; white-space:nowrap; }
.tp-dl-tag{ background:rgba(94,230,199,.14); color:var(--mint-2,#9AF1DD); border:1px solid rgba(94,230,199,.3); }
.tp-am-pill{ background:rgba(255,122,69,.18) !important; color:#FFB08A !important; border-color:rgba(255,122,69,.45) !important; font-weight:700; }

/* ---- Nhóm superset trong danh sách ---- */
.tp-ss-wrap{ display:flex; flex-direction:column; gap:8px; padding:10px 8px 8px 12px; border-radius:20px; border:1px solid rgba(94,230,199,.32); border-left:3px solid var(--mint,#5EE6C7); background:rgba(94,230,199,.06); }
.tp-ss-label{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-muted); padding:0 2px; }
.tp-ss-label b{ color:var(--mint-2,#9AF1DD); font-weight:700; letter-spacing:.02em; }
.tp-ss-label svg, .tp-ss-label .material-symbols-rounded{ width:15px; height:15px; font-size:15px; color:var(--mint,#5EE6C7); }
.tp-ss-idx{ display:inline-block; min-width:26px; margin-right:6px; padding:2px 5px; border-radius:6px; background:var(--mint,#5EE6C7); color:var(--navy,#061A24); font-size:12px; font-weight:800; text-align:center; line-height:1.2; }
.tp-ss-open{ margin-left:auto; margin-right:10px; display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:0 12px; border-radius:999px; border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.08); color:#fff; font-family:inherit; font-size:12px; font-weight:600; }
.tp-ss-open svg, .tp-ss-open .material-symbols-rounded{ width:16px; height:16px; font-size:16px; }
.tp-ss-open[hidden]{ display:none; }

/* ---- Thanh trên của buổi tập: đồng hồ, tuần, ghi chú ---- */
.tp-sbar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:-4px 0 12px; }
.tp-clock{ display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:999px; background:rgba(6,26,36,.55); border:1px solid rgba(255,255,255,.16); }
.tp-clock b{ font-family:var(--font-head,"Inter Tight",sans-serif); font-variant-numeric:tabular-nums; font-size:16px; font-weight:600; letter-spacing:.02em; min-width:48px; }
.tp-clock svg, .tp-clock .material-symbols-rounded{ width:16px; height:16px; font-size:16px; color:var(--mint,#5EE6C7); }
.tp-wk{ font-size:12px; font-weight:600; padding:6px 10px; border-radius:999px; background:rgba(94,230,199,.14); color:var(--mint-2,#9AF1DD); border:1px solid rgba(94,230,199,.28); white-space:nowrap; }
.tp-wk.tp-dl{ background:rgba(255,122,69,.16); color:#FFB08A; border-color:rgba(255,122,69,.45); }
.tp-note-btn{ margin-left:auto; display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:0 14px; border-radius:999px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:#fff; font-family:inherit; font-size:13px; font-weight:600; }
.tp-note-btn svg, .tp-note-btn .material-symbols-rounded{ width:17px; height:17px; font-size:17px; }
.tp-note-btn.has{ border-color:rgba(94,230,199,.55); color:var(--mint-2,#9AF1DD); }
.tp-note-box{ margin:-4px 0 12px; }
.tp-note-box[hidden]{ display:none; }
.tp-note-box .small-note{ margin-bottom:6px; font-style:italic; }
.tp-note-box textarea, .tp-fin-note textarea, .tp-log-ta{ width:100%; min-height:76px; padding:10px 12px; border-radius:14px; border:1px solid rgba(255,255,255,.18); background:rgba(6,26,36,.5); color:#fff; font-family:inherit; font-size:16px; line-height:1.45; resize:vertical; }
.tp-note-box textarea:focus, .tp-fin-note textarea:focus, .tp-log-ta:focus{ outline:none; border-color:var(--mint,#5EE6C7); }

/* ---- Deload & AMRAP trong buổi ---- */
.tp-dl-banner{ display:flex; gap:8px; align-items:flex-start; padding:10px 12px; border-radius:14px; background:rgba(255,122,69,.13); border:1px solid rgba(255,122,69,.35); color:#FFD2BD; font-size:13px; line-height:1.45; margin:4px 0 10px; }
.tp-dl-banner b{ color:#fff; }
.tp-dl-banner svg, .tp-dl-banner .material-symbols-rounded{ width:18px; height:18px; font-size:18px; flex:none; margin-top:1px; color:var(--coral,#FF7A45); }
.tp-amrap-note{ display:flex; gap:8px; align-items:flex-start; margin:2px 0 8px; font-size:13px; line-height:1.45; color:var(--text-muted); }
.tp-amrap-note .tp-am-tag{ flex:none; }
.set-row.tp-amrap{ border-color:rgba(255,122,69,.55); box-shadow:inset 3px 0 0 var(--coral,#FF7A45); }
.set-row.tp-amrap b{ color:#FFB08A; }
.set-row.tp-amrap input[data-reps]::placeholder, .set-row.tp-amrap input[data-tp-reps]::placeholder{ color:#FFB08A; opacity:.85; }
.set-row.tp-amrap.done{ border-color:rgba(94,230,199,.4); }
.tp-am-est{ font-size:13px; line-height:1.5; color:var(--mint-2,#9AF1DD); margin-top:8px; }
.tp-am-est:empty{ display:none; }
.tp-am-est b{ color:#fff; }

/* ---- Màn superset / circuit ---- */
.tp-ss-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:4px; }
.tp-ss-head b{ font-family:var(--font-head,"Inter Tight",sans-serif); font-size:18px; font-weight:600; }
.tp-ss-tag{ display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:999px; background:var(--mint,#5EE6C7); color:var(--navy,#061A24); font-size:13px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.tp-ss-tag svg, .tp-ss-tag .material-symbols-rounded{ width:15px; height:15px; font-size:15px; }
.tp-ss-rule{ margin:4px 0 10px; }
.tp-ss{ display:flex; flex-direction:column; gap:12px; position:relative; }
.tp-ss-ex{ padding:12px; border-radius:20px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); }
.tp-ss-exh{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.tp-ss-exh img, .tp-ss-ph{ width:52px; height:52px; border-radius:14px; object-fit:cover; flex:none; background:rgba(255,255,255,.08); }
.tp-ss-nm{ flex:1; min-width:0; }
.tp-ss-nm b{ display:block; font-size:15px; font-weight:600; line-height:1.3; }
.tp-ss-nm b i{ font-style:normal; display:inline-block; margin-right:6px; padding:1px 6px; border-radius:6px; background:var(--mint,#5EE6C7); color:var(--navy,#061A24); font-size:12px; font-weight:800; vertical-align:1px; }
.tp-ss-nm small{ display:block; font-size:12px; color:var(--text-muted); margin-top:2px; line-height:1.4; }
.tp-ss-hist{ width:44px; height:44px; flex:none; display:flex; align-items:center; justify-content:center; }
.set-row.tp-cur{ border-color:var(--mint,#5EE6C7); box-shadow:0 0 0 2px rgba(94,230,199,.35); }
.set-row.tp-cur.tp-amrap{ box-shadow:inset 3px 0 0 var(--coral,#FF7A45), 0 0 0 2px rgba(94,230,199,.35); }
.tp-ss-media{ margin-top:10px; }
.tp-ss-media summary{ min-height:44px; display:flex; align-items:center; cursor:pointer; }
.tp-ss-vid:empty{ display:none; }
.tp-ss-vid{ margin:6px 0 8px; }
.tp-ss ~ .set-rest{ position:sticky; bottom:8px; z-index:3; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); background:rgba(60,32,22,.85); }
.tp-paused{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; color:#FFD2BD; margin:0 0 10px; padding:9px 12px; border-radius:14px; background:rgba(255,122,69,.12); border:1px solid rgba(255,122,69,.3); }
.tp-paused b{ font-variant-numeric:tabular-nums; color:#fff; }
.tp-paused svg, .tp-paused .material-symbols-rounded{ width:16px; height:16px; font-size:16px; color:var(--coral,#FF7A45); }

/* ---- Sheet ghép superset ---- */
.tp-se{ display:flex; flex-direction:column; gap:6px; }
.tp-se-row{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }
.tp-se-row.in{ border-color:rgba(94,230,199,.45); background:rgba(94,230,199,.08); }
.tp-se-lab{ flex:none; min-width:32px; height:32px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.12); font-weight:800; font-size:13px; }
.tp-se-row.in .tp-se-lab{ background:var(--mint,#5EE6C7); color:var(--navy,#061A24); }
.tp-se-info{ flex:1; min-width:0; }
.tp-se-info b{ display:block; font-size:14px; font-weight:600; line-height:1.3; }
.tp-se-info small{ display:block; font-size:12px; color:var(--text-muted); margin-top:2px; }
.tp-se-link{ align-self:center; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 16px; border-radius:999px; border:1px dashed rgba(255,255,255,.3); background:transparent; color:var(--text-muted); font-family:inherit; font-size:13px; font-weight:600; }
.tp-se-link.on{ border-style:solid; border-color:rgba(94,230,199,.6); background:rgba(94,230,199,.14); color:var(--mint-2,#9AF1DD); }
.tp-se-link svg, .tp-se-link .material-symbols-rounded{ width:16px; height:16px; font-size:16px; }
.tp-switch-row{ display:flex; gap:12px; align-items:flex-start; margin-top:14px; padding:12px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); cursor:pointer; }
.tp-switch-row input{ width:22px; height:22px; flex:none; margin-top:1px; accent-color:var(--coral,#FF7A45); }
.tp-switch-row b{ display:block; font-size:14px; font-weight:600; }
.tp-switch-row small{ display:block; font-size:12px; color:var(--text-muted); margin-top:2px; line-height:1.4; }
.tp-switch-row.dis{ opacity:.7; cursor:default; }

/* ---- Tổng kết buổi & thẻ chia sẻ ---- */
.tp-fin{ text-align:left; margin-top:14px; }
.tp-fin-stats{ margin-bottom:6px; }
.tp-fin-wk{ text-align:center; }
.tp-fin .pr-list svg, .tp-fin .pr-list .material-symbols-rounded{ width:16px; height:16px; font-size:16px; color:var(--coral,#FF7A45); vertical-align:-3px; }
.tp-fin-note{ margin-top:12px; }
.tp-fin-note label{ display:block; font-size:12px; color:var(--text-muted); margin-bottom:6px; font-weight:600; }
.tp-fin .btn{ margin-top:10px; }
.tp-share-wrap{ border-radius:18px; overflow:hidden; border:1px solid rgba(255,255,255,.14); background:#061A24; box-shadow:0 12px 30px rgba(0,0,0,.4); }
.tp-share-canvas{ display:block; width:100%; height:auto; aspect-ratio:1080/1350; }
.tp-share-actions{ display:flex; gap:10px; margin-top:12px; }
.tp-share-actions .btn{ flex:1; }

/* ---- Nhật ký buổi tập ---- */
.tp-log{ display:flex; flex-direction:column; gap:10px; }
.tp-log-item{ padding:12px 14px; border-radius:18px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }
.tp-log-h{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tp-log-h b{ font-size:15px; font-weight:600; }
.tp-log-item small{ display:block; font-size:12px; color:var(--text-muted); margin-top:3px; }
.tp-log-note{ margin-top:8px; font-size:13.5px; line-height:1.5; color:#E6F4F1; white-space:pre-wrap; }
.tp-log-note.empty{ color:var(--text-dim,#6f6b6b); font-style:italic; }
.tp-log-ta{ margin-top:8px; }
.tp-log-act{ display:flex; gap:6px; margin-top:6px; }
.tp-log-act .btn{ min-height:44px; display:inline-flex; gap:5px; }
.tp-log-act svg, .tp-log-act .material-symbols-rounded{ width:16px; height:16px; font-size:16px; }

/* ---- Khối lượng theo nhóm cơ (màn Tiến độ) ---- */
.tp-vol-nav{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.tp-vol-nav > div{ text-align:center; flex:1; }
.tp-vol-nav b{ display:block; font-size:15px; font-weight:600; }
.tp-vol-nav small{ font-size:12px; color:var(--text-muted); }
.tp-vol-nav .icon-btn{ width:44px; height:44px; display:flex; align-items:center; justify-content:center; }
.tp-vol-nav .icon-btn[disabled]{ opacity:.35; }
.tp-vol-sum{ text-align:center; margin-bottom:4px; }
.tp-vol-chart{ width:100%; margin-top:4px; }
.tp-vol-svg{ width:100%; height:auto; display:block; }
.tp-vol-svg .band{ fill:rgba(94,230,199,.10); stroke:rgba(94,230,199,.25); stroke-dasharray:3 3; }
.tp-vol-svg .grid{ stroke:rgba(255,255,255,.12); stroke-width:1; }
.tp-vol-svg .ax{ fill:var(--text-muted); font-size:12px; font-family:var(--font-ui,Inter,sans-serif); }
.tp-vol-svg .lab{ fill:#fff; font-size:12.5px; font-weight:500; font-family:var(--font-ui,Inter,sans-serif); }
.tp-vol-svg .track{ fill:rgba(255,255,255,.06); }
.tp-vol-svg .bar.ok{ fill:var(--mint,#5EE6C7); }
.tp-vol-svg .bar.low{ fill:#FFB08A; }
.tp-vol-svg .bar.low2{ fill:rgba(255,122,69,.75); }
.tp-vol-svg .bar.high{ fill:#F5C542; }
.tp-vol-svg .plan{ stroke:#fff; stroke-width:2.5; stroke-linecap:round; opacity:.85; }
.tp-vol-svg .val{ font-size:12.5px; font-weight:700; font-family:var(--font-ui,Inter,sans-serif); fill:#fff; }
.tp-vol-svg .val.ok{ fill:var(--mint-2,#9AF1DD); }
.tp-vol-svg .val.low, .tp-vol-svg .val.low2{ fill:#FFB08A; }
.tp-vol-svg .val.high{ fill:#F5C542; }
.tp-legend{ display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:6px; font-size:12px; color:var(--text-muted); }
.tp-legend span{ display:inline-flex; align-items:center; gap:5px; }
.tp-legend i{ display:inline-block; width:12px; height:12px; border-radius:3px; }
.tp-legend i.ok{ background:var(--mint,#5EE6C7); } .tp-legend i.low{ background:#FFB08A; } .tp-legend i.high{ background:#F5C542; }
.tp-legend i.plan{ width:3px; height:14px; border-radius:2px; background:#fff; }
.tp-vol-tip{ margin-top:8px; }
.tp-vol-tip b{ color:#fff; }

/* ---- Vòng sửa lỗi QA (fix-training) — chỉ dùng biến màu (không màu cứng) để lớp màu theme sinh tự động không đổi ---- */
/* QT-05 · thẻ giáo án gợi ý cho người mới */
.tp-reco{ padding:14px 16px; }
.tp-reco .small-note{ margin-top:6px; line-height:1.5; }
.tp-reco-act, .tp-gap-act{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tp-reco-act .btn, .tp-gap-act .btn{ min-height:44px; }
/* QT-13 · nghỉ dài giữa chu kỳ */
.tp-gap{ margin-top:10px; padding:10px 0 0; cursor:default; }
.tp-gap .small-note{ margin-top:0; line-height:1.5; }
/* QT-08/10/13 · ghi chú điền sẵn trong buổi tập (dùng lại kiểu .tp-amrap-note) */
.tp-prefill-notes{ display:flex; flex-direction:column; gap:6px; margin:4px 0 8px; }
.tp-tb-note svg, .tp-tb-note .material-symbols-rounded{ width:18px; height:18px; font-size:18px; flex:none; margin-top:1px; }
.tp-same{ line-height:1.45; }
