/* Модуль «Тренеры»: карта пути к тренеру (3 дорожки × 7 станций), экран станции, кошелёк тренера и фишки.
   Разметка — resources/views/site/modules/trainers.blade.php, сценарий — trainers.js */
.tr, .trf {
    --l-client: #3f66e0; --l-client-bg: #edf3ff;
    --l-trainer: #7a55d8; --l-trainer-bg: #f7f0ff;
    --l-club: #1f8a5a; --l-club-bg: #eaf7f0;
    --tr-ease: cubic-bezier(.2, .7, .2, 1);
    --tr-pop: cubic-bezier(.3, 1.6, .5, 1);
}
.tr-head { max-width: 760px; }
.tr-head .lead { margin-top: 18px; }

/* Монограммы: пастельные градиенты вместо фото */
.tr-mono { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 13.5px; font-weight: 650; letter-spacing: .02em; background: linear-gradient(150deg, var(--g1), var(--g2)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.tr-mono-sm { width: 30px; height: 30px; font-size: 11px; }
.tr-mono-xs { width: 20px; height: 20px; font-size: 9px; }
.tr-mono[data-h='sky'] { --g1: #5b7ff0; --g2: #b2c4fa; }
.tr-mono[data-h='sun'] { --g1: #ec9a4c; --g2: #f8d59a; }
.tr-mono[data-h='mint'] { --g1: #37a873; --g2: #a9e3c4; }
.tr-mono[data-h='rose'] { --g1: #df6688; --g2: #f6bccb; }
.tr-mono[data-h='lilac'] { --g1: #8a69df; --g2: #d0c2f7; }
.tr-pro { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: linear-gradient(135deg, #2f5bd8, #7a55d8); color: #fff; font-size: 10px; font-weight: 700; font-style: normal; letter-spacing: .04em; vertical-align: 2px; white-space: nowrap; }

/* ── Доска: карта + сцена ── */
.tr-board { margin-top: 44px; border: 1px solid var(--line-card); border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 30px 80px rgba(20, 20, 19, .08); }

.tr-map { --mx0: 0%; --mxw: 100%; position: relative; aspect-ratio: 1200 / 300; border-bottom: 1px solid var(--line); user-select: none; }
.tr-svg { position: absolute; top: 0; left: var(--mx0); width: var(--mxw); height: 100%; display: block; }
.tr-lane[data-lane='client'] { fill: var(--l-client-bg); }
.tr-lane[data-lane='trainer'] { fill: var(--l-trainer-bg); }
.tr-lane[data-lane='club'] { fill: var(--l-club-bg); }
.tr-lane-line { stroke: rgba(20, 20, 19, .07); stroke-width: 1; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.tr-seg-bg { fill: none; stroke: #dcdcd7; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tr-seg { fill: none; stroke: url(#trRoute); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--tr-ease); }
.tr-seg.is-on { stroke-dashoffset: 0; }
.tr-link { stroke: #c9c9c3; stroke-width: 2; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .4s; }
.tr-link.is-on { opacity: 1; }

.tr-lane-lb { position: absolute; left: 22px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 20, 19, .06), 0 0 0 1px rgba(20, 20, 19, .05); }
.tr-lane-lb[data-lane='client'] { color: var(--l-client); }
.tr-lane-lb[data-lane='trainer'] { color: var(--l-trainer); }
.tr-lane-lb[data-lane='club'] { color: var(--l-club); }
.tr-lane-lb span { color: var(--ink); }

.tr-node { position: absolute; transform: translate(-50%, -50%); width: 52px; height: 52px; display: grid; place-items: center; z-index: 2; border-radius: 50%; }
.tr-node-c { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ph); border: 2px solid #e2e2de; transition: background .35s, color .35s, border-color .35s, transform .35s var(--tr-pop), box-shadow .35s; }
.tr-node[data-lane='client'] { --k: var(--l-client); --k-bg: var(--l-client-bg); }
.tr-node[data-lane='trainer'] { --k: var(--l-trainer); --k-bg: var(--l-trainer-bg); }
.tr-node[data-lane='club'] { --k: var(--l-club); --k-bg: var(--l-club-bg); }
.tr-node.is-done .tr-node-c { color: var(--k); border-color: var(--k); }
.tr-node.is-on .tr-node-c { background: var(--k); color: #fff; border-color: var(--k); transform: scale(1.14); box-shadow: 0 0 0 7px color-mix(in srgb, var(--k) 16%, transparent), 0 8px 22px color-mix(in srgb, var(--k) 35%, transparent); }
.tr-node.is-on::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--k); animation: tr-ring 1.8s infinite; pointer-events: none; }
@keyframes tr-ring { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
.tr-node:hover .tr-node-c { border-color: var(--k); color: var(--k); }
.tr-node.is-on:hover .tr-node-c { color: #fff; }
.tr-node-n { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 650; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.tr-node-lb { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--muted); transition: color .3s; }
.tr-node.is-done .tr-node-lb, .tr-node.is-on .tr-node-lb { color: var(--ink); }
.tr-node[data-lane='club'] .tr-node-lb { top: auto; bottom: 100%; margin: 0 0 6px; }

.tr-sub { position: absolute; transform: translate(-50%, -50%) scale(.3); z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px dashed #c9c9c3; color: var(--muted); opacity: 0; transition: transform .45s var(--tr-pop), opacity .3s, color .3s, border-color .3s; }
.tr-sub.is-on { transform: translate(-50%, -50%); opacity: 1; }
.tr-sub[data-lane='trainer'] { color: var(--l-trainer); border-color: color-mix(in srgb, var(--l-trainer) 45%, #fff); }
.tr-sub[data-lane='club'] { color: var(--l-club); border-color: color-mix(in srgb, var(--l-club) 45%, #fff); }
.tr-sub.is-hit { animation: tr-hit .6s var(--tr-pop); }
@keyframes tr-hit { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.45); background: #fff6dd; } 100% { transform: translate(-50%, -50%) scale(1); } }

.tr-coin { position: absolute; z-index: 3; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffe7a3, #e9a93a); color: #6b4300; font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(201, 135, 20, .45); opacity: 0; pointer-events: none; }
.tr-coin.is-fly { opacity: 1; }

/* ── Сцена: подпись, экран, кошелёк ── */
.tr-stage { display: grid; grid-template-columns: minmax(0, 1fr) 420px 290px; gap: 28px; padding: 28px; align-items: start; background: linear-gradient(180deg, #fafaf9, #fff 70%); }
.tr-cap { display: flex; flex-direction: column; min-width: 0; align-self: stretch; }
.tr-cap-n { font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.tr-cap-n b { color: var(--accent); }
.tr-cap-t { display: grid; margin-top: 10px; }
.tr-cap-i { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--tr-ease); pointer-events: none; }
.tr-cap-i.is-on { opacity: 1; transform: none; pointer-events: auto; }
.tr-cap-i h3 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.tr-cap-i p { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.tr-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tr-hint { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--faint); }
.tr-prog { margin-top: auto; height: 3px; border-radius: 3px; background: var(--row); overflow: hidden; }
.tr-prog i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #6f8ff0, #9b7be6, #3fae7a); transform-origin: 0 50%; transform: scaleX(1); }

.tr-screen { position: relative; height: 430px; border-radius: 18px; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 18px 40px rgba(20, 20, 19, .07); overflow: hidden; font-size: 13px; }
.trs { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .35s, transform .5s var(--tr-ease), visibility 0s .5s; }
.tr-board[data-step='0'] [data-scr='0'], .tr-board[data-step='1'] [data-scr='1'], .tr-board[data-step='2'] [data-scr='2'],
.tr-board[data-step='3'] [data-scr='3'], .tr-board[data-step='4'] [data-scr='4'], .tr-board[data-step='5'] [data-scr='5'],
.tr-board[data-step='6'] [data-scr='6'] { opacity: 1; visibility: visible; transform: none; transition: opacity .35s .1s, transform .5s .1s var(--tr-ease), visibility 0s; }

.trs-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.trs-top b { font-size: 15px; font-weight: 600; }
.trs-top span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.trs-sub { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.trs-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; color: var(--muted); font-size: 12px; }
.trs-who { display: flex; align-items: center; gap: 10px; }
.trs-who b { font-size: 15px; font-weight: 600; }
.trs-btn { position: relative; display: grid; height: 42px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; transition: background .35s, transform .12s; }
.trs-btn > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 7px; transition: transform .4s var(--tr-ease), opacity .3s; }
.trs-btn > span:last-child { transform: translateY(100%); opacity: 0; }
.trs-btn.is-press { transform: scale(.96); }

/* 1. Каталог */
.trs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.trs-chips span { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; display: inline-flex; align-items: center; }
.trs-chips span[aria-current] { background: var(--ink); color: #fff; }
.trs-list { position: relative; height: 258px; }
.trs-tr { position: absolute; left: 0; right: 0; top: calc(var(--p) * 86px); height: 78px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-card); background: #fff; transition: top .7s var(--tr-ease), border-color .4s, box-shadow .4s; }
.trs-tr.is-pro { border-color: #c9d6fb; box-shadow: 0 6px 18px rgba(47, 91, 216, .10); }
.trs-tr-t { min-width: 0; flex: 1; }
.trs-tr-t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trs-dirs { display: flex; gap: 4px; margin-top: 4px; flex-wrap: nowrap; overflow: hidden; }
.trs-dirs i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--chip); color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.trs-tr-t small { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.trs-tr-t small .i { color: #e3a21a; fill: #f4c34d; }
.trs-price { text-align: right; flex: none; position: relative; }
.trs-old { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.trs-price s { color: var(--ph); font-size: 11.5px; }
.trs-price b { display: block; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.trs-price small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.trs-off { font-style: normal; height: 17px; padding: 0 5px; border-radius: 5px; background: #e45d5d; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; transform: scale(0); transition: transform .45s var(--tr-pop); }
.trs-cat .trs-price s { visibility: hidden; }
.trs-cat.is-disc .trs-off { transform: none; }
.trs-cat.is-disc .trs-price s { visibility: visible; }

/* 2. Пробная */
.trs-gift { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #eef3ff, #f6f0ff); }
.trs-gift-ico { width: 38px; height: 38px; flex: none; border-radius: 11px; background: #fff; color: var(--l-client); display: grid; place-items: center; }
.trs-gift div { flex: 1; min-width: 0; }
.trs-gift b { display: block; font-size: 14px; font-weight: 600; }
.trs-gift small { display: block; color: var(--muted); font-size: 12px; }
.trs-gift em { font-style: normal; font-weight: 700; color: var(--ok); font-size: 13px; }
.trs-slots { display: flex; gap: 6px; }
.trs-slots span { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--line-card); display: grid; place-items: center; font-weight: 500; transition: background .3s, color .3s, border-color .3s, transform .3s var(--tr-pop); }
.trs-trial.is-pick [data-pick] { background: var(--l-client); color: #fff; border-color: var(--l-client); transform: scale(1.04); }
.trs-trial.is-booked .trs-btn, .trs-pkg.is-paid .trs-btn, .trs-rev.is-done .trs-btn { background: var(--ok); }
.trs-trial.is-booked .trs-btn > span:first-child, .trs-pkg.is-paid .trs-btn > span:first-child, .trs-rev.is-done .trs-btn > span:first-child { transform: translateY(-100%); opacity: 0; }
.trs-trial.is-booked .trs-btn > span:last-child, .trs-pkg.is-paid .trs-btn > span:last-child, .trs-rev.is-done .trs-btn > span:last-child { transform: none; opacity: 1; }
.trs-chat { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--panel); opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s var(--tr-ease); }
.trs-trial.is-chat .trs-chat { opacity: 1; transform: none; }
.trs-chat-h { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.trs-plaque { align-self: center; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line-card); font-size: 11.5px; color: var(--ink-2); }
.trs-msg { align-self: flex-start; max-width: 92%; padding: 7px 10px; border-radius: 12px 12px 12px 4px; background: #fff; font-size: 12.5px; line-height: 1.4; }

/* 3. Пакет */
.trs-pk { display: flex; align-items: center; gap: 11px; }
.trs-pk-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; background: linear-gradient(135deg, #e9efff, #efe8ff); color: var(--l-client); display: grid; place-items: center; }
.trs-pk b { display: block; font-size: 15px; font-weight: 600; }
.trs-pk small { display: block; color: var(--muted); font-size: 12px; }
.trs-pk-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.trs-pk-price s { color: var(--ph); font-size: 14px; }
.trs-pk-price b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.trs-pk-price small { color: var(--muted); font-size: 12px; }
.trs-pkg:not(.is-disc) .trs-pk-price s { opacity: 0; }
.trs-pk-disc { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: #fdeeee; color: #c24141; font-weight: 600; font-size: 12px; transform: scale(0); transform-origin: 0 50%; transition: transform .45s var(--tr-pop); }
.trs-pkg.is-disc .trs-pk-disc { transform: none; }
.trs-opts { display: flex; flex-direction: column; gap: 6px; }
.trs-opts li { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-card); }
.trs-opts li > span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.trs-opts li[data-k='1'] > span { background: var(--chip); color: var(--muted); }
.trs-opts em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.trs-opts li[data-k='0'] em { color: var(--ok); font-weight: 600; }
.trs-ledger { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: var(--l-club-bg); color: var(--l-club); opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--tr-ease); }
.trs-pkg.is-ledger .trs-ledger { opacity: 1; transform: none; }
.trs-ledger > span { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.trs-ledger p { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); }
.trs-ledger b { font-weight: 500; }
.trs-ledger em { font-style: normal; font-weight: 650; color: var(--l-club); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 4. Явка */
.trs-rows { display: flex; flex-direction: column; gap: 8px; }
.trs-rows li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-card); transition: background .35s, border-color .35s; }
.trs-rows li.is-past { background: var(--warn-soft); border-color: #eedcb5; }
.trs-rows li.is-past.is-done { background: #fff; border-color: var(--line-card); }
.trs-rows time { width: 70px; flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trs-rows li > div { flex: 1; min-width: 0; }
.trs-rows b { display: block; font-weight: 600; }
.trs-rows small { display: block; color: var(--muted); font-size: 11.5px; }
.trs-mark { display: grid; flex: none; }
.trs-mark i { grid-area: 1 / 1; font-style: normal; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; transition: opacity .3s, transform .4s var(--tr-pop); }
.trs-open { background: var(--ink); color: #fff; }
.is-past .trs-open { background: #b77a12; }
.trs-res { opacity: 0; transform: scale(.5); background: var(--ok-soft); color: var(--ok); }
[data-res='out'] .trs-res { background: var(--bad-soft); color: var(--bad); }
.trs-rows li.is-done .trs-open { opacity: 0; transform: scale(.5); }
.trs-rows li.is-done .trs-res { opacity: 1; transform: none; }
.trs-rows li.is-press .trs-open { transform: scale(.9); }
.trs-left { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: auto; padding: 10px 12px; border-radius: 12px; background: var(--panel); color: var(--ink-2); font-size: 12.5px; }
.trs-dots { display: inline-flex; gap: 3px; margin-left: auto; }
.trs-dots i { width: 9px; height: 9px; border-radius: 3px; background: var(--l-client); transition: background .4s; }
.trs-dots i.is-used { background: #d5d5d0; }

/* 5. Отзыв */
.trs-stars { display: flex; gap: 6px; }
.trs-stars i { color: #d9d9d4; transition: color .2s, transform .35s var(--tr-pop); }
.trs-stars i.is-on { color: #f0b429; transform: scale(1.08); }
.trs-stars i.is-on .i { fill: #f7c948; }
.trs-text { min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-card); background: var(--hover-soft); line-height: 1.45; }
.trs-text.is-typing::after { content: ''; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--ink); animation: tr-caret 1s steps(2) infinite; }
@keyframes tr-caret { 50% { opacity: 0; } }
.trs-sum { display: flex; gap: 16px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); }
.trs-sum-big { flex: none; text-align: center; }
.trs-sum-big b { display: block; font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.trs-sum-big small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.trs-sum-big span { display: inline-block; margin-top: 2px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 5px; }
.trs-sum ul { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.trs-sum li { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.trs-sum li i { flex: 1; height: 6px; border-radius: 3px; background: #e7e7e2; position: relative; overflow: hidden; }
.trs-sum li i::after { content: ''; position: absolute; inset: 0; width: var(--v); border-radius: 3px; background: #f0b429; }

/* 6. Аренда */
.trs-dl { margin: 0; }
.trs-dl div { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--row); }
.trs-dl dt { color: var(--muted); }
.trs-dl dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.trs-dl .trs-total { border-bottom: 0; }
.trs-dl .trs-total dt { color: var(--ink); font-weight: 600; }
.trs-dl .trs-total dd { font-size: 20px; font-weight: 650; }
.trs-server { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trs-pay { display: flex; gap: 6px; }
.trs-pay span { flex: 1; height: 40px; border-radius: 11px; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; white-space: nowrap; transition: background .3s, color .3s, transform .12s; }
.trs-rent.is-paid .trs-pay .is-sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.trs-pay span.is-press { transform: scale(.95); }
.trs-checks { display: flex; flex-direction: column; gap: 6px; }
.trs-checks li { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.trs-checks li .i { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--chip); color: transparent; transition: background .3s, color .3s; }
.trs-checks li.is-on { color: var(--ink); }
.trs-checks li.is-on .i { background: var(--ok); color: #fff; }
.trs-gate { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 12px; border-radius: 12px; background: var(--chip); color: var(--muted); font-weight: 600; transition: background .4s, color .4s; }
.trs-gate > span { display: grid; }
.trs-gate .i { grid-area: 1 / 1; transition: opacity .3s, transform .4s var(--tr-pop); }
.trs-gate .i:last-child { opacity: 0; transform: scale(.4); }
.trs-rent.is-gate .trs-gate { background: var(--ok-soft); color: var(--ok); }
.trs-rent.is-gate .trs-gate .i:first-child { opacity: 0; transform: scale(.4); }
.trs-rent.is-gate .trs-gate .i:last-child { opacity: 1; transform: none; }

/* 7. Отчёт */
.trs-money { display: flex; flex-direction: column; gap: 10px; }
.trs-money div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.trs-money small { color: var(--muted); }
.trs-money b { font-weight: 650; font-variant-numeric: tabular-nums; }
.trs-money i, .trs-ret i { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--row); position: relative; overflow: hidden; }
.trs-money i::after, .trs-ret i::after { content: ''; position: absolute; inset: 0; width: var(--v); border-radius: 5px; background: linear-gradient(90deg, #3fae7a, #7fd3a6); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s var(--tr-ease); }
.trs-money .is-grey i::after, .trs-ret .is-grey i::after { background: #c9c9c3; }
.trs-rep.is-on i::after { transform: none; }
.trs-payback { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #edf8f2, #eef3ff); }
.trs-payback small { color: var(--ink-2); font-weight: 500; }
.trs-payback b { font-size: 24px; font-weight: 700; color: var(--l-club); letter-spacing: -.02em; }
.trs-ret { display: flex; flex-direction: column; gap: 8px; }
.trs-ret div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.trs-ret span { color: var(--ink-2); }
.trs-ret b { grid-row: 1; grid-column: 2; font-weight: 650; }
.trs-ret i::after { background: linear-gradient(90deg, #6f8ff0, #9b7be6); }

/* Кошелёк тренера */
.tr-wallet { border-radius: 18px; padding: 16px; background: linear-gradient(160deg, #f4f6ff, #f8f3ff 55%, #eff9f4); border: 1px solid var(--line-card); display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.tr-w-head { display: flex; align-items: center; gap: 10px; }
.tr-w-head b { font-size: 14px; font-weight: 600; }
.tr-w-income { padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, .04); }
.tr-w-income small { display: block; color: var(--muted); }
.tr-w-income b { display: block; margin-top: 2px; font-size: 28px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; border-radius: 6px; }
.tr-w-led { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; color: var(--l-club); }
.tr-w-rows { margin: 0; padding: 4px 14px; border-radius: 14px; background: #fff; }
.tr-w-rows div { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--row); }
.tr-w-rows div:last-child { border-bottom: 0; }
.tr-w-rows dt { color: var(--muted); }
.tr-w-rows dd { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 5px; }
.tr-w-rows dd .i { color: #f0b429; fill: #f7c948; }
.tr-w-state { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); transition: background .45s, color .45s; }
.tr-w-state > span { width: 32px; height: 32px; flex: none; border-radius: 10px; background: #fff; display: grid; place-items: center; }
.tr-w-state > span .i { grid-area: 1 / 1; transition: opacity .3s, transform .4s var(--tr-pop); }
[data-tr-pass] > span .i:last-child { opacity: 0; transform: scale(.4); }
.tr-w-state small { display: block; color: var(--ink-2); font-size: 11.5px; }
.tr-w-state b { display: block; font-weight: 600; }
.tr-w-state.is-ok { background: var(--ok-soft); color: var(--ok); }
[data-tr-pass].is-ok > span .i:first-child { opacity: 0; transform: scale(.4); }
[data-tr-pass].is-ok > span .i:last-child { opacity: 1; transform: none; }
.tr-w-state.is-new { animation: tr-pop .6s var(--tr-pop); }
@keyframes tr-pop { 0% { transform: scale(.94); } 100% { transform: none; } }
.is-flash { animation: tr-flash 1.1s; }
@keyframes tr-flash { 0% { background: #fff1c4; } 100% { background: transparent; } }

/* ── Фишки ── */
.trf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.trf-card { border: 1px solid var(--line-card); border-radius: 20px; padding: 10px 10px 22px; background: #fff; display: flex; flex-direction: column; }
.trf-card[data-h='sky'] { --a: #3f66e0; --t1: #e8eeff; --t2: #f3efff; }
.trf-card[data-h='sun'] { --a: #c47a1c; --t1: #fff1dc; --t2: #fdeef1; }
.trf-card[data-h='lilac'] { --a: #7a55d8; --t1: #f0eaff; --t2: #e9f0ff; }
.trf-card[data-h='mint'] { --a: #1f8a5a; --t1: #e3f6ec; --t2: #eef6ff; }
.trf-card[data-h='rose'] { --a: #c94b70; --t1: #fde9ef; --t2: #f4eeff; }
.trf-vis { position: relative; height: 210px; border-radius: 14px; padding: 16px; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, var(--t1), transparent 70%), radial-gradient(110% 90% at 100% 100%, var(--t2), transparent 70%), #fbfbfa; display: flex; flex-direction: column; justify-content: center; gap: 10px; font-size: 12.5px; }
.trf-card h3 { margin: 18px 12px 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.trf-card > p { margin: 8px 12px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* Направления */
.trf-dirs { display: flex; flex-wrap: wrap; gap: 8px; }
.trf-dir { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--ink-2); font-weight: 500; box-shadow: 0 1px 2px rgba(20, 20, 19, .06); transition: background .3s, color .3s, box-shadow .3s; }
.trf-dir em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, .25); }
.trf-dir[data-k='0'] { background: var(--a); color: #fff; }
.trf-dir[data-k='1'], .trf-dir[data-k='2'] { color: var(--a); box-shadow: 0 0 0 1.5px var(--a); }
.trf-dir.is-no { animation: tr-shake .5s; color: var(--bad); box-shadow: 0 0 0 1.5px var(--bad); }
@keyframes tr-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.trf-limit { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; opacity: .8; transition: color .3s; }
.trf-limit.is-on { color: var(--bad); opacity: 1; }

/* Скидки */
.trf-rules { display: flex; flex-direction: column; gap: 7px; }
.trf-rules li { position: relative; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, .06); transition: opacity .35s, transform .4s var(--tr-ease), box-shadow .35s; }
.trf-rules li > span { color: var(--a); display: grid; }
.trf-rules b { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trf-rules em { font-style: normal; font-weight: 650; font-variant-numeric: tabular-nums; }
.trf-rules li > i { position: absolute; right: 10px; top: -9px; font-style: normal; height: 18px; padding: 0 7px; border-radius: 6px; background: var(--ok); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; opacity: 0; transform: scale(.5); transition: opacity .3s, transform .4s var(--tr-pop); }
.trf-rules li:not(.is-win) { opacity: .5; }
.trf-rules li:not(.is-win) em { text-decoration: line-through; }
.trf-rules li.is-win { box-shadow: 0 0 0 1.5px var(--ok), 0 8px 18px rgba(31, 122, 69, .14); transform: scale(1.03); }
.trf-rules li.is-win > i { opacity: 1; transform: none; }
.trf-rules.is-scan li { opacity: 1; }
.trf-rules.is-scan li em { text-decoration: none; }

/* PRO */
.trf-pro { position: relative; height: 150px; }
.trf-pro li { position: absolute; left: 0; right: 0; top: calc(var(--p) * 50px); height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, .06); transition: top .7s var(--tr-ease), box-shadow .4s; }
.trf-pro b { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trf-pro li.is-pro { box-shadow: 0 0 0 1.5px var(--a), 0 8px 18px rgba(122, 85, 216, .16); }
.trf-pro .tr-pro { transition: transform .35s var(--tr-pop); }
.trf-pro .tr-pro.is-new { animation: tr-badge .45s var(--tr-pop); }
@keyframes tr-badge { 0% { transform: scale(.4); } 100% { transform: none; } }

/* Месяц */
.trf-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.trf-cal b { font-size: 10px; font-weight: 600; color: var(--muted); text-align: center; }
.trf-cal i { height: 19px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, .06); transition: background .25s calc(var(--d) * 25ms); }
.trf-cal i.is-on { background: color-mix(in srgb, var(--a) 55%, #fff); box-shadow: none; }
.trf-cal i.is-on.is-off { background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, .06); }
.trf-cal.is-ok i.is-on:not(.is-off) { background: var(--a); }
.trf-approve { position: relative; display: grid; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; overflow: hidden; transition: background .35s; }
.trf-approve > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .4s var(--tr-ease), opacity .3s; }
.trf-approve > span:last-child { transform: translateY(100%); opacity: 0; }
.trf-approve.is-ok { background: var(--a); }
.trf-approve.is-ok > span:first-child { transform: translateY(-100%); opacity: 0; }
.trf-approve.is-ok > span:last-child { transform: none; opacity: 1; }

/* Копирование услуг */
.trf-copy { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.trf-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.trf-col p { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.trf-col > span { height: 26px; padding: 0 8px; border-radius: 8px; background: #fff; display: flex; align-items: center; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(20, 20, 19, .06); }
.trf-col.is-to > span { background: transparent; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, .12); color: transparent; transition: background .3s, color .3s, box-shadow .3s; transition-delay: calc(var(--d) * .18s); }
.trf-col.is-to > span.is-on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--a) 50%, #fff); }
.trf-arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--a); color: #fff; display: grid; place-items: center; }
.trf-arrow.is-go { animation: tr-pulse .6s var(--tr-pop); }
@keyframes tr-pulse { 50% { transform: scale(1.25); } }
.trf-copy-btn { align-self: center; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: #fff; font-size: 11.5px; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 20, 19, .08); }

/* Договор */
.trf-doc { position: relative; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(20, 20, 19, .07); }
.trf-doc-ico { float: right; width: 34px; height: 34px; border-radius: 10px; background: var(--t1); color: var(--a); display: grid; place-items: center; }
.trf-doc b { display: block; font-size: 14px; font-weight: 600; }
.trf-doc small { display: block; color: var(--muted); font-size: 11.5px; }
.trf-doc dl { margin: 10px 0 0; }
.trf-doc dl div { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--row); }
.trf-doc dt { color: var(--muted); }
.trf-doc dd { margin: 0; font-weight: 600; }
.trf-stamp { position: absolute; right: 12px; bottom: -10px; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 11.5px; transform: rotate(-5deg); }
.trf-stamp.is-new { animation: tr-stamp .55s var(--tr-pop); }
@keyframes tr-stamp { 0% { transform: rotate(-5deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-5deg); opacity: 1; } }

/* Воронка пробных */
.trf-fun { display: flex; flex-direction: column; gap: 7px; }
.trf-fun li { position: relative; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.trf-fun li i { position: absolute; inset: 0; width: var(--v); border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--a) 30%, #fff), color-mix(in srgb, var(--a) 14%, #fff)); transform-origin: 0 50%; transition: transform 1s var(--tr-ease); }
.trf-fun.is-zero li i { transform: scaleX(0); }
.trf-fun span, .trf-fun b { position: relative; }
.trf-fun b { font-weight: 650; font-variant-numeric: tabular-nums; }
.trf-conv { display: flex; align-items: baseline; gap: 6px; color: var(--muted); }
.trf-conv b { font-size: 22px; font-weight: 700; color: var(--a); letter-spacing: -.02em; }

/* Журнал проходов */
.trf-log { height: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.trf-log-in { display: flex; flex-direction: column; gap: 6px; animation: tr-scroll 14s linear infinite; }
@keyframes tr-scroll { to { transform: translateY(calc(-50% - 3px)); } }
.trf-log p { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; background: #fff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(20, 20, 19, .05); }
.trf-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
.trf-log p > span { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.trf-log p[data-s='no'] > span { background: var(--bad-soft); color: var(--bad); }

/* ── Адаптив ── */
@media (max-width: 1280px) {
    .tr-stage { grid-template-columns: minmax(0, 1fr) 400px; }
    .tr-wallet { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
    .tr-w-head { grid-column: 1 / -1; }
    .trf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .tr-lane-lb span { display: none; }
    .tr-lane-lb { padding: 0; width: 30px; justify-content: center; left: 14px; }
}
@media (max-width: 860px) {
    .tr-stage { grid-template-columns: minmax(0, 1fr); padding: 20px; }
    .tr-wallet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-cap-i h3 { font-size: 22px; }
}
@media (max-width: 640px) {
    .tr-map { aspect-ratio: auto; height: 240px; --mx0: -9.4%; --mxw: 107.3%; overflow: hidden; }
    .tr-lane-lb { display: none; }
    .tr-node { width: 36px; height: 36px; }
    .tr-node-c { width: 32px; height: 32px; border-width: 1.5px; }
    .tr-node.is-on .tr-node-c { transform: scale(1.08); box-shadow: 0 0 0 4px color-mix(in srgb, var(--k) 16%, transparent); }
    .tr-node-c .i { width: 15px; height: 15px; }
    .tr-node-n { min-width: 16px; height: 16px; font-size: 9.5px; top: -5px; right: -5px; }
    .tr-node-lb { display: none; }
    .tr-node.is-on .tr-node-lb { display: block; font-size: 11.5px; }
    .tr-sub { width: 22px; height: 22px; }
    .tr-sub .i { width: 11px; height: 11px; }
    .tr-stage { padding: 16px; gap: 18px; }
    .tr-screen { height: 440px; }
    .trs { padding: 14px; }
    .tr-wallet { grid-template-columns: minmax(0, 1fr); }
    .tr-hint { display: none; }
    .trf-grid { grid-template-columns: minmax(0, 1fr); }
    .trs-rows time { width: 54px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-node.is-on::before, .trf-log-in { animation: none; }
    .tr *, .trf * { transition: none !important; }
}
