/* ============================================================
   Sellution — Training / LMS module  (prefix: tr-)
   Light theme, brand tokens from styles.css
   ============================================================ */

/* ---------- app shell ---------- */
.tr { display: flex; flex-direction: column; background: var(--bg-2); }
.tr-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tr-seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; }
.tr-seg button {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.86rem; color: var(--muted);
  padding: 8px 16px; border-radius: 8px; transition: all 0.18s var(--ease);
}
.tr-seg button svg { width: 16px; height: 16px; }
.tr-seg button.on { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.tr-seg button:not(.on):hover { color: var(--ink); }

.tr-id { display: inline-flex; align-items: center; gap: 12px; }
.tr-xp { display: inline-flex; align-items: center; gap: 9px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 14px; }
.tr-xp .lvl { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 0.84rem; color: #3a2600; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.tr-xp .xpn { font-family: var(--font-mono); font-weight: 500; font-size: 0.84rem; color: var(--ink); }
.tr-xp .xpn small { color: var(--muted); }
.tr-rank { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; color: #7a4a00; background: linear-gradient(180deg, #ffd66e, #f6b41e); }
.tr-rank.admin { color: var(--primary); background: var(--primary-soft); }

.tr-body { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 560px; }
@media (max-width: 820px) { .tr-body { grid-template-columns: 1fr; } }

/* ---------- left nav ---------- */
.tr-nav { border-right: 1px solid var(--line); background: #fff; padding: 16px 12px; overflow: hidden; }
@media (max-width: 820px) { .tr-nav { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 12px; } }
.tr-nav-group { margin-bottom: 14px; }
@media (max-width: 820px) { .tr-nav-group { margin-bottom: 0; display: contents; } }
.tr-nav-h { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted-2); padding: 0 10px; margin-bottom: 6px; }
@media (max-width: 820px) { .tr-nav-h { display: none; } }
.tr-nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.86rem; color: var(--body);
  padding: 9px 10px; border-radius: 9px; text-align: left; transition: background 0.16s, color 0.16s; white-space: nowrap;
}
.tr-nav-btn svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); transition: color 0.16s; }
.tr-nav-btn:hover { background: var(--bg-2); color: var(--ink); }
.tr-nav-btn.on { background: var(--primary-soft); color: var(--primary); }
.tr-nav-btn.on svg { color: var(--primary); }
.tr-nav-btn .ct { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.tr-nav-btn.on .ct { background: #fff; border-color: var(--primary-soft); color: var(--primary); }

/* ---------- main ---------- */
.tr-main { padding: 24px; overflow: hidden; }
.tr-ph { margin-bottom: 20px; }
.tr-ph h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); letter-spacing: -0.02em; }
.tr-ph p { margin: 5px 0 0; font-size: 0.92rem; color: var(--muted); }

