/* Терминал: профиль, топ трейдеров, ИИ-наставник, чат ВИП, мультиграфик, реплей. */

/* ── общее ── */
.pfEmpty { margin: 18px 0; padding: 22px 16px; border: 1px dashed var(--cx-line); border-radius: 14px; text-align: center; font-size: 13px; font-weight: 600; color: var(--cx-dim); display: flex; flex-direction: column; gap: 6px; }
.pfEmpty b { color: var(--cx-txt); font-size: 14px; }
.pfNote { margin: 12px 2px 0; font-size: 11.5px; line-height: 1.5; font-weight: 600; color: var(--cx-dim); }
.pfNote a { color: var(--brand, #FFCB2E); }
.pfNote--risk { padding: 9px 11px; border-radius: 10px; background: rgba(244, 117, 111, 0.07); border: 1px solid rgba(244, 117, 111, 0.18); }

/* ── профиль ── */
.pfHead { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.pfAcc { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cx-dim); }
.pfAcc::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--violet, #9B87FF); }
.pfAcc--real::before { background: var(--cx-up); }
.pfSeg { display: flex; }
.pfSeg button { flex: 1; padding: 6px 4px; }
.pfEq { display: block; width: 100%; height: 120px; background: var(--cx-bg2); border-radius: 12px; }
.pfCards { margin-top: 8px; }
.pfDonut { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--cx-bg2); border-radius: 12px; padding: 10px; }
.pfDonut svg { width: 112px; height: 112px; }
.pfDonut__n { font: 800 18px 'JetBrains Mono', monospace; fill: var(--cx-txt); }
.pfDonut__l { font: 700 10px Manrope, sans-serif; fill: var(--cx-dim); }
.pfDonut ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pfDonut li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.pfDonut li i { width: 8px; height: 8px; border-radius: 2px; }
.pfDonut li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfDonut li b { font: 700 11.5px 'JetBrains Mono', monospace; color: var(--cx-dim); }
.pfBars { display: flex; flex-direction: column; gap: 6px; }
.pfBar { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px auto; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; background: var(--cx-bg2); border-radius: 10px; padding: 7px 10px; }
.pfBar__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfBar__t { position: relative; height: 16px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.pfBar__t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.pfBar__w { background: rgba(85, 223, 160, 0.55); }
.pfBar__l { background: rgba(244, 117, 111, 0.55); }
.pfBar__t em { position: relative; font: 700 10.5px 'JetBrains Mono', monospace; font-style: normal; padding-left: 5px; line-height: 16px; }
.pfBar--head { background: transparent; padding: 0 10px; font-size: 10.5px; color: var(--cx-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.pfBar--head span:last-child { text-align: right; min-width: 64px; }
.pfBar > b { font: 800 12px 'JetBrains Mono', monospace; text-align: right; min-width: 64px; }

/* ── топ трейдеров ── */
.tpCtl { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.tpList { display: flex; flex-direction: column; gap: 5px; }
.tpRow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--cx-bg2); border-radius: 12px; padding: 9px 11px; }
.tpRow.is-you { box-shadow: inset 0 0 0 1px rgba(255, 203, 46, 0.55); background: rgba(255, 203, 46, 0.06); }
.tpRow__r { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 12px 'JetBrains Mono', monospace; color: var(--cx-dim); background: rgba(255, 255, 255, 0.05); }
.tpRow.is-medal .tpRow__r { color: #0E1321; background: var(--md); box-shadow: 0 0 0 3px color-mix(in srgb, var(--md) 22%, transparent); }
.tpRow__n { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpRow__n b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpRow__n em { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-ink, #1A1400); background: var(--brand, #FFCB2E); border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.tpRow__n small { font-size: 11px; font-weight: 600; color: var(--cx-dim); }
.tpRow__p { font: 800 13px 'JetBrains Mono', monospace; white-space: nowrap; }
.tpSkel { display: flex; flex-direction: column; gap: 5px; }
.tpSkel i { display: block; height: 48px; border-radius: 12px; background: linear-gradient(90deg, var(--cx-bg2) 0%, #192237 50%, var(--cx-bg2) 100%); background-size: 200% 100%; animation: tpShim 1.2s linear infinite; }
@keyframes tpShim { to { background-position: -200% 0; } }

/* ── ИИ-наставник ── */
.tmPane.mtPane:not([hidden]) { display: flex; flex-direction: column; min-height: 0; padding-bottom: 10px; }
.mtLog { flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; scrollbar-width: thin; }
.mtMsg { max-width: 94%; border-radius: 14px; padding: 9px 12px; font-size: 13px; line-height: 1.45; font-weight: 600; }
.mtMsg p { margin: 0; }
.mtMsg--me { align-self: flex-end; background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); border-bottom-right-radius: 4px; font-weight: 700; }
.mtMsg--bot { align-self: flex-start; background: var(--cx-bg2); border: 1px solid var(--cx-line); border-bottom-left-radius: 4px; }
.mtMsg--err { border-color: rgba(244, 117, 111, 0.4); color: #FFB4AF; }
.mtMsg__t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.mtMsg__t b { font-size: 13px; }
.mtBias { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: var(--cx-dim); }
.mtBias--up { background: rgba(85, 223, 160, 0.14); color: var(--cx-up); }
.mtBias--down { background: rgba(244, 117, 111, 0.14); color: var(--cx-down); }
.mtBlk h4 { margin: 8px 0 3px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet, #9B87FF); }
.mtBlk ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.mtBlk li::marker { color: var(--brand, #FFCB2E); }
.mtRisk { margin: 9px 0 0 !important; padding-top: 7px; border-top: 1px solid var(--cx-line); font-size: 11px; font-weight: 600; color: var(--cx-dim); }
.mtDots { display: inline-flex; gap: 4px; padding: 3px 0; }
.mtDots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cx-dim); animation: mtDot 1s ease-in-out infinite; }
.mtDots i:nth-child(2) { animation-delay: 0.15s; }
.mtDots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes mtDot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.mtChips { flex: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 8px; }
.mtChips button { border: 1px solid var(--cx-line); background: var(--cx-bg2); color: var(--cx-txt); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.mtChips button:hover:not(:disabled) { border-color: rgba(255, 203, 46, 0.5); color: var(--brand, #FFCB2E); }
.mtChips button:disabled, .mtForm button:disabled { opacity: 0.5; }
.mtForm { flex: none; display: flex; gap: 6px; }
.mtForm input { flex: 1; min-width: 0; height: 40px; border-radius: 11px; border: 1px solid var(--cx-line); background: var(--cx-bg0); color: var(--cx-txt); padding: 0 12px; font: 600 13px Manrope, sans-serif; }
.mtForm input:focus { outline: none; border-color: rgba(255, 203, 46, 0.6); }
.mtForm button { flex: none; width: 40px; height: 40px; border: 0; border-radius: 11px; background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); display: grid; place-items: center; }
.mtForm button svg { width: 18px; height: 18px; }
.mtFoot { flex: none; margin: 8px 2px 0; font-size: 10.5px; font-weight: 600; color: var(--cx-dim); }

/* ── чат ВИП ── */
.vpHero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 14px 18px; margin: 4px 0 12px; border-radius: 16px; border: 1px solid rgba(255, 203, 46, 0.28); background: radial-gradient(120% 90% at 50% 0%, rgba(255, 203, 46, 0.16), transparent 70%), var(--cx-bg2); }
.vpHero__ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); margin-bottom: 8px; }
.vpHero__ic svg { width: 28px; height: 28px; }
.vpHero b { font-family: var(--f-display, 'Unbounded', sans-serif); font-size: 15px; font-weight: 600; }
.vpHero span { font-size: 12px; font-weight: 600; color: var(--cx-dim); }
.vpList { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.vpList li { position: relative; padding-left: 22px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.vpList li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 9px; height: 5px; border-left: 2px solid var(--brand, #FFCB2E); border-bottom: 2px solid var(--brand, #FFCB2E); transform: rotate(-45deg); }
.vpCta, .vpSec { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 13px; font-weight: 800; font-size: 14px; text-decoration: none; margin-top: 8px; }
.vpCta { background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); }
.vpCta:hover { filter: brightness(1.06); }
.vpSec { border: 1px solid var(--cx-line); color: var(--cx-txt); background: var(--cx-bg2); height: 40px; font-size: 13px; }
.vpSec:hover { border-color: rgba(255, 255, 255, 0.25); }

/* ── мультиграфик и реплей: слой поверх колонки графика ── */
.mcWrap { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--cx-bg0); border-radius: 16px; overflow: hidden; animation: tmFade 0.18s ease both; }
.mcWrap[hidden] { display: none; }
.mcBar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--cx-bg); border: 1px solid var(--cx-line); border-radius: 16px 16px 0 0; }
.mcBar__t { font-family: var(--f-display, 'Unbounded', sans-serif); font-weight: 600; font-size: 14px; white-space: nowrap; }
.mcBar__t span { font-family: Manrope, sans-serif; font-weight: 700; font-size: 13px; color: var(--cx-dim); }
.mcBar__hint { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--cx-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcX { flex: none; margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--cx-bg2); color: var(--cx-txt); font-size: 20px; line-height: 1; }
.mcX:hover { background: #1D263E; }
.mcGrid { flex: 1 1 auto; min-height: 0; display: grid; gap: 6px; padding-top: 6px; }
.mcGrid--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.mcGrid--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mcCell { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--cx-bg); border: 1px solid var(--cx-line); border-radius: 14px; overflow: hidden; transition: border-color 0.15s; }
.mcCell:hover { border-color: rgba(255, 203, 46, 0.35); }
.mcCell__head { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 6px 4px 8px; min-width: 0; }
.mcSel { position: relative; min-width: 96px; flex: 0 1 158px; }
.mcSel select { appearance: none; -webkit-appearance: none; width: 100%; height: 30px; border: 1px solid var(--cx-line); background: var(--cx-bg2); color: var(--cx-txt); border-radius: 9px; padding: 0 26px 0 10px; font: 800 12.5px Manrope, sans-serif; cursor: pointer; text-overflow: ellipsis; }
.mcSel::after { content: ''; position: absolute; right: 10px; top: 11px; width: 6px; height: 6px; border-right: 1.8px solid var(--cx-dim); border-bottom: 1.8px solid var(--cx-dim); transform: rotate(45deg); pointer-events: none; }
.mcSel select:focus { outline: none; border-color: rgba(255, 203, 46, 0.6); }
.mcSel option { background: #13192A; }
.mcPx { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 0 1 auto; overflow: hidden; white-space: nowrap; }
.mcPx b { font: 700 12.5px 'JetBrains Mono', monospace; }
.mcPx small { font: 700 11px 'JetBrains Mono', monospace; color: var(--cx-dim); }
@media (max-width: 1599px) { .mcPx small { display: none; } }
.mcTf { flex: none; margin-left: auto; display: flex; gap: 1px; background: var(--cx-bg2); border-radius: 9px; padding: 2px; }
.mcTf button { border: 0; background: transparent; color: var(--cx-dim); font: 700 11px Manrope, sans-serif; padding: 5px 7px; border-radius: 7px; }
.mcTf button:hover { color: var(--cx-txt); }
.mcTf button.is-on { background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); }
.mcMain { flex: none; width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--cx-dim); display: grid; place-items: center; }
.mcMain:hover { background: rgba(255, 203, 46, 0.14); color: var(--brand, #FFCB2E); }
.mcMain svg { width: 16px; height: 16px; }
.mcCell__chart { position: relative; flex: 1 1 auto; min-height: 0; cursor: pointer; }
.mcCell__state { position: absolute; left: 0; right: 0; top: 40px; bottom: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--cx-dim); pointer-events: none; }
.mcCell__state[hidden] { display: none; }

/* реплей */
.rpChart { position: relative; flex: 1 1 auto; min-height: 0; background: var(--cx-bg); border-left: 1px solid var(--cx-line); border-right: 1px solid var(--cx-line); }
.rpChart__in { position: absolute; inset: 0; }
.rpBet { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 3; padding: 8px 16px; border-radius: 12px; font-weight: 800; font-size: 14px; background: #1D263E; border: 1px solid var(--cx-line); animation: tmFade 0.15s ease both; }
.rpBet--win { color: var(--cx-up); border-color: rgba(85, 223, 160, 0.5); }
.rpBet--lose { color: var(--cx-down); border-color: rgba(244, 117, 111, 0.5); }
.rpCtl { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 9px 10px; background: var(--cx-bg); border: 1px solid var(--cx-line); border-radius: 0 0 16px 16px; }
.rpBtn { flex: none; width: 36px; height: 36px; border: 1px solid var(--cx-line); border-radius: 10px; background: var(--cx-bg2); color: var(--cx-txt); display: grid; place-items: center; }
.rpBtn svg { width: 17px; height: 17px; }
.rpBtn:hover { border-color: rgba(255, 255, 255, 0.25); }
.rpBtn--play { background: var(--brand, #FFCB2E); color: var(--brand-ink, #1A1400); border-color: transparent; }
.rpRange { flex: 1 1 160px; min-width: 120px; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 3px; background: linear-gradient(90deg, var(--brand, #FFCB2E) var(--p, 0%), rgba(255, 255, 255, 0.1) var(--p, 0%)); cursor: pointer; }
.rpRange::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand, #FFCB2E); }
.rpRange::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand, #FFCB2E); }
.rpPos { flex: none; font: 700 12px 'JetBrains Mono', monospace; color: var(--cx-dim); min-width: 120px; }
.rpGuess { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.rpGuess > span { font-size: 12px; font-weight: 700; color: var(--cx-dim); white-space: nowrap; }
.rpG { border: 0; height: 34px; padding: 0 12px; border-radius: 10px; font-weight: 800; font-size: 13px; color: #0B0E19; white-space: nowrap; }
.rpG--up { background: var(--cx-up); }
.rpG--down { background: var(--cx-down); }
.rpG:disabled { opacity: 0.4; }
.rpG.is-picked { opacity: 1; box-shadow: 0 0 0 2px #fff inset; }
.rpScore { font: 800 12.5px 'JetBrains Mono', monospace; white-space: nowrap; }

@media (max-width: 1180px) {
  .mcBar__hint { display: none; }
}
/* На невысоком экране пунктов справа больше, чем помещается: ужимаем их,
   чтобы до «Мультиграфика» и «Реплея» не приходилось листать. */
@media (min-width: 900px) and (max-height: 1000px) {
  .tmRail > button, .tmRail > .tmRail__a { min-height: 42px; padding: 4px 2px 3px; gap: 2px; }
  .tmRail > button svg, .tmRail > .tmRail__a svg { width: 19px; height: 19px; }
  .tmRail__sep { margin: 2px 0; }
}
@media (max-width: 899px) {
  .mcWrap { position: fixed; inset: 0; z-index: 150; border-radius: 0; padding: 0 0 env(safe-area-inset-bottom, 0px); }
  .mcBar { border-radius: 0; border-width: 0 0 1px; padding: 10px 10px 10px 14px; }
  .mcGrid { overflow-y: auto; padding: 6px; }
  .mcGrid--2, .mcGrid--4 { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: minmax(250px, 1fr); }
  .mcGrid--4 { grid-auto-rows: 260px; }
  .mcN button { padding: 6px 8px; }
  .mcPx { display: none; }
  .mcSel { flex: 1 1 auto; }
  .rpChart { border: 0; }
  .rpCtl { border-radius: 0; border-width: 1px 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .rpPos { min-width: 0; order: 5; }
  .rpRange { order: 4; flex-basis: 100%; }
  .rpSpeed { order: 6; margin-left: auto; }
  .rpGuess { order: 7; width: 100%; margin-left: 0; }
  .rpGuess .rpG { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tpSkel i, .mtDots i { animation: none; }
}
