.prop-terminal-btn {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(61, 214, 140, 0.85));
  color: #fff;
}
.tvt-backdrop {
  --tvt-bg: #0a0b12;
  --tvt-panel: #10111b;
  --tvt-panel-2: #151726;
  --tvt-line: rgba(255, 255, 255, 0.07);
  --tvt-text: #e6e8f0;
  --tvt-muted: #8a8fa6;
  --tvt-accent: rgb(var(--accent-rgb, 139, 92, 246));
  --tvt-accent-soft: rgba(var(--accent-rgb, 139, 92, 246), 0.16);
  --tvt-buy: #26c281;
  --tvt-sell: #f0506e;
  position: fixed;
  inset: 0;
  z-index: 14000;
  background: rgba(3, 3, 8, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  color: var(--tvt-text);
  font-variant-numeric: tabular-nums;
}
body[data-theme="white"] .tvt-backdrop {
  --tvt-bg: #f6f7fb;
  --tvt-panel: #ffffff;
  --tvt-panel-2: #f1f3f9;
  --tvt-line: rgba(15, 23, 42, 0.08);
  --tvt-text: #0f172a;
  --tvt-muted: #64748b;
}
.tvt-backdrop.is-visible { opacity: 1; }
.tvt-backdrop.is-leaving { opacity: 0; }
.tvt {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 50px minmax(0, 1fr) 220px;
  background: var(--tvt-bg);
  overflow: hidden;
}
.tvt-desk {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
}
.tvt-desk-title { display: grid; gap: 2px; min-width: 180px; }
.tvt-desk-title strong { font-size: 16px; letter-spacing: -0.02em; }
.tvt-desk-title small { color: var(--tvt-muted); font-size: 11px; }
.tvt-kpis { display: flex; gap: 8px; flex: 1; min-width: 0; }
.tvt-kpi {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--tvt-line);
  border-radius: 14px;
  background: var(--tvt-panel-2);
}
.tvt-kpi span, .tvt-kpi em { color: var(--tvt-muted); font-size: 11px; font-style: normal; }
.tvt-kpi strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.tvt-kpi-symbol strong { color: var(--tvt-buy); font-size: 20px; }
.tvt-kpi .is-pos { color: var(--tvt-buy); }
.tvt-kpi .is-neg { color: var(--tvt-sell); }
.tvt-kpi-ring { grid-template-columns: 46px 1fr; align-items: center; gap: 10px; }
.tvt-kpi-ring i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--tvt-buy) calc(var(--p) * 1%), rgba(255,255,255,0.08) 0);
}
.tvt-kpi-ring b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tvt-panel);
  font-size: 10px;
}
.tvt button { font: inherit; color: inherit; }
.tvt svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.tvt-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
  min-width: 0;
}
.tvt-logo {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--tvt-accent), rgba(var(--accent-rgb, 139, 92, 246), 0.55));
}
.tvt-symbol-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tvt-symbol-btn:hover { background: var(--tvt-panel-2); }
.tvt-symbol-btn b { font-size: 15px; }
.tvt-symbol-btn small { color: var(--tvt-muted); font-size: 12px; }
.tvt-sep { flex: 0 0 1px; height: 22px; background: var(--tvt-line); margin: 0 4px; }
.tvt-tfs { display: flex; gap: 2px; }
.tvt-tfs button,
.tvt-icon-btn,
.tvt-text-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--tvt-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.tvt-tfs button:hover,
.tvt-icon-btn:hover,
.tvt-text-btn:hover { background: var(--tvt-panel-2); color: var(--tvt-text); }
.tvt-tfs button.is-active { color: var(--tvt-accent); background: var(--tvt-accent-soft); }
.tvt-draw-toggle { display: none; }
.tvt-menu-wrap { position: relative; }
.tvt-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}
.tvt-menu[hidden] { display: none; }
.tvt-menu button,
.tvt-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.tvt-menu button:hover,
.tvt-menu label:hover { background: var(--tvt-panel-2); }
.tvt-menu button.is-active { color: var(--tvt-accent); }
.tvt-menu label input { accent-color: var(--tvt-accent); }
.tvt-menu label i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.tvt-top-stats {
  display: flex;
  gap: 18px;
  margin-left: auto;
  padding-right: 6px;
  white-space: nowrap;
}
.tvt-top-stats div { display: grid; line-height: 1.15; }
.tvt-top-stats span { font-size: 10px; color: var(--tvt-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tvt-top-stats b { font-size: 13px; }
.tvt-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.tvt-status.is-live { color: var(--tvt-buy); background: rgba(38, 194, 129, 0.12); }
.tvt-status.is-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--tvt-buy);
  vertical-align: 1px;
  animation: tvtPulse 1.6s ease-in-out infinite;
}
.tvt-status.is-off { color: #ffb86b; background: rgba(255, 184, 107, 0.12); }
@keyframes tvtPulse { 50% { opacity: 0.25; } }
.tvt-close { flex: 0 0 auto; }
.tvt .is-pos { color: var(--tvt-buy); }
.tvt .is-neg { color: var(--tvt-sell); }

/* body */
.tvt-body {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 310px;
  min-height: 0;
}
.tvt-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-right: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
}
.tvt-tools button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tvt-muted);
  cursor: pointer;
}
.tvt-tools button:hover { background: var(--tvt-panel-2); color: var(--tvt-text); }
.tvt-tools button.is-active { background: var(--tvt-accent-soft); color: var(--tvt-accent); }
.tvt-tools-sep { width: 22px; height: 1px; margin: 4px 0; background: var(--tvt-line); }
.tvt-chart-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.tvt-chart {
  position: absolute;
  inset: 0;
  touch-action: none;
}
.tvt-chart.is-drawing { cursor: crosshair; }
.tvt-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--tvt-muted);
  font-size: 13px;
}
.tvt-legend {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  max-width: calc(100% - 90px);
  pointer-events: none;
  font-size: 12px;
}
.tvt-legend b { font-size: 14px; }
.tvt-legend span { color: var(--tvt-muted); }
.tvt-legend em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--tvt-buy);
  background: rgba(38, 194, 129, 0.12);
}
.tvt-ohlc i { font-style: normal; margin-right: 4px; }
.tvt-ohlc.is-pos i { color: var(--tvt-buy); }
.tvt-ohlc.is-neg i { color: var(--tvt-sell); }
.tvt-trade {
  position: absolute;
  top: 34px;
  left: 12px;
  z-index: 4;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.tvt-trade-side {
  display: grid;
  gap: 0;
  min-width: 92px;
  padding: 5px 10px;
  border: 0;
  color: #fff !important;
  cursor: pointer;
  text-align: left;
  transition: filter 0.15s ease;
}
.tvt-trade-side small { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; opacity: 0.85; }
.tvt-trade-side b { font-size: 14px; }
.tvt-trade-side.is-sell { background: var(--tvt-sell); }
.tvt-trade-side.is-buy { background: var(--tvt-buy); text-align: right; }
.tvt-trade-side:hover:not(:disabled) { filter: brightness(1.1); }
.tvt-trade-side:disabled { opacity: 0.45; cursor: not-allowed; }
.tvt-trade-lots {
  display: grid;
  align-content: center;
  width: 70px;
  background: var(--tvt-panel);
  text-align: center;
}
.tvt-trade-lots input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--tvt-text);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  -moz-appearance: textfield;
}
.tvt-trade-lots input::-webkit-inner-spin-button { display: none; }
.tvt-trade-lots small { font-size: 9px; color: var(--tvt-muted); }
.tvt-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--tvt-panel);
  border: 1px solid var(--tvt-line);
  pointer-events: none;
}
.tvt-pop {
  position: absolute;
  z-index: 6;
  width: 210px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font-size: 13px;
}
.tvt-pop[hidden] { display: none; }
.tvt-pop button {
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--tvt-panel-2);
  cursor: pointer;
  text-align: left;
}
.tvt-pop button:hover { background: var(--tvt-accent-soft); }
.tvt-pop small { color: var(--tvt-muted); font-size: 11px; }