/* contextual guidance callout */
.tr-tip { display: flex; gap: 13px; align-items: flex-start; border: 1px solid var(--line); border-left: 3px solid var(--primary); background: linear-gradient(180deg, #f4f7fd, #fff); border-radius: 12px; padding: 14px 17px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.tr-tip .ti { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.tr-tip .ti svg { width: 17px; height: 17px; }
.tr-tip .tx { font-size: 0.88rem; color: var(--body); line-height: 1.55; }
.tr-tip .tx b { color: var(--ink); font-weight: 700; }
.tr-tip .eg { display: inline-block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 6px; margin-bottom: 8px; }
.tr-tip .tx .lead { display: block; font-weight: 800; font-size: 0.98rem; color: var(--ink); margin-bottom: 2px; letter-spacing: -0.01em; }
.tr-tip.try { border-left-color: var(--accent); background: linear-gradient(180deg, #fffbf2, #fff); }
.tr-tip.try .ti { background: var(--accent-soft); color: var(--gold); }
.tr-tip.try .eg { color: var(--gold); background: var(--accent-soft); }

/* inline annotation hint (sits inside a component, by the controls) */
.tr-hint { font-size: 0.84rem; color: var(--muted); margin: -2px 0 16px; display: flex; align-items: center; gap: 9px; }
.tr-hint svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.tr-hint b { color: var(--ink); font-weight: 700; }

/* generic cards / tiles */
.tr-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.tr-grid { display: grid; gap: 14px; }
.tr-g3 { grid-template-columns: repeat(3, 1fr); }
.tr-g4 { grid-template-columns: repeat(4, 1fr); }
.tr-g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 1080px) { .tr-g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 920px) { .tr-g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tr-g2, .tr-g3, .tr-g4 { grid-template-columns: 1fr; } }

/* stat tiles */
.tr-stat { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 16px; box-shadow: var(--shadow-sm); }
.tr-stat .k { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--muted); }
.tr-stat .k svg { width: 15px; height: 15px; color: var(--primary); }
.tr-stat .v { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: var(--ink); margin-top: 7px; letter-spacing: -0.02em; }
.tr-stat .d { font-size: 0.76rem; color: var(--muted-2); margin-top: 2px; }
.tr-stat.tint { background: linear-gradient(180deg, #fffdf6, #fff); border-color: rgba(251,169,25,0.35); }
.tr-stat.tint .v { color: var(--gold); }
.tr-stat.tintg { background: linear-gradient(180deg, #f3fbf7, #fff); border-color: rgba(10,143,91,0.3); }
.tr-stat.tintg .v { color: var(--ok); }

/* course cards */
.tr-courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1080px) { .tr-courses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tr-courses { grid-template-columns: 1fr; } }
.tr-course { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s; display: flex; flex-direction: column; }
.tr-course:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.tr-course-thumb { height: 96px; position: relative; display: grid; place-items: center; overflow: hidden; }
.tr-course-thumb .lvl { position: absolute; top: 9px; left: 9px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(15,29,51,0.82); color: #fff; border-radius: 6px; padding: 3px 8px; }
.tr-course-thumb .bm { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.92); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--muted); box-shadow: var(--shadow-sm); transition: color 0.15s, transform 0.15s; }
.tr-course-thumb .bm:hover { transform: scale(1.08); }
.tr-course-thumb .bm.on { color: var(--accent); }
.tr-course-thumb .bm svg { width: 15px; height: 15px; }
.tr-course-thumb .cat-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.tr-course-thumb .cat-ic svg { width: 20px; height: 20px; }
.tr-course-b { padding: 13px 14px; flex: 1; display: flex; flex-direction: column; }
.tr-course-t { font-weight: 700; font-size: 0.95rem; color: var(--ink); line-height: 1.25; }
.tr-course-sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.tr-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 3px 8px; margin-top: 10px; align-self: flex-start; }
.tr-prog { margin-top: auto; padding-top: 12px; }
.tr-prog-bar { height: 7px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.tr-prog-bar i { display: block; height: 100%; border-radius: 5px; width: 0; background: linear-gradient(90deg, var(--primary), #4a64bb); transition: width 0.7s var(--ease); }
.tr-prog-bar i.done { background: linear-gradient(90deg, var(--ok), #2fbd86); }
.tr-prog-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--muted); }
.tr-prog-meta .pc { font-weight: 700; color: var(--ink); }
.tr-trainer { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--body); }
.tr-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.66rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.tr-free { margin-left: auto; font-weight: 700; color: var(--ok); }

/* continue-learning hero */
.tr-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #2c4185, #1e2f5f 62%, #16233f); color: #fff; position: relative; overflow: hidden; margin-bottom: 18px; }
.tr-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(30rem 18rem at 90% -30%, rgba(251,169,25,0.22), transparent 60%); pointer-events: none; }
.tr-hero > * { position: relative; }
.tr-hero .eyebrow { color: var(--accent-2); }
.tr-hero .eyebrow::before { background: var(--accent); }
.tr-hero h4 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.tr-hero .meta { color: rgba(255,255,255,0.7); font-size: 0.88rem; margin-top: 6px; }
.tr-hero .hb { margin-top: 16px; }
.tr-hero .barwrap { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.16); overflow: hidden; max-width: 360px; }
.tr-hero .barwrap i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0; transition: width 0.8s var(--ease); }
.tr-hero .barlbl { font-size: 0.76rem; color: rgba(255,255,255,0.7); margin-top: 7px; }
.tr-hero .btn-gold { color: #3a2600; }

/* progress ring */
.tr-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,0.16) 0); transition: background 0.8s var(--ease); }
.tr-ring .inner { width: 74px; height: 74px; border-radius: 50%; background: #1e2f5f; display: grid; place-items: center; text-align: center; }
.tr-ring .pn { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: #fff; line-height: 1; }
.tr-ring .pl { font-size: 0.62rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.tr-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.tr-sec-h h4 { margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.tr-sec-h .more { font-size: 0.82rem; font-weight: 600; color: var(--primary); cursor: pointer; }
.tr-pillrow { display: inline-flex; gap: 7px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.tr-pillrow button { border: 0; background: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; color: var(--muted); padding: 6px 13px; border-radius: 7px; }
.tr-pillrow button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- COURSE PLAYER ---------- */
.tr-player-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tr-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; margin-bottom: 8px; }
.tr-back:hover { color: var(--primary); }
.tr-back svg { width: 14px; height: 14px; }
.tr-player-head h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.02em; }
.tr-player-head .by { font-size: 0.84rem; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.tr-cprog { text-align: right; min-width: 150px; }
.tr-cprog .barwrap { height: 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.tr-cprog .barwrap i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #4a64bb); width: 0; transition: width 0.6s var(--ease); }
.tr-cprog .barwrap i.done { background: linear-gradient(90deg, var(--ok), #2fbd86); }
.tr-cprog .lbl { font-size: 0.76rem; color: var(--muted); margin-top: 6px; }
.tr-cprog .lbl b { color: var(--ink); }

.tr-player { display: grid; grid-template-columns: 212px minmax(0, 1fr) 244px; gap: 16px; }
@media (max-width: 1120px) { .tr-player { grid-template-columns: 200px minmax(0, 1fr); } .tr-rail { grid-column: 1 / -1; } }
@media (max-width: 720px) { .tr-player { grid-template-columns: 1fr; } }

/* lesson list */
.tr-lessons { display: flex; flex-direction: column; gap: 8px; }
.tr-lesson { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 11px 12px; cursor: pointer; transition: border-color 0.16s, background 0.16s, transform 0.16s var(--ease); text-align: left; }
.tr-lesson:hover { transform: translateX(2px); border-color: var(--line-2); }
.tr-lesson.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--shadow-sm); }
.tr-lesson .tic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.tr-lesson .tic svg { width: 15px; height: 15px; }
.tr-lesson .ll { min-width: 0; }
.tr-lesson .lt { font-weight: 700; font-size: 0.82rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-lesson .lm { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }
.tr-lesson .lck { margin-left: auto; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.tr-lesson .lck svg { width: 10px; height: 10px; color: #fff; opacity: 0; }
.tr-lesson.done .lck { background: var(--ok); border-color: var(--ok); }
.tr-lesson.done .lck svg { opacity: 1; }

/* content stage */
.tr-stage { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.tr-stage-h { display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.tr-stage-h .badge { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tr-stage-h .ttl { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.tr-stage-body { padding: 16px; }

/* video */
.tr-video { position: relative; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: linear-gradient(135deg, #1b2640, #0f1d33); display: grid; place-items: center; }
.tr-video::after { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 40%, rgba(57,83,165,0.35), transparent 70%); }
.tr-video .play { position: relative; z-index: 2; width: 62px; height: 62px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.95); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform 0.18s var(--ease); }
.tr-video .play:hover { transform: scale(1.06); }
.tr-video .play svg { width: 24px; height: 24px; color: var(--primary); margin-left: 3px; }
.tr-video.playing .play svg { margin-left: 0; }
.tr-video .vlabel { position: absolute; z-index: 2; top: 12px; left: 14px; font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 7px; }
.tr-video .vlabel .ld { width: 7px; height: 7px; border-radius: 50%; background: #d4533a; }
.tr-vbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.tr-vbar .t { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); min-width: 78px; }
.tr-scrub { flex: 1; height: 6px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.tr-scrub i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary), #4a64bb); width: 0%; }

/* audio */
.tr-audio { display: flex; align-items: center; gap: 16px; padding: 8px 4px; }
.tr-audio .pp { width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0; background: linear-gradient(135deg, #4a64bb, #2c4185); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md); transition: transform 0.16s var(--ease); }
.tr-audio .pp:hover { transform: scale(1.05); }
.tr-audio .pp svg { width: 22px; height: 22px; margin-left: 2px; }
.tr-audio.playing .pp svg { margin-left: 0; }
.tr-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 46px; }
.tr-wave i { flex: 1; border-radius: 3px; background: var(--line-2); transition: background 0.2s, height 0.25s var(--ease); }
.tr-wave i.played { background: var(--primary); }
.tr-audio .at { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); min-width: 88px; text-align: right; }

/* reading */
.tr-read { font-size: 0.92rem; line-height: 1.7; color: var(--body); max-height: 320px; overflow-y: auto; padding-right: 8px; }
.tr-read h5 { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); margin: 0 0 8px; letter-spacing: -0.01em; }
.tr-read h6 { font-weight: 800; font-size: 0.9rem; color: var(--ink); margin: 18px 0 6px; }
.tr-read p { margin: 0 0 12px; }
.tr-read .pull { border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; padding: 11px 14px; color: var(--ink); font-weight: 500; margin: 0 0 14px; }
.tr-read ol { margin: 0 0 12px; padding-left: 20px; }
.tr-read ol li { margin-bottom: 7px; }
.tr-read ol li b { color: var(--ink); }
.tr-read::-webkit-scrollbar { width: 8px; }
.tr-read::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

/* quiz */
.tr-quiz .q { margin-bottom: 18px; }
.tr-quiz .qn { font-family: var(--font-mono); font-size: 0.7rem; color: var(--primary); letter-spacing: 0.08em; text-transform: uppercase; }
.tr-quiz .qt { font-weight: 700; font-size: 0.96rem; color: var(--ink); margin: 6px 0 11px; line-height: 1.4; }
.tr-opt { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 12px 14px; cursor: pointer; font-family: var(--font-body); font-size: 0.88rem; color: var(--ink); margin-bottom: 8px; transition: border-color 0.15s, background 0.15s; }
.tr-opt:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.tr-opt .mk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; transition: all 0.15s; }
.tr-opt .mk svg { width: 12px; height: 12px; opacity: 0; }
.tr-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.tr-opt.sel .mk { border-color: var(--primary); background: var(--primary); }
.tr-opt.sel .mk svg { opacity: 1; color: #fff; }
.tr-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.tr-opt.correct .mk { border-color: var(--ok); background: var(--ok); }
.tr-opt.correct .mk svg { opacity: 1; color: #fff; }
.tr-opt.wrong { border-color: #d4533a; background: rgba(212,83,58,0.08); }
.tr-opt.wrong .mk { border-color: #d4533a; background: #d4533a; }
.tr-opt.wrong .mk svg { opacity: 1; color: #fff; }
.tr-opt:disabled { cursor: default; }
.tr-quiz-result { display: flex; align-items: center; gap: 14px; border-radius: 13px; padding: 16px 18px; margin-top: 4px; }
.tr-quiz-result.pass { background: var(--ok-soft); border: 1px solid rgba(10,143,91,0.3); }
.tr-quiz-result.fail { background: rgba(212,83,58,0.08); border: 1px solid rgba(212,83,58,0.3); }
.tr-quiz-result .big { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; }
.tr-quiz-result.pass .big { color: var(--ok); }
.tr-quiz-result.fail .big { color: #d4533a; }
.tr-quiz-result .rt { font-weight: 800; color: var(--ink); }
.tr-quiz-result .rd { font-size: 0.84rem; color: var(--muted); margin-top: 2px; }

.tr-stage-foot { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.tr-stage-foot .hint { font-size: 0.78rem; color: var(--muted); }
.tr-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 10px 16px; font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: transform 0.16s var(--ease), filter 0.16s; }
.tr-btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #3a2600; box-shadow: 0 8px 18px -10px rgba(251,169,25,0.7); }
.tr-btn.primary:hover { transform: translateY(-1px); }
.tr-btn.ghost { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
.tr-btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.tr-btn.done { background: var(--ok-soft); color: var(--ok); cursor: default; }
.tr-btn svg { width: 15px; height: 15px; }
.tr-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* right rail — notes + bookmark */
.tr-rail { display: flex; flex-direction: column; gap: 12px; }
.tr-rail-card { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 14px; box-shadow: var(--shadow-sm); }
.tr-rail-card h5 { margin: 0 0 10px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.tr-rail-card h5 svg { width: 14px; height: 14px; }
.tr-note-in { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; font-family: var(--font-body); font-size: 0.84rem; color: var(--ink); resize: none; min-height: 64px; background: var(--bg-2); }
.tr-note-in:focus { outline: none; border-color: var(--primary); background: #fff; }
.tr-note-add { margin-top: 8px; width: 100%; }
.tr-note-item { font-size: 0.82rem; color: var(--body); background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-top: 8px; }
.tr-note-item .nm { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted-2); margin-top: 4px; }
.tr-bm-toggle { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); padding: 11px 13px; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.84rem; color: var(--ink); transition: all 0.16s; }
.tr-bm-toggle svg { width: 17px; height: 17px; color: var(--muted); }
.tr-bm-toggle.on { background: var(--accent-soft); border-color: rgba(251,169,25,0.4); color: var(--gold); }
.tr-bm-toggle.on svg { color: var(--accent); fill: var(--accent); }

/* ---------- LIBRARY ---------- */
.tr-lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 980px) { .tr-lib { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tr-lib { grid-template-columns: 1fr; } }
.tr-lib-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 20px; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s; box-shadow: var(--shadow-sm); }
.tr-lib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.tr-lib-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tr-lib-ic svg { width: 22px; height: 22px; }
.tr-lib-card h4 { margin: 16px 0 0; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.tr-lib-card p { margin: 5px 0 0; font-size: 0.84rem; color: var(--muted); }
.tr-lib-card .view { margin-top: 14px; font-size: 0.82rem; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.tr-lib-card .view svg { width: 14px; height: 14px; }
.tr-lib-card .cnt { float: right; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }

/* ---------- NOTES ---------- */
.tr-notes-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 860px) { .tr-notes-layout { grid-template-columns: 1fr; } }
.tr-note-list { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.tr-note-row { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 13px 15px; cursor: pointer; transition: border-color 0.16s, box-shadow 0.16s; }
.tr-note-row:hover { border-color: var(--line-2); }
.tr-note-row.on { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.tr-note-row .src { font-size: 0.74rem; color: var(--primary); font-weight: 600; }
.tr-note-row .nt { font-weight: 700; color: var(--ink); font-size: 0.92rem; margin-top: 4px; }
.tr-note-row .ne { font-size: 0.82rem; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-note-row .nd { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted-2); margin-top: 7px; }
.tr-note-detail { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 22px; box-shadow: var(--shadow-sm); }
.tr-note-detail .tag { font-size: 0.72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 3px 9px; }
.tr-note-detail h4 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.tr-note-detail .meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); margin-top: 6px; }
.tr-note-detail .body { margin-top: 16px; font-size: 0.94rem; line-height: 1.7; color: var(--body); }

/* ---------- ACHIEVEMENTS ---------- */
.tr-ach-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.tr-ach-hero h4 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.tr-ach-hero p { margin: 5px 0 0; font-size: 0.88rem; color: var(--muted); max-width: 420px; }
.tr-ach-hero .big { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--ink); line-height: 1; text-align: right; }
.tr-ach-hero .big small { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-top: 4px; }
.tr-ach-track { height: 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin-top: 16px; max-width: 100%; }
.tr-ach-track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0; transition: width 0.9s var(--ease); }
.tr-hexes { display: flex; gap: 12px; flex-wrap: wrap; }
.tr-hex { width: 96px; text-align: center; }
.tr-hex .shape { width: 84px; height: 92px; margin: 0 auto; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; position: relative; transition: transform 0.18s var(--ease); }
.tr-hex:hover .shape { transform: translateY(-3px) scale(1.03); }
.tr-hex .shape svg { width: 30px; height: 30px; color: #fff; }
.tr-hex .shape .tick { position: absolute; top: 6px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; display: grid; place-items: center; }
.tr-hex .shape .tick svg { width: 10px; height: 10px; }
.tr-hex.locked .shape { background: var(--bg-2) !important; border: 1px dashed var(--line-2); }
.tr-hex.locked .shape svg { color: var(--muted-2); }
.tr-hex .nm { font-size: 0.72rem; font-weight: 700; color: var(--ink); margin-top: 7px; line-height: 1.25; }
.tr-hex.locked .nm { color: var(--muted-2); }
.tr-ach-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 760px) { .tr-ach-cards { grid-template-columns: 1fr; } }
.tr-ach-mini { border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: linear-gradient(180deg, var(--c1), var(--c2)); }
.tr-ach-mini .k { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 700; color: var(--cf); }
.tr-ach-mini .k svg { width: 15px; height: 15px; }
.tr-ach-mini .v { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--ink); margin-top: 8px; }
.tr-ach-mini .d { font-size: 0.78rem; color: var(--muted); }

/* ---------- ANALYTICS ---------- */
.tr-donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.tr-donut { --c: 28; --i: 6; width: 150px; height: 150px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--primary) 0 calc(var(--c) * 1%), var(--ok) 0 calc((var(--c) + var(--i)) * 1%), var(--accent) 0 100%); position: relative; }
.tr-donut::after { content: ''; position: absolute; inset: 26px; border-radius: 50%; background: #fff; }
.tr-donut .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; z-index: 2; }
.tr-donut .ctr b { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: var(--ink); }
.tr-donut .ctr span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tr-legend { display: flex; flex-direction: column; gap: 9px; }
.tr-legend .lg { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; color: var(--body); }
.tr-legend .dot { width: 11px; height: 11px; border-radius: 3px; }
.tr-legend b { margin-left: auto; color: var(--ink); font-family: var(--font-mono); }
.tr-rows { display: flex; flex-direction: column; }
.tr-row-line { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.tr-row-line:last-child { border-bottom: 0; }
.tr-row-line .k { color: var(--body); }
.tr-row-line .v { font-weight: 700; color: var(--ink); }
.tr-row-line .v.ok { color: var(--ok); }
.tr-skill { margin-bottom: 14px; }
.tr-skill-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tr-skill-h .sn { font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.tr-skill-h .sf { font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tr-skill-track { height: 8px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.tr-skill-track i { display: block; height: 100%; border-radius: 5px; width: 0; transition: width 0.8s var(--ease); }
.tr-skill .sd { font-size: 0.76rem; color: var(--muted); margin-top: 5px; }

/* bars chart */
.tr-bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.tr-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.tr-bars .bar { width: 100%; max-width: 64px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, #7c87d6, var(--primary)); height: 0; transition: height 0.8s var(--ease); }
.tr-bars .bl { font-size: 0.74rem; color: var(--muted); text-align: center; }
.tr-bars .bv { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink); font-weight: 500; }

/* ---------- LEADERBOARD ---------- */
.tr-lb-toggle { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tr-lb-toggle button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-family: var(--font-body); font-weight: 700; font-size: 0.84rem; color: var(--muted); padding: 8px 16px; border-radius: 8px; }
.tr-lb-toggle button svg { width: 15px; height: 15px; }
.tr-lb-toggle button.on { background: var(--primary); color: #fff; }
.tr-lb-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.tr-lb-tab { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 13px; font-size: 0.8rem; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tr-lb-tab svg { width: 14px; height: 14px; }
.tr-lb-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tr-lb-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 14px 16px; margin-bottom: 10px; transition: border-color 0.16s; }
.tr-lb-row.you { border-color: var(--primary); box-shadow: var(--shadow-sm); background: linear-gradient(90deg, var(--primary-soft), #fff 40%); }
.tr-lb-rank { display: flex; align-items: center; gap: 8px; }
.tr-lb-rank .pos { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--muted); }
.tr-lb-rank .medal { font-size: 1.2rem; }
.tr-lb-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tr-lb-who .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.84rem; color: #fff; flex-shrink: 0; }
.tr-lb-who .nm { font-weight: 800; color: var(--ink); font-size: 0.96rem; }
.tr-lb-who .you-tag { font-size: 0.66rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.tr-lb-who .sub { font-size: 0.76rem; color: var(--muted); }
.tr-lb-stats { display: flex; gap: 20px; align-items: center; }
@media (max-width: 720px) { .tr-lb-stats .col.hideable { display: none; } }
.tr-lb-stats .col { text-align: center; }
.tr-lb-stats .col .sv { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.tr-lb-stats .col .sl { font-size: 0.64rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; }
.tr-lb-stats .tier { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.tier-senior { color: #7a4a00; background: linear-gradient(180deg, #ffd66e, #f6b41e); }
.tier-assoc { color: var(--primary); background: var(--primary-soft); }
.tier-trainee { color: #b45309; background: rgba(251,169,25,0.18); }
.tr-lb-foot { text-align: center; font-size: 0.78rem; color: var(--muted-2); margin-top: 12px; }

/* ---------- ADMIN ---------- */
.tr-closed-loop { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #0a6b46, #0a8f5b 70%); color: #fff; position: relative; overflow: hidden; margin-top: 18px; }
.tr-closed-loop::before { content: ''; position: absolute; inset: 0; background: radial-gradient(28rem 18rem at 92% -30%, rgba(255,255,255,0.18), transparent 60%); pointer-events: none; }
.tr-closed-loop > * { position: relative; }
.tr-closed-loop .eyebrow { color: rgba(255,255,255,0.85); }
.tr-closed-loop .eyebrow::before { background: rgba(255,255,255,0.6); }
.tr-closed-loop h4 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; max-width: 480px; }
.tr-closed-loop p { margin: 8px 0 0; color: rgba(255,255,255,0.82); font-size: 0.9rem; max-width: 460px; }
.tr-cl-stat { text-align: center; }
.tr-cl-stat .big { font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; line-height: 1; }
.tr-cl-stat .lbl { font-size: 0.78rem; color: rgba(255,255,255,0.8); margin-top: 6px; }

/* builder */
.tr-builder { display: grid; grid-template-columns: 1fr 230px; gap: 16px; }
@media (max-width: 860px) { .tr-builder { grid-template-columns: 1fr; } }
.tr-blocks { display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.tr-block { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 15px; box-shadow: var(--shadow-sm); animation: trPop 0.32s var(--ease); }
@keyframes trPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tr-block .bic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.tr-block .bic svg { width: 18px; height: 18px; }
.tr-block .bt { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.tr-block .bd { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.tr-block .grip { margin-left: auto; color: var(--muted-2); display: flex; }
.tr-block .grip svg { width: 16px; height: 16px; }
.tr-block .rm { border: 0; background: none; cursor: pointer; color: var(--muted-2); padding: 4px; border-radius: 6px; }
.tr-block .rm:hover { color: #d4533a; background: rgba(212,83,58,0.08); }
.tr-block .rm svg { width: 15px; height: 15px; }
.tr-tray-h { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tr-tray-chip { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px dashed var(--line-2); background: var(--bg-2); border-radius: 11px; padding: 11px 13px; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; color: var(--ink); margin-bottom: 9px; transition: all 0.16s var(--ease); }
.tr-tray-chip:hover { border-style: solid; border-color: var(--primary); background: #fff; transform: translateY(-2px); }
.tr-tray-chip .pi { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.tr-tray-chip .pi svg { width: 14px; height: 14px; }

/* assign / onboard */
.tr-assign { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
@media (max-width: 880px) { .tr-assign { grid-template-columns: 1fr; } }
.tr-collection { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 13px 15px; cursor: pointer; margin-bottom: 10px; transition: border-color 0.16s, box-shadow 0.16s; }
.tr-collection.on { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.tr-collection .ct { font-weight: 800; color: var(--ink); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.tr-collection .ct svg { width: 16px; height: 16px; color: var(--primary); }
.tr-collection .cb { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.tr-collection .cpill { display: inline-block; font-size: 0.68rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 8px; margin-top: 8px; }
.tr-roster-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.tr-roster-h .rt { font-weight: 800; color: var(--ink); font-size: 1rem; }
.tr-roster-h .rs { font-size: 0.82rem; color: var(--muted); }
.tr-roles { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.tr-role { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 0.8rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.16s; }
.tr-role.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tr-person { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 15px; margin-bottom: 9px; }
.tr-person .nm { font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.tr-person .ro { font-size: 0.76rem; color: var(--muted); }
.tr-status { font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.tr-status svg { width: 13px; height: 13px; }
.tr-status.todo { color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); }
.tr-status.prog { color: var(--primary); background: var(--primary-soft); }
.tr-status.done { color: var(--ok); background: var(--ok-soft); }
.tr-status.justassigned { animation: trPop 0.4s var(--ease); }

/* tracking table */
.tr-table { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tr-trow { display: grid; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.tr-trow:last-child { border-bottom: 0; }
.tr-trow.head { background: var(--bg-2); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tr-track-cols { grid-template-columns: 1.6fr repeat(4, 1fr) 1.1fr; gap: 12px; }
@media (max-width: 820px) { .tr-track-cols { grid-template-columns: 1.4fr 1fr 1fr; } .tr-track-cols .hidec { display: none; } }
.tr-trow .who { display: flex; align-items: center; gap: 10px; }
.tr-trow .who .nm { font-weight: 700; color: var(--ink); }
.tr-cell-c { text-align: center; }
.tr-mini-tick { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; }
.tr-mini-tick.y { background: var(--ok); color: #fff; }
.tr-mini-tick.n { background: var(--bg-2); border: 1px solid var(--line); color: var(--muted-2); }
.tr-mini-tick svg { width: 12px; height: 12px; }
.tr-mini-tick.part { background: var(--accent-soft); color: var(--gold); font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; }
.tr-delta { font-weight: 800; font-family: var(--font-mono); font-size: 0.92rem; }
.tr-delta.up { color: var(--ok); }
.tr-delta.flat { color: var(--muted); }

/* groups & meetings */
.tr-meet { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.tr-meet .when { text-align: center; flex-shrink: 0; border-right: 1px solid var(--line); padding-right: 14px; min-width: 58px; }
.tr-meet .when .d { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); line-height: 1; }
.tr-meet .when .m { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; }
.tr-meet .info { min-width: 0; flex: 1; }
.tr-meet .info .mt { font-weight: 800; color: var(--ink); font-size: 0.96rem; }
.tr-meet .info .ms { font-size: 0.8rem; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tr-meet .live-pill { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: #d4533a; border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 5px; }
.tr-meet .live-pill .d { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.tr-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 900px) { .tr-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tr-groups { grid-template-columns: 1fr; } }
.tr-group { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.tr-group .gt { height: 70px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.1em; }
.tr-group .gb { padding: 13px 15px; }
.tr-group .gn { font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.tr-group .gd { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.tr-group .gm { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--body); }

/* toast */
.tr-toast { position: absolute; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; border-radius: 12px; padding: 13px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-xl); opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--ease); z-index: 30; max-width: 90%; }
.tr-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tr-toast .ti { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #3a2600; }
.tr-toast .ti svg { width: 19px; height: 19px; }
.tr-toast .tt { font-weight: 800; font-size: 0.9rem; }
.tr-toast .td { font-size: 0.78rem; color: rgba(255,255,255,0.72); margin-top: 1px; }

/* ============================================================
   Cards-first navigation: pills + breadth-reveal launcher
   ============================================================ */

/* richer group cards (members / access / linked course) */
.tr-group { display: flex; flex-direction: column; }
.tr-group .gb { display: flex; flex-direction: column; flex: 1; }
.tr-group .gstats { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.tr-group .gr { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.78rem; color: var(--muted); }
.tr-group .gr span { display: inline-flex; align-items: center; gap: 6px; }
.tr-group .gr span svg { width: 14px; height: 14px; }
.tr-group .gr b { color: var(--ink); font-weight: 700; }
.tr-group .gr b.ell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* horizontal pill nav — shown in cards mode instead of the side rail */
.tr-pills { display: none; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; overflow-x: auto; scrollbar-width: thin; }
.tr.cards .tr-pills { display: flex; }
.tr.cards .tr-nav { display: none; }
.tr.cards .tr-body { grid-template-columns: minmax(0, 1fr); }
.tr-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; color: var(--body); padding: 8px 14px; border-radius: 999px; transition: all 0.16s var(--ease); white-space: nowrap; }
.tr-pill svg { width: 16px; height: 16px; color: var(--muted); transition: color 0.16s; }
.tr-pill:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tr-pill:hover svg { color: var(--primary); }
.tr-pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tr-pill.on svg { color: #fff; }
.tr-pill .pc { font-family: var(--font-mono); font-size: 0.68rem; background: var(--bg-2); border-radius: 999px; padding: 1px 7px; color: var(--muted); }
.tr-pill.on .pc { background: rgba(255,255,255,0.22); color: #fff; }

/* breadth-reveal launcher on the home view */
.tr-launch-wrap { margin-bottom: 22px; }
.tr-launch-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 13px; }
.tr-launch-h .eg { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.tr-launch-h .sub { font-size: 0.85rem; color: var(--muted); }
.tr-launch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .tr-launch { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tr-launch { grid-template-columns: 1fr; } }
.tr-launch-card { display: flex; align-items: flex-start; gap: 12px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 15px; cursor: pointer; transition: all 0.16s var(--ease); box-shadow: var(--shadow-sm); }
.tr-launch-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(20,30,55,0.45); }
.tr-launch-card .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.tr-launch-card .ic svg { width: 19px; height: 19px; }
.tr-launch-card .tx { flex: 1; min-width: 0; }
.tr-launch-card .t { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 0.92rem; }
.tr-launch-card .t .ct { font-family: var(--font-mono); font-weight: 500; font-size: 0.66rem; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 1px 7px; }
.tr-launch-card .d { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.tr-launch-card .go { flex-shrink: 0; color: var(--muted-2); align-self: center; transition: transform 0.16s, color 0.16s; }
.tr-launch-card .go svg { width: 17px; height: 17px; }
.tr-launch-card:hover .go { color: var(--primary); transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .tr-prog-bar i, .tr-cprog .barwrap i, .tr-hero .barwrap i, .tr-ring, .tr-ach-track i, .tr-skill-track i, .tr-bars .bar, .tr-donut { transition: none !important; }
  .tr-pill, .tr-launch-card, .tr-launch-card .go { transition: none !important; }
}

/* ============================================================
   Admin · User activity profile
   ============================================================ */
.tr-trow[data-user], .uc-onboard-row[data-user] { cursor: pointer; transition: background 0.14s; }
.tr-trow[data-user]:hover, .uc-onboard-row[data-user]:hover { background: var(--primary-soft); }
.tr-trow[data-user] { border-radius: 8px; }

.tr-av.lg { width: 52px; height: 52px; font-size: 1.05rem; border-radius: 14px; }
.tr-user-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tr-user-head .uh-id { display: flex; align-items: center; gap: 14px; }
.tr-user-head h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); letter-spacing: -0.02em; }
.tr-user-head .uh-role { font-size: 0.85rem; color: var(--muted); margin-top: 3px; }
.tr-user-head .uh-actions { display: flex; gap: 8px; }

.uc-details { padding: 18px; margin-bottom: 8px; }
.uc-d-top { display: flex; flex-wrap: wrap; gap: 28px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.uc-d-id { display: flex; flex-direction: column; gap: 3px; }
.uc-d-id .lbl { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.uc-d-id .val { font-weight: 700; color: var(--ink); font-size: 0.92rem; }

.tr-user-ach { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 900px) { .tr-user-ach { grid-template-columns: 1fr; } }
.uc-core, .uc-badges { padding: 18px; }
.uc-core-h { font-weight: 800; color: var(--ink); font-size: 0.95rem; margin-bottom: 13px; }
.uc-level { margin-bottom: 16px; }
.uc-level-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.uc-level-top .lv { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.uc-level-top .xp { font-family: var(--font-mono); font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.uc-level-meta { font-size: 0.76rem; color: var(--muted); margin-top: 7px; }
.uc-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uc-mini-grid .tr-stat { padding: 13px; }
.uc-mini-grid .tr-stat .v { font-size: 1.3rem; margin-top: 4px; }

.uc-badge-list { display: flex; flex-direction: column; gap: 9px; max-height: 268px; overflow-y: auto; }
.uc-badge { display: flex; align-items: center; gap: 11px; }
.uc-badge .ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.uc-badge .ic svg { width: 17px; height: 17px; }
.uc-badge .bn { font-weight: 700; color: var(--ink); font-size: 0.86rem; }
.uc-badge .bd { font-size: 0.72rem; color: var(--ok); font-weight: 600; }

.tr-ucards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
@media (max-width: 1080px) { .tr-ucards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .tr-ucards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tr-ucards { grid-template-columns: 1fr; } }
.tr-ucard { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.tr-ucard .uc-thumb { position: relative; height: 72px; }
.tr-ucard .uc-thumb .cat-ic { position: absolute; left: 12px; bottom: -14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm); }
.tr-ucard .uc-thumb .cat-ic svg { width: 16px; height: 16px; }
.tr-ucard .uc-lvl { position: absolute; right: 10px; top: 10px; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; background: rgba(255,255,255,0.85); border-radius: 999px; padding: 2px 9px; color: var(--ink); }
.tr-ucard .uc-b { padding: 20px 14px 14px; }
.tr-ucard .uc-t { font-weight: 800; color: var(--ink); font-size: 0.88rem; line-height: 1.3; }
.tr-ucard .uc-by { font-size: 0.76rem; color: var(--muted); margin-top: 3px; margin-bottom: 11px; }

.tr-user-act { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .tr-user-act { grid-template-columns: 1fr; } }
.tr-user-act .tr-card { padding: 16px 18px; }
.uc-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.uc-feed li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.84rem; color: var(--body); line-height: 1.45; }
.uc-feed li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--primary); }

.uc-empty { border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2); padding: 22px; text-align: center; font-size: 0.84rem; color: var(--muted); }
