/* Терминал: тема «ночной синий» и свои плашки PO.BOOST.
   Грузится последним и только переопределяет: без этого файла терминал выглядит как раньше.
   Спокойная тема: глубокий синий без свечений, приглушённое золото вместо яркого жёлтого.
   Углы везде обычные, скруглённые; активное — тонкой чертой, а не заливкой. */
html { background: #070A10; }
body.tm {
  --cx-bg: #0B1019; --cx-bg2: #0F1622; --cx-bg0: #070A10; --cx-line: rgba(150, 170, 200, 0.10);
  --cx-up: #3DB88A; --cx-down: #D9606B; --cx-txt: #DCE3EE; --cx-dim: #7D889B;
  --gold: #D6AD4E; --gold-soft: rgba(214, 173, 78, 0.14); --gold-line: rgba(214, 173, 78, 0.38);
  --pl-bg: #0F1622; --pl-line: rgba(150, 170, 200, 0.12); --pl-hover: rgba(214, 173, 78, 0.35);
  --pl-edge: inset 0 1px 0 rgba(190, 210, 240, 0.04);
  background: var(--cx-bg0);
}

/* ── шапка ── */
.tmTop { background: #0A0F18; border-bottom-color: var(--pl-line); }
.tmPairBtn, .tmTfBtn, .tmIndBtn, .tmUserBtn, .tmSetBtn, .tmBalBtn, .cxTf, .tmSwitch {
  background: var(--pl-bg); border-color: var(--pl-line); box-shadow: var(--pl-edge);
}
.tmPairBtn:hover, .tmTfBtn:hover, .tmIndBtn:hover, .tmUserBtn:hover, .tmSetBtn:hover, .tmBalBtn:hover {
  background: #131C2B; border-color: var(--pl-hover);
}
.tmSetBtn:hover { color: var(--gold); }
.tmPairBtn__pct { color: var(--cx-up); }

/* вкладки и быстрые ТФ: активное — тонкая черта снизу, без заливки */
.tmSwitch a.is-on { background: rgba(214, 173, 78, 0.12); color: #E9C978; box-shadow: inset 0 -2px 0 var(--gold); }
.cxTf button { position: relative; }
.cxTf button.is-on { background: transparent; color: #E9C978; }
.cxTf button.is-on::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold); }

.tmClock { color: #98A4B8; font-variant-numeric: tabular-nums; }

/* баланс */
.tmBalBtn { border: 1px solid var(--pl-line) !important; background: var(--pl-bg) !important; }
.tmBalBtn__lbl { color: #C9A85A !important; }
.tmBalBtn__ico { background: var(--gold-soft) !important; color: var(--gold) !important; border-color: var(--gold-line) !important; }
.tmCur { background: rgba(150, 170, 200, 0.10) !important; color: #9AA6BA !important; }

/* ── панель сделки ── */
.cxField__lbl { display: inline-flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; font-weight: 700; color: #6F7B8F; }
.cxTime, .cxAmt, .cxPay div { background: var(--pl-bg); border: 1px solid var(--pl-line); box-shadow: var(--pl-edge); }
.cxTime:hover, .cxAmt:hover { border-color: var(--pl-hover); }
.cxTime svg { color: var(--gold) !important; }
.cxAmt__cur { color: var(--gold) !important; }
.cxAmt__step { background: rgba(150, 170, 200, 0.08); }
.cxAmt__step:hover { background: var(--gold-soft); color: #E9C978; }
.cxNoSess { background: rgba(214, 173, 78, 0.06); border-color: rgba(214, 173, 78, 0.28) !important; }
.cxNoSess p { color: #D9BE7E !important; }
.cxNoSess button, .tmCta__btn { background: var(--gold) !important; color: #1A1406 !important; }

/* кнопки сделки: ровный цвет без свечения */
.cxTrade {
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important; font-weight: 800;
}
.cxTrade:hover { transform: none !important; filter: brightness(1.07); }
.cxTrade--buy { background: #2E9F76; color: #F1FBF7; }
.cxTrade--sell { background: #C2515D; color: #FFF3F4; }

/* блок сделки (выплата + кнопки одним стеком) */
.cxDeal .cxTrade { border-radius: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important; }
.cxDeal .cxTrade--buy { background-image: linear-gradient(180deg, #33A67C 0%, #2A9570 100%); color: #F1FBF7; }
.cxDeal .cxTrade--sell { background-image: linear-gradient(180deg, #C95764 0%, #B44857 100%); color: #FFF3F4; }
.cxDeal .cxTrade:not(:disabled):hover { filter: brightness(1.08); }

/* ── правый рельс и меню ── */
.tmRail button.is-on { background: var(--gold-soft); color: var(--gold); box-shadow: inset 2px 0 0 var(--gold); }
.tmDrop { background: #0E1520; border-color: var(--pl-line); box-shadow: 0 18px 40px rgba(2, 5, 10, 0.6); }

/* ссылка на библиотеку графиков в настройках (логотипа на графике нет) */
.stAttr { margin: 0; padding: 10px 18px 14px; font-size: 11px; color: var(--cx-dim); border-top: 1px solid var(--cx-line); }
.stAttr a { color: #9AA6BA; text-decoration: underline; text-underline-offset: 2px; }


/* ── фокус с клавиатуры: золотая обводка у кнопок шапки ── */
.tmTop button:focus-visible, .tmTop a:focus-visible, .tmTop input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* строка списка пар, выделенная стрелками */
.tmRow.is-active, .pbd-teaser.is-active { background: rgba(214, 173, 78, 0.12); box-shadow: inset 0 0 0 1px var(--gold-line); }
.tmRow:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* ── карточка профиля (аватарка в шапке) ── */
.tmDrop--user.upCard { width: 330px; max-width: calc(100vw - 16px); padding: 0; overflow: hidden; background: #0C121C; }
.upHead { display: flex; gap: 12px; align-items: center; padding: 16px 16px 14px;
  background: linear-gradient(160deg, rgba(214, 173, 78, 0.10), rgba(214, 173, 78, 0) 55%), #0E1622; border-bottom: 1px solid var(--pl-line); }
.upAva { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 800 19px Manrope, system-ui, sans-serif;
  color: #1A1406; background: var(--gold); box-shadow: 0 0 0 2px #0E1622, 0 0 0 3px var(--gold-line); }
.upWho { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.upName { font-size: 16px; font-weight: 800; color: var(--cx-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmDrop .upId { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 600 12px "JetBrains Mono", monospace; color: #9AA6BA; }
.tmDrop .upId:hover { color: var(--gold); background: none; }
.upId[hidden] { display: none; }
.upId svg { width: 13px; height: 13px; }
.upMail { font-size: 11.5px; color: var(--cx-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.upBal { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.upBal > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upBal__acc { white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #C9A85A; }
.upBal__sum { overflow: hidden; text-overflow: ellipsis; font: 800 20px "JetBrains Mono", monospace; color: var(--cx-txt); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tmDrop .upDep { flex: none; width: auto; justify-content: center; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; font-weight: 800; font-size: 13px;
  background: var(--gold); color: #1A1406; }
.tmDrop .upDep:hover { background: var(--gold); filter: brightness(1.08); }
.upDep svg { width: 14px; height: 14px; }
.upDep[hidden] { display: none; }

.upBox { margin: 0 12px 10px; border: 1px solid var(--pl-line); border-radius: 12px; background: var(--pl-bg); box-shadow: var(--pl-edge); overflow: hidden; }
.tmDrop .upRow { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; font-size: 13.5px; font-weight: 600; color: #C3CCDA; text-decoration: none; border-radius: 0; }
.upBox .upRow + .upRow { border-top: 1px solid rgba(150, 170, 200, 0.07); }
.tmDrop .upRow:hover { background: rgba(214, 173, 78, 0.07); color: var(--cx-txt); }
.upRow > svg { flex: none; width: 18px; height: 18px; color: #8592A8; }
.tmDrop .upRow:hover > svg { color: var(--gold); }
.upRow > span { flex: 1; text-align: left; }
.upRow[hidden] { display: none; }
.upChev { width: 11px !important; height: 8px !important; transition: transform 0.18s; }
.upRow--fold[aria-expanded="true"] .upChev { transform: rotate(180deg); }
.tmDrop .upOut { margin: 0 12px 12px; width: calc(100% - 24px); border: 1px solid var(--pl-line); border-radius: 12px; color: #D9868E; }
.tmDrop .upOut > svg { color: #D9606B; }
.tmDrop .upOut:hover { background: rgba(217, 96, 107, 0.08); color: #F0A3AA; }

.upStat { padding: 4px 12px 12px; border-top: 1px solid rgba(150, 170, 200, 0.07); }
.upStat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 6px; }
.upStat__acc { font-size: 13px; font-weight: 700; color: var(--cx-txt); }
.tmDrop .upStat__rf { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: #9AA6BA; border: 1px solid var(--pl-line); }
.tmDrop .upStat__rf:hover { color: var(--cx-txt); background: rgba(150, 170, 200, 0.06); }
.upStat__rf svg { width: 12px; height: 12px; }
.upStat__row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 13px; color: #8D99AE; }
.upStat__row b { font: 600 13px "JetBrains Mono", monospace; color: var(--cx-txt); }
.upStat__row i { font-style: normal; }
.upStat__note { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--cx-dim); }
.tmDrop .upStat__more { all: unset; cursor: pointer; box-sizing: border-box; display: block; width: 100%; margin-top: 10px; padding: 9px 0; text-align: center; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; color: #C9A85A; background: rgba(150, 170, 200, 0.05); border: 1px solid var(--pl-line); }
.tmDrop .upStat__more:hover { color: var(--gold); background: rgba(214, 173, 78, 0.07); }
.upStat__row .cxUp { color: var(--cx-up); }
.upStat__row .cxDown { color: var(--cx-down); }
.tmDrop .upRow:focus { outline: none; box-shadow: none; }
.tmDrop .upRow:focus-visible { outline: 2px solid var(--gold-line); outline-offset: -2px; }