/* side */
.tvt-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
}
.tvt-sheet-handle,
.tvt-side-tabs { display: none; }
.tvt-watch {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  border-bottom: 1px solid var(--tvt-line);
}
.tvt-watch header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
}
.tvt-watch header strong { font-size: 13px; }
.tvt-watch header input {
  width: 120px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel-2);
  color: var(--tvt-text);
  font-size: 12px;
}
.tvt-watch-head,
.tvt-watch-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 62px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}
.tvt-watch-head {
  padding-bottom: 4px;
  font-size: 10px;
  color: var(--tvt-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tvt-watch-head span:nth-child(n + 2) { text-align: right; }
.tvt-watch-list { overflow-y: auto; min-height: 0; }
.tvt-watch-list button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.tvt-watch-list button:hover { background: var(--tvt-panel-2); }
.tvt-watch-list button.is-active { background: var(--tvt-accent-soft); border-left-color: var(--tvt-accent); }
.tvt-w-name { display: grid; min-width: 0; }
.tvt-w-name b { font-size: 13px; }
.tvt-w-name small { font-size: 10px; color: var(--tvt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvt-w-bid,
.tvt-w-chg { text-align: right; font-size: 12px; font-weight: 600; }
.tvt-w-bid { border-radius: 4px; padding: 2px 4px; }
.tvt-w-bid.flash-up { animation: tvtFlashUp 0.9s ease; }
.tvt-w-bid.flash-down { animation: tvtFlashDown 0.9s ease; }
@keyframes tvtFlashUp { from { background: rgba(38, 194, 129, 0.35); } }
@keyframes tvtFlashDown { from { background: rgba(240, 80, 110, 0.35); } }
.tvt-ticket {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  max-height: 62%;
}
.tvt-ticket-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tvt-ticket-sides button {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel-2);
  cursor: pointer;
  text-align: left;
}
.tvt-ticket-sides small { font-size: 11px; color: var(--tvt-muted); }
.tvt-ticket-sides b { font-size: 16px; }
.tvt-ticket-sides [data-side="buy"] { text-align: right; }
.tvt-ticket-sides [data-side="sell"].is-active { background: var(--tvt-sell); border-color: var(--tvt-sell); color: #fff; }
.tvt-ticket-sides [data-side="buy"].is-active { background: var(--tvt-buy); border-color: var(--tvt-buy); color: #fff; }
.tvt-ticket-sides .is-active small { color: rgba(255, 255, 255, 0.85); }
.tvt-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 9px;
  background: var(--tvt-panel-2);
}
.tvt-seg button {
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--tvt-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tvt-seg button.is-active { background: var(--tvt-panel); color: var(--tvt-text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.tvt-field { display: grid; gap: 5px; min-width: 0; }
.tvt-field > span { font-size: 11px; color: var(--tvt-muted); }
.tvt-field input,
.tvt-inline {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel-2);
  color: var(--tvt-text);
  font-size: 14px;
}
.tvt-field input:focus,
.tvt-inline:focus { outline: none; border-color: var(--tvt-accent); }
.tvt-inline { height: 28px; width: 96px; font-size: 12px; }
.tvt-stepper { display: grid; grid-template-columns: 36px 1fr 36px; gap: 6px; }
.tvt-stepper input { text-align: center; font-weight: 700; }
.tvt-stepper button,
.tvt-presets button,
.tvt-quick-sltp button {
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--tvt-line);
  background: var(--tvt-panel-2);
  font-weight: 700;
  cursor: pointer;
}
.tvt-presets,
.tvt-quick-sltp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tvt-quick-sltp { grid-template-columns: repeat(3, 1fr); }
.tvt-presets button,
.tvt-quick-sltp button { height: 28px; font-size: 12px; }
.tvt-presets button:hover,
.tvt-quick-sltp button:hover,
.tvt-stepper button:hover { border-color: var(--tvt-accent); }
.tvt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tvt-calc {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--tvt-panel-2);
}
.tvt-calc:empty { display: none; }
.tvt-calc div { display: flex; justify-content: space-between; font-size: 12px; }
.tvt-calc dt { color: var(--tvt-muted); }
.tvt-calc dd { margin: 0; font-weight: 700; }
.tvt-warn {
  margin: 0;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.4;
}
.tvt-warn.is-warn { color: #ffcf8a; background: rgba(255, 184, 107, 0.12); }
.tvt-warn.is-danger { color: #ff9aac; background: rgba(240, 80, 110, 0.16); }
.tvt-submit {
  height: 44px;
  border: 0;
  border-radius: 11px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.tvt-submit.is-buy { background: linear-gradient(160deg, #31d892, #1fa967); }
.tvt-submit.is-sell { background: linear-gradient(160deg, #ff6b85, #d63a55); }
.tvt-submit:hover:not(:disabled) { filter: brightness(1.08); }
.tvt-submit:active:not(:disabled) { transform: scale(0.98); }
.tvt-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.tvt-msg { min-height: 16px; margin: 0; font-size: 12px; color: var(--tvt-muted); }
.tvt-msg.is-ok { color: var(--tvt-buy); }
.tvt-msg.is-error { color: var(--tvt-sell); }
.tvt-msg.is-warn { color: #ffb86b; }

/* bottom */
.tvt-bottom {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  border-top: 1px solid var(--tvt-line);
  background: var(--tvt-panel);
}
.tvt-bottom-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 10px 0; }
.tvt-bottom-tabs button {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tvt-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tvt-bottom-tabs button.is-active { color: var(--tvt-text); background: var(--tvt-panel-2); }
.tvt-bottom-tabs button span {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tvt-accent-soft);
  color: var(--tvt-accent);
  font-size: 11px;
}
.tvt-bottom-tabs .tvt-closeall { margin-left: auto; color: var(--tvt-sell); }
.tvt-bottom-body { overflow: auto; padding: 4px 10px 8px; }
.tvt-bottom-body table { display: table; width: 100%; min-width: 0 !important; table-layout: auto; border-collapse: collapse; font-size: 12px; }
.tvt-bottom-body th {
  position: sticky;
  top: 0;
  padding: 7px 8px;
  background: var(--tvt-panel);
  color: var(--tvt-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tvt-bottom-body td { padding: 6px 8px; border-top: 1px solid var(--tvt-line); white-space: nowrap; }
.tvt-tag { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.tvt-tag.is-buy { color: var(--tvt-buy); background: rgba(38, 194, 129, 0.12); }
.tvt-tag.is-sell { color: var(--tvt-sell); background: rgba(240, 80, 110, 0.12); }
.tvt-m-only { display: none; }
.tvt-link,
.tvt-edit {
  padding: 2px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.tvt-edit { font-weight: 500; border: 1px dashed transparent; }
.tvt-edit:hover,
.tvt-link:hover { border-color: var(--tvt-line); background: var(--tvt-panel-2); }
.tvt-x {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--tvt-line);
  background: transparent;
  cursor: pointer;
}
.tvt-x:hover { color: var(--tvt-sell); border-color: var(--tvt-sell); }
.tvt-empty { margin: 16px 0; text-align: center; color: var(--tvt-muted); font-size: 13px; }
.tvt-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 8px 2px; }
.tvt-goal { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--tvt-panel-2); }
.tvt-goal div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.tvt-goal span { color: var(--tvt-muted); }
.tvt-goal i { display: block; height: 6px; border-radius: 999px; background: var(--tvt-line); overflow: hidden; }
.tvt-goal em { display: block; height: 100%; border-radius: inherit; }
.tvt-goal.is-goal em { background: linear-gradient(90deg, var(--tvt-accent), var(--tvt-buy)); }
.tvt-goal.is-risk em { background: linear-gradient(90deg, #fbbf24, var(--tvt-sell)); }
.tvt-breach { margin: 6px 2px; color: var(--tvt-sell); font-size: 12px; }
.tvt-statusline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 6px 12px;
  border-top: 1px solid var(--tvt-line);
  font-size: 12px;
  color: var(--tvt-muted);
}
.tvt-statusline b { color: var(--tvt-text); margin-left: 4px; }
.tvt-statusline .tvt-login { margin-left: auto; }

@media (min-width: 901px) {
  .tvt-trade { display: none; }
}
@media (max-width: 1100px) {
  .tvt-desk-title small, .tvt-top-stats { display: none; }
  .tvt-kpi:nth-child(n + 3) { display: none; }
  .tvt-body { grid-template-columns: 46px minmax(0, 1fr) 280px; }
}

@media (max-width: 900px) {
  .tvt {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .tvt > * { flex: 0 0 auto; }
  .tvt-desk { padding: 8px; gap: 8px; }
  .tvt-desk-title { min-width: 0; }
  .tvt-desk-title small { display: none; }
  .tvt-kpis { overflow-x: auto; }
  .tvt-kpi { flex: 0 0 148px; padding: 6px 10px; }
  .tvt-kpi-symbol strong { font-size: 16px; }
  .tvt-top {
    height: auto;
    min-height: 52px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px;
    flex-wrap: wrap;
    row-gap: 4px;
    position: sticky;
    top: 0;
    z-index: 8;
  }
  .tvt-top::-webkit-scrollbar { display: none; }
  .tvt-logo,
  .tvt-text-btn span,
  .tvt-sep { display: none; }
  .tvt-draw-toggle { display: inline-flex; }
  .tvt-symbol-btn small { display: none; }
  .tvt-tfs { order: 10; flex: 1 0 100%; justify-content: space-between; }
  .tvt-tfs button { flex: 1; min-width: 0; padding: 0 6px; }
  .tvt-symbol-btn { margin-right: auto; }
  .tvt-menu { position: fixed; top: calc(98px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; }
  .tvt-body { display: block; }
  .tvt-tools {
    display: none;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--tvt-line);
  }
  .tvt.is-tools-open .tvt-tools { display: flex; }
  .tvt.is-tools-open .tvt-draw-toggle { color: var(--tvt-accent); background: var(--tvt-accent-soft); }
  .tvt-tools button { flex: 0 0 38px; height: 38px; }
  .tvt-tools-sep { width: 1px; height: 22px; margin: 0 4px; }
  .tvt-chart-wrap { height: 58vh; min-height: 300px; }
  .tvt-legend { font-size: 11px; }
  .tvt-legend .tvt-ohlc { display: none; }
  .tvt-trade { top: 30px; }
  .tvt-trade-side { min-width: 0; padding: 6px 12px; }
  .tvt-trade-side b { font-size: 15px; }
  .tvt-side {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    max-height: 84dvh;
    border: 1px solid var(--tvt-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tvt-side.is-open { transform: translateY(0); }
  .tvt-sheet-handle {
    display: block;
    width: 100%;
    height: 22px;
    border: 0;
    background: transparent;
  }
  .tvt-sheet-handle i { display: block; width: 42px; height: 5px; margin: 0 auto; border-radius: 999px; background: var(--tvt-muted); opacity: 0.5; }
  .tvt-side-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 12px 6px;
    padding: 3px;
    border-radius: 10px;
    background: var(--tvt-panel-2);
  }
  .tvt-side-tabs button { height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--tvt-muted); font-weight: 700; }
  .tvt-side-tabs button.is-active { background: var(--tvt-panel); color: var(--tvt-text); }
  .tvt-side[data-view="watch"] .tvt-ticket,
  .tvt-side[data-view="order"] .tvt-watch { display: none; }
  .tvt-watch { border-bottom: 0; max-height: 70dvh; }
  .tvt-ticket { max-height: 70dvh; }
  .tvt-bottom { min-height: 320px; }
  .tvt-bottom-body { overflow-x: auto; }
  .tvt-bottom-body th.is-wide,
  .tvt-bottom-body td.is-wide { display: none; }
  .tvt-bottom-body .tvt-m-only { display: inline-block; margin-left: 6px; }
  .tvt-bottom-body th,
  .tvt-bottom-body td { padding-left: 8px; padding-right: 8px; }
  .tvt-statusline { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .tvt-statusline .tvt-login { margin-left: 0; }
}

/* sentrage-desk-skin */
.replay-workspace .replay-stage,
.replay-workspace .replay-order-panel,
.trade-chart-modal-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0c111b;
}
.replay-workspace .replay-transport-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  background: #101722;
}
.replay-workspace .replay-slider {
  grid-column: 1 / -1;
  order: -1;
  accent-color: #22c55e;
  height: 6px;
}
.replay-workspace .replay-long-btn { background: #16a34a; }
.replay-workspace .replay-short-btn { background: #e11d48; }
.trade-chart-modal-card {
  width: min(1680px, calc(100vw - 16px));
  height: min(96dvh, 980px);
  max-height: min(96dvh, 980px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

/* Sentrage / Obsidian — self-contained terminal skin. */
.tvt-backdrop {
  --tvt-bg: #0a0a0a;
  --tvt-panel: #111111;
  --tvt-panel-2: #1b1b1b;
  --tvt-line: #272727;
  --tvt-text: #ededed;
  --tvt-muted: #929292;
  --tvt-accent: #dedede;
  --tvt-accent-soft: rgba(255,255,255,.075);
  --tvt-buy: #68c5a7;
  --tvt-sell: #e08a91;
  background: #080808;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.tvt *, .tvt *::before, .tvt *::after { box-sizing: border-box; }
.tvt { background: transparent; }
.tvt button, .tvt input { font-family: inherit; }
.tvt button { transition: background .15s, border-color .15s, color .15s; }
.tvt :focus-visible { outline: 2px solid #c0acff; outline-offset: 3px; }
.tvt [hidden] { display: none !important; }
.tvt * { scrollbar-width: thin; scrollbar-color: #373737 transparent; }
.tvt-masthead { display: flex; align-items: center; gap: 30px; min-width: 0; }
.tvt-brand { display: flex; align-items: center; gap: 11px; width: 228px; flex-shrink: 0; }
.tvt-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #383838; background: radial-gradient(circle at 25% 10%,#444,#181818 48%,#080808 85%); box-shadow: inset 0 0 0 4px #141414; color: #d5d5d5; }
.tvt-wordmark { display: block; font-size: 11px; letter-spacing: .27em; font-weight: 650; }
.tvt-brand small { display: block; color: #969696; font-size: 11px; margin-top: 5px; }
.tvt-page-heading > span { display: block; font-size: 9px; color: #858585; letter-spacing: .15em; }
.tvt-page-heading i { color: #535353; font-style: normal; margin: 0 8px; }
.tvt-page-heading h1 { display: flex; align-items: center; gap: 10px; margin: 7px 0 0; font-size: 20px; letter-spacing: -.6px; font-weight: 600; }
.tvt-version { border: 1px solid #343434; border-radius: 4px; padding: 3px 5px; font-size: 8px; color: #aaa; letter-spacing: .1em; }
.tvt-account-chip { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #292929; border-radius: 11px; background: #131313; }
.tvt-account-chip > svg { color: #aaa; }
.tvt-account-chip small { display: block; color: #929292; font-size: 10px; margin-bottom: 4px; }
.tvt-account-chip b { font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.tvt-account-dot, .tvt-tiny-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--tvt-buy); }
.tvt-account-dot { margin-left: 12px; }
.tvt-tiny-dot { margin-right: 6px; vertical-align: 2px; }
.tvt-desk { padding: 0; background: transparent; border: 0; }
.tvt-kpis { gap: 12px; height: 100%; }
.tvt-kpi { gap: 8px; padding: 17px 18px; border-radius: 13px; background: linear-gradient(125deg,#181818,#121212); }
.tvt-kpi > span, .tvt-kpi-ring div > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.tvt-kpi span > i { font-style: normal; font-size: 9px; color: #7e7e7e; }
.tvt-kpi strong { font-size: 25px; letter-spacing: -.8px; line-height: 1.12; font-weight: 550; }
.tvt-kpi em { font-size: 10px; color: #838383; }
.tvt-kpi-balance { background: radial-gradient(ellipse at 0 0,#252525,#151515 75%); border-color: #383838; }
.tvt-dot-sep { margin: 0 4px; }
.tvt-kpi-ring { grid-template-columns: 1fr 44px; }
.tvt-kpi-ring > div { display: grid; gap: 8px; }
.tvt-kpi-ring i { width: 44px; height: 44px; background: conic-gradient(#a995dd calc(var(--p)*1%),#343139 0); }
.tvt-kpi-ring b { width: 36px; height: 36px; font-style: normal; font-size: 9px; color: #bcb5c9; }
.tvt-kpi-ring strong small { font-size: 18px; color: #969696; margin-left: 2px; }
.tvt-top { border: 1px solid var(--tvt-line); border-radius: 12px 12px 0 0; padding: 0 12px; gap: 6px; }
.tvt-logo { background: #2b2518; border: 1px solid #4b4029; color: #d4bc82; width: 28px; height: 28px; font-size: 12px; border-radius: 8px; font-family: Georgia, serif; }
.tvt-symbol-btn { padding: 0 3px; gap: 7px; }
.tvt-symbol-btn b { font-size: 12px; font-weight: 650; }
.tvt-symbol-btn small { display: none; }
.tvt-top-stats { display: none; }
.tvt-tfs button { font-size: 11px; padding: 0 7px; min-width: 28px; height: 28px; }
.tvt-tfs button.is-active { background: #2c2c2c; color: #fff; box-shadow: inset 0 0 0 1px #3e3e3e; }
.tvt-text-btn { font-size: 11px; }
.tvt-status { margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.tvt-status.is-live { color: #9ab5a8; background: #17201c; }
.tvt-status.is-live::before { animation: none; width: 4px; height: 4px; }
.tvt-close { color: #8c8c8c; }
.tvt-tools { gap: 8px; padding-top: 14px; border-left: 1px solid var(--tvt-line); border-bottom: 1px solid var(--tvt-line); border-radius: 0 0 0 12px; }
.tvt-tools button { width: 30px; height: 30px; }
.tvt-tools button svg { width: 17px; height: 17px; }
.tvt-chart-wrap { background: #101010; border-right: 1px solid var(--tvt-line); border-bottom: 1px solid var(--tvt-line); border-radius: 0 0 12px 0; overflow: hidden; }
.tvt-watermark { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; color: rgba(255,255,255,.035); font-weight: 650; font-size: clamp(32px,4vw,72px); letter-spacing: .1em; pointer-events: none; }
.tvt-watermark span { font-size: 9px; letter-spacing: .45em; margin-top: 9px; }
.tvt-legend { top: 15px; left: 17px; gap: 5px 10px; font-size: 10px; }
.tvt-legend b { font-size: 12px; font-weight: 550; }
.tvt-ohlc { flex-basis: 100%; font-size: 10px; }
.tvt-watch { border: 1px solid var(--tvt-line); border-radius: 12px; overflow: hidden; background: var(--tvt-panel); }
.tvt-watch header { display: grid; gap: 18px; padding: 19px 14px 18px; }
.tvt-section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tvt-section-title strong { font-size: 13px; font-weight: 600; letter-spacing: -.2px; }
.tvt-section-title > span { font-size: 8px; letter-spacing: .1em; color: #7e7e7e; }
.tvt-search { display: flex; align-items: center; gap: 8px; border: 1px solid #2b2b2b; border-radius: 8px; padding: 0 9px; color: #787878; background: #1a1a1a; }
.tvt-watch header input { padding: 0; width: 100%; min-width: 0; height: 33px; border: 0; background: transparent; font-size: 11px; outline-offset: 0; }
.tvt-search > span { font-size: 15px; color: #707070; }
.tvt-watch-head { padding: 0 14px 10px; grid-template-columns: minmax(0,1fr) 70px 49px; font-size: 8px; letter-spacing: .025em; text-transform: none; }
.tvt-watch-list { flex: 1; padding: 0 6px; }
.tvt-watch-list button { padding: 0 7px; grid-template-columns: minmax(0,1fr) 70px 49px; gap: 4px; min-height: 56px; border-left: 0; border-radius: 7px; margin-bottom: 3px; position: relative; }
.tvt-watch-list button.is-active { background: #252525; box-shadow: inset 0 0 0 1px #383838; }
.tvt-watch-list button.is-active::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; background: #c8b391; border-radius: 2px; }
.tvt-w-name { gap: 4px; }
.tvt-w-name b { font-size: 11px; font-weight: 550; }
.tvt-w-name small { font-size: 9px; color: #838383; }
.tvt-w-bid { font-size: 11px; font-weight: 500; padding: 0; }
.tvt-w-chg { font-size: 9px; font-weight: 500; }
.tvt-market-note { display: flex; gap: 9px; padding: 17px 14px; margin-top: 16px; border-top: 1px solid #242424; color: #999; }
.tvt-market-note > svg { flex-shrink: 0; color: #a5a5a5; }
.tvt-market-note b { font-size: 10px; font-weight: 500; display: block; margin: 1px 0 5px; color: #b9b9b9; }
.tvt-market-note span { font-size: 9px; line-height: 1.7; display: block; color: #797979; }
.tvt-ticket { border: 1px solid var(--tvt-line); border-radius: 12px; background: var(--tvt-panel); padding: 19px 16px 14px; gap: 15px; align-content: start; max-height: none; }
.tvt-section-title .tvt-market-tag { border: 1px solid #323232; background: #202020; padding: 4px 7px; border-radius: 5px; letter-spacing: 0; color: #b5b5b5; font-size: 9px; }
.tvt-order-symbol { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.tvt-order-symbol b { font-size: 11px; font-weight: 500; }
.tvt-order-symbol span { font-size: 9px; color: #838383; }
.tvt-ticket-sides { gap: 8px; }
.tvt-ticket-sides button { padding: 11px 10px; gap: 7px; border-radius: 8px; background: #181818; }
.tvt-ticket-sides small { font-size: 10px; }
.tvt-ticket-sides b { font-size: 18px; font-weight: 550; letter-spacing: -.4px; }
.tvt-ticket-sides [data-side="sell"] { color: var(--tvt-sell); }
.tvt-ticket-sides [data-side="buy"] { color: var(--tvt-buy); }
.tvt-ticket-sides [data-side="buy"].is-active { background: #192b25; border-color: #395a4e; color: #82d8b9; }
.tvt-ticket-sides [data-side="sell"].is-active { background: #302022; border-color: #694048; color: #eaa0a6; }
.tvt-ticket-sides .is-active small { color: inherit; }
.tvt-seg { border: 1px solid #262626; background: #0b0b0b; padding: 4px; }
.tvt-seg button { font-size: 11px; font-weight: 500; height: 29px; }
.tvt-seg button.is-active { background: #292929; box-shadow: inset 0 0 0 1px #373737; }
.tvt-field { gap: 8px; }
.tvt-field > span, .tvt-field > label { font-size: 10px; color: #aaa; }
.tvt-field input { height: 38px; border-radius: 7px; font-size: 12px; background: #191919; }
.tvt-stepper { grid-template-columns: 32px 1fr 32px; gap: 5px; }
.tvt-stepper button { height: 38px; font-size: 17px; font-weight: 400; border-radius: 7px; background: #191919; color: #aaa; }
.tvt-presets button, .tvt-quick-sltp button { border-radius: 6px; background: #181818; font-size: 10px; font-weight: 500; height: 27px; color: #aaa; }
.tvt-row { gap: 10px; }
.tvt-calc { padding: 14px 0; gap: 10px; border-radius: 0; background: transparent; border-top: 1px solid #282828; border-bottom: 1px solid #282828; }
.tvt-calc div { font-size: 10px; }
.tvt-calc dd { font-weight: 500; }
.tvt-submit { font-size: 12px; font-weight: 600; height: 43px; border-radius: 8px; }
.tvt-submit.is-buy { background: #addcc9; color: #11251d !important; border: 1px solid #c3eadb; }
.tvt-submit.is-sell { background: #dda0a4; color: #35181d !important; border: 1px solid #efb7bb; }
.tvt-msg { font-size: 10px; min-height: 0; line-height: 1.6; }
.tvt-msg:empty { display: none; }
.tvt-order-note { display: flex; justify-content: center; gap: 5px; align-items: center; color: #777; font-size: 8px; }
.tvt-bottom { border: 1px solid var(--tvt-line); border-radius: 12px; overflow: hidden; }
.tvt-bottom-tabs { gap: 10px; padding: 0 16px; height: 45px; border-bottom: 1px solid #252525; }
.tvt-bottom-tabs button { height: 100%; padding: 0 3px; font-size: 11px; border-radius: 0; font-weight: 500; border-bottom: 2px solid transparent; }
.tvt-bottom-tabs button.is-active { background: transparent; border-bottom-color: #bdbdbd; }
.tvt-bottom-tabs button span { padding: 2px 5px; font-size: 9px; background: #2b2b2b; color: #bdbdbd; }
.tvt-bottom-body { padding: 0 13px; }
.tvt-empty { font-size: 11px; line-height: 1.7; }
.tvt-empty-positions { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; min-height: 100%; text-align: left; }
.tvt-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #303030; border-radius: 13px; background: linear-gradient(150deg,#252525,#151515); color: #939393; }
.tvt-empty strong { color: #cecece; font-size: 12px; font-weight: 500; }
.tvt-empty p { font-size: 10px; margin: 4px 0 0; color: #858585; }
.tvt-empty-cta { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding: 8px 10px; background: #232323; border: 1px solid #363636; border-radius: 7px; font-size: 10px !important; cursor: pointer; }
.tvt-empty-cta:hover { background: #303030; }
.tvt-ticket.is-order-focus { box-shadow: 0 0 0 2px var(--tvt-accent, #c0acff); animation: tvtOrderIn 0.45s ease; }
@keyframes tvtOrderIn { from { box-shadow: 0 0 0 0 rgba(192, 172, 255, 0.85); } to { box-shadow: 0 0 0 2px var(--tvt-accent, #c0acff); } }
.tvt-statusline { display: flex; flex-wrap: wrap; gap: 8px 15px; padding: 10px 15px; font-size: 9px; border-top: 1px solid #252525; color: #858585; }
.tvt-statusline b { font-weight: 500; color: #c2c2c2; }
.tvt-login { display: none; }
.tvt-bottom-body th { font-size: 9px; font-weight: 500; padding: 10px 6px; }
.tvt-bottom-body td { font-size: 10px; padding: 8px 6px; }
.tvt-goals { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.tvt-goal { padding: 8px; gap: 5px; }
.tvt-goal div { font-size: 10px; }
.tvt-goal i { height: 3px; }
.tvt-goal.is-goal em { background: #ada0c4; }
.tvt-goal.is-risk em { background: #bc9688; }
@media (min-width: 901px) {
  .tvt { inset: 12px 20px 18px; max-width: 1880px; margin-inline: auto; display: grid; grid-template-columns: 232px 42px minmax(0,1fr) 280px; grid-template-rows: 68px 112px 52px minmax(230px,1fr) 188px; gap: 0; column-gap: 0; overflow: auto; }
  .tvt-masthead { grid-row: 1; grid-column: 1/-1; margin-bottom: 12px; }
  .tvt-desk { grid-row: 2; grid-column: 1/-1; margin-bottom: 16px; }
  .tvt-top { grid-row: 3; grid-column: 2/4; margin-left: 12px; margin-right: 12px; }
  .tvt-body, .tvt-side { display: contents; }
  .tvt-watch { grid-column: 1; grid-row: 3/6; min-height: 0; }
  .tvt-tools { grid-column: 2; grid-row: 4; margin-left: 12px; width: 42px; }
  .tvt-chart-wrap { grid-column: 3; grid-row: 4; margin-left: 12px; margin-right: 12px; }
  .tvt-ticket { grid-column: 4; grid-row: 3/6; }
  .tvt-bottom { grid-column: 2/4; grid-row: 5; margin: 12px 12px 0; }
  .tvt-kpi:nth-child(n+3) { display: grid; }
  .tvt-kpi { padding: 14px 18px; }
}
@media (min-width: 901px) and (max-width: 1240px) {
  .tvt { inset: 8px 12px 12px; grid-template-columns: 202px 38px minmax(0,1fr) 245px; }
  .tvt-brand { width: 190px; }
  .tvt-kpi { padding: 13px; }
  .tvt-kpi strong { font-size: 21px; }
  .tvt-kpi-ring > i { display: none; }
  .tvt-kpi-ring { grid-template-columns: 1fr; }
  .tvt-kpi > span { font-size: 10px; }
  .tvt-text-btn span, .tvt-top .tvt-sep { display: none; }
  .tvt-top { padding: 0 8px; gap: 2px; }
  .tvt-tfs button { padding: 0 4px; min-width: 25px; }
  .tvt-ticket { padding: 18px 12px; }
  .tvt-watch-list button, .tvt-watch-head { grid-template-columns: minmax(0,1fr) 62px 44px; gap: 3px; }
  .tvt-w-name b, .tvt-w-bid { font-size: 10px; }
  .tvt-section-title > span:not(.tvt-market-tag) { display: none; }
  .tvt-empty-cta { display: none; }
  .tvt-market-note { padding: 13px 10px; }
}
@media (min-width: 901px) and (max-height: 760px) {
  .tvt { grid-template-rows: 58px 98px 48px minmax(220px,1fr) 154px; }
  .tvt-ticket { gap: 11px; }
  .tvt-kpi strong { font-size: 22px; }
  .tvt-empty-icon { width: 34px; height: 34px; }
}
@media (max-width: 900px) {
  .tvt { inset: 0; padding: 12px; background: #090909; gap: 12px; }
  .tvt-masthead { gap: 10px; min-height: 55px; }
  .tvt-brand { width: auto; }
  .tvt-brand-mark { width: 35px; height: 35px; }
  .tvt-wordmark { font-size: 9px; letter-spacing: .18em; }
  .tvt-brand small { font-size: 9px; }
  .tvt-page-heading { margin-left: auto; }
  .tvt-page-heading h1 { font-size: 15px; gap: 5px; }
  .tvt-page-heading > span { font-size: 7px; }
  .tvt-account-chip { display: none; }
  .tvt-kpis { gap: 8px; }
  .tvt-kpi { display: grid !important; min-height: 99px; flex: 0 0 166px; padding: 13px; }
  .tvt-kpi strong { font-size: 22px; }
  .tvt-kpi-ring { grid-template-columns: 1fr 36px; }
  .tvt-kpi-ring i { width: 36px; height: 36px; }
  .tvt-kpi-ring b { width: 29px; height: 29px; }
  .tvt-top { top: -12px; min-height: 90px; border-radius: 12px 12px 0 0; padding: 8px; margin-bottom: -12px; }
  .tvt-body { border: 1px solid var(--tvt-line); border-top: 0; border-radius: 0 0 12px 12px; }
  .tvt-chart-wrap { border: 0; border-radius: 0 0 12px 12px; height: 54vh; }
  .tvt-legend { top: 12px; }
  .tvt-tools { border: 0; border-bottom: 1px solid var(--tvt-line); border-radius: 0; }
  .tvt-trade { top: 42px; box-shadow: none; border: 1px solid #363636; border-radius: 7px; }
  .tvt-trade-side.is-buy { background: #1a3329; color: #91cfb7 !important; }
  .tvt-trade-side.is-sell { background: #342124; color: #e1a0a4 !important; }
  .tvt-trade-lots { width: 64px; }
  .tvt-side { background: #131313; }
  .tvt-ticket, .tvt-watch { border: 0; border-radius: 0; }
  .tvt-ticket { padding: 15px 18px 22px; gap: 12px; }
  .tvt-watch { min-height: 250px; }
  .tvt-watch-list button { min-height: 49px; }
  .tvt-market-note { display: none; }
  .tvt-bottom { min-height: 235px; }
  .tvt-empty-positions { flex-wrap: wrap; align-content: center; gap: 10px; padding: 18px 0; }
  .tvt-empty strong { font-size: 11px; }
  .tvt-empty-icon { width: 34px; height: 34px; }
  .tvt-empty-cta { margin: 0; }
  .tvt-menu { position: absolute; left: auto; right: 0; top: calc(100% + 8px); min-width: 175px; }
  .tvt-goals { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tvt-backdrop, .tvt *, .tvt *::before { animation: none !important; transition: none !important; }
}
/* Match the host's existing light theme when embedded. */
body[data-theme="white"] .tvt-backdrop { --tvt-accent: #333; --tvt-accent-soft: #e9e9e9; color-scheme: light; }
body[data-theme="white"] .tvt { background: #f5f5f5; }
body[data-theme="white"] :is(.tvt-kpi,.tvt-watch,.tvt-ticket,.tvt-chart-wrap,.tvt-account-chip) { background: #fff; border-color: #ddd; }
body[data-theme="white"] :is(.tvt-seg,.tvt-search,.tvt-field input,.tvt-stepper button,.tvt-presets button,.tvt-quick-sltp button) { background: #f5f5f5; border-color: #ddd; }
body[data-theme="white"] :is(.tvt-seg button.is-active,.tvt-watch-list button.is-active,.tvt-tfs button.is-active) { background: #e9e9e9; color: #222; box-shadow: none; }
body[data-theme="white"] .tvt-watermark { color: rgba(0,0,0,.04); }
