/* === Overlay & Card === */
.tm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0,0,0,0.6);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.tm-overlay.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.tm-card {
  width: 98%;
  max-width: 1400px;
  height: 98vh;
  max-height: 98vh;
  background: #0f172a;
  border: 1px solid #22314a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.tm-overlay.open .tm-card {
  transform: scale(1);
}

/* === Header === */
.tm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1f2a3d;
  flex-shrink: 0;
  gap: 12px;
}

.tm-symbol {
  border: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  cursor: copy;
  padding: 2px 0;
}

.tm-symbol:hover,
.tm-symbol:focus-visible {
  color: #93c5fd;
  outline: none;
}

.tm-symbol.copied {
  color: #86efac;
}

.tm-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

.tm-price {
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
  white-space: nowrap;
}

.tm-chg {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.tm-btn:hover {
  background: #1e293b;
}

.tm-btn-share {
  font-size: 16px;
  width: 32px;
  height: 32px;
}

.tm-btn-ai {
  font-size: 12px;
  width: 32px;
  height: 32px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tm-btn-help {
  font-size: 14px;
  width: 32px;
  height: 32px;
  font-weight: 900;
  color: #bfdbfe;
}

.tm-btn-help.active-help {
  border-color: rgba(96,165,250,.65);
  background: rgba(37,99,235,.22);
  color: #dbeafe;
}

.tm-btn-fav {
  font-size: 18px;
  width: 32px;
  height: 32px;
  color: #94a3b8;
}

.tm-btn-fav.active-favorite {
  color: #fbbf24;
  border-color: #fbbf24;
  background: rgba(251,191,36,0.12);
}

.tm-tf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #1f2a3d;
  flex-shrink: 0;
  gap: 8px;
}

.tm-tf-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tm-tf-btn {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.tm-tf-btn:hover {
  color: #f1f5f9;
  background: #334155;
}

.tm-tf-btn.active {
  color: #3b82f6;
  border-color: #3b82f6;
  background: rgba(59,130,246,0.1);
}

.tm-tf-btn.active-lfi {
  color: #a855f7;
  border-color: #a855f7;
  background: rgba(168,85,247,0.1);
}

.tm-tf-btn.active-sli {
  color: #22c55e;
  border-color: #22c55e;
  background: rgba(34,197,94,0.1);
}

.tm-tf-btn.btn-vis.active-vis {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56,189,248,0.1);
}

.tm-chart-wrap {
  flex: 2;
  min-height: 0;
  position: relative;
  background: #111827;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tm-chart-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#tm-chart-tc {
  flex: 1;
  min-height: 400px;
  width: 100%;
}

#tm-chart-tv {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.tm-chart-fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #111827;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.tm-chart-fallback a {
  color: #3b82f6;
  text-decoration: underline;
}

/* === Body Sections === */
.tm-body {
  padding: 10px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* === Compact Info Bar === */
.tm-info-bar {
  margin-bottom: 10px;
}
.ti-line {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.7;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1px 0;
}
.ti-line::-webkit-scrollbar { display: none; }
.ti-line + .ti-line { border-top: 1px solid #1a2538; }
.ti-icon { margin-right: 2px; }
.ti-val { color: #e5e7eb; font-weight: 600; }
.ti-sep { color: #334155; margin: 0 4px; }

.tm-section {
  margin-bottom: 14px;
}

.tm-section:last-child {
  margin-bottom: 0;
}

.tm-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tm-sli-card {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34%);
  border: 1px solid #24344d;
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.tm-sli-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.tm-sli-label {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.tm-sli-state {
  font-size: 15px;
  font-weight: 800;
  color: #e5e7eb;
}

.tm-sli-score {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tm-sli-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}

.tm-sli-kv {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 8px;
  padding: 4px 6px;
  min-width: 0;
  white-space: nowrap;
}

.tm-sli-kv span {
  display: inline;
  flex: 0 0 auto;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  margin-bottom: 0;
}

.tm-sli-kv span::after {
  content: " -";
}

.tm-sli-kv strong {
  display: inline-block;
  min-width: 0;
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-sli-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tm-sli-level {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  color: #94a3b8;
}

.tm-sli-level strong {
  color: #e5e7eb;
  font-weight: 700;
}

.tm-sli-level em {
  font-style: normal;
  font-weight: 700;
}

.tm-sli-note {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
}

.tm-section-grid,
.tm-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}

.cs-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111827;
  border: 1px solid #1f2a3d;
  border-radius: 6px;
  padding: 6px 8px;
  gap: 6px;
}

.cs-label {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cs-val {
  font-size: 13px;
  font-weight: 700;
  color: #e5e7eb;
  text-align: right;
  flex-shrink: 0;
}

.tm-stat {
  background: #111827;
  border: 1px solid #1f2a3d;
  border-radius: 8px;
  padding: 7px;
  text-align: center;
}

.tm-stat-label {
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.tm-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
}

.tm-stat-val-lg {
  font-size: 20px;
}

.tm-price-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.tm-price-item {
  flex: 1;
  background: #111827;
  border: 1px solid #1f2a3d;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.tm-price-label {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tm-price-val {
  font-size: 18px;
  font-weight: 800;
}

.tm-pattern-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111827;
  border: 1px solid #1f2a3d;
  border-radius: 8px;
  padding: 12px 16px;
}

.tm-pattern-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.tm-pattern-icon svg {
  width: 100%;
  height: 100%;
}

.tm-pattern-info {
  flex: 1;
  min-width: 0;
}

.tm-pattern-label {
  font-size: 13px;
  font-weight: 700;
}

.tm-pattern-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.tm-pattern-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.tm-links {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #1f2a3d;
  flex-shrink: 0;
}

.tm-link {
  flex: 1;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 6px;
}

.tm-link:hover {
  background: rgba(59,130,246,0.2);
  text-decoration: none;
}

/* === Modal Help === */
.tm-help-panel {
  position: absolute;
  top: 58px;
  right: 14px;
  bottom: 48px;
  z-index: 12;
  width: min(520px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 0%, rgba(59,130,246,.16), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.98));
  border: 1px solid rgba(96,165,250,.28);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  overflow: hidden;
}

.tm-help-panel[hidden] {
  display: none;
}

.tm-help-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(51,65,85,.82);
  background: rgba(15,23,42,.72);
}

.tm-help-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #60a5fa;
}

.tm-help-title {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 900;
  color: #f8fafc;
}

.tm-help-close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(71,85,105,.9);
  border-radius: 8px;
  background: rgba(15,23,42,.9);
  color: #94a3b8;
  cursor: pointer;
  font-weight: 900;
}

.tm-help-close:hover {
  color: #f8fafc;
  border-color: rgba(148,163,184,.8);
}

.tm-help-body {
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.tm-help-section {
  padding: 11px 12px;
  border: 1px solid rgba(30,41,59,.95);
  border-radius: 12px;
  background: rgba(15,23,42,.68);
}

.tm-help-section + .tm-help-section {
  margin-top: 10px;
}

.tm-help-section-title {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #e5e7eb;
}

.tm-help-line {
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
}

.tm-help-line + .tm-help-line {
  margin-top: 5px;
}

.tm-help-line b {
  color: #f8fafc;
}

.tm-help-warn {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(251,191,36,.38);
  border-radius: 10px;
  background: rgba(251,191,36,.08);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.45;
}

/* === Events Timeline === */
.tm-event-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1f2a3d transparent;
}

.tm-event-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  position: relative;
  border-radius: 6px;
  outline: none;
}

.tm-event-item:hover,
.tm-event-item:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

.tm-event-item + .tm-event-item {
  border-top: 1px solid #1a2538;
}

.tm-event-time {
  flex-shrink: 0;
  color: #64748b;
  font-size: 10px;
  min-width: 52px;
  padding-top: 1px;
  white-space: nowrap;
}

.tm-event-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  margin-top: 3px;
  position: relative;
}

.tm-event-dot.dot-critical { background: #ef4444; box-shadow: 0 0 4px #ef4444; }
.tm-event-dot.dot-high { background: #f59e0b; box-shadow: 0 0 3px #f59e0b88; }
.tm-event-dot.dot-med { background: #3b82f6; }
.tm-event-dot.dot-low { background: #334155; }

.tm-event-body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
  line-height: 1.3;
}

.tm-event-icon {
  flex-shrink: 0;
}

.tm-event-label {
  font-weight: 600;
  color: #e5e7eb;
}

.tm-event-detail {
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 600px) {
  .tm-card {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .tm-header {
    padding: 12px 12px 10px;
    gap: 8px;
  }
  .tm-symbol {
    font-size: 15px;
    line-height: 1.2;
  }
  .tm-header-right {
    gap: 6px;
  }
  .tm-price {
    font-size: 12px;
  }
  .tm-chg {
    font-size: 11px;
  }
  .tm-btn,
  .tm-btn-share,
  .tm-btn-help,
  .tm-btn-ai,
  .tm-btn-fav {
    width: 30px;
    height: 30px;
  }
  .tm-help-panel {
    top: 54px;
    right: 8px;
    left: 8px;
    bottom: 42px;
    width: auto;
    border-radius: 12px;
  }
  .tm-help-head {
    padding: 12px;
  }
  .tm-help-title {
    font-size: 15px;
  }
  .tm-help-body {
    padding: 9px;
  }
  .tm-chart-wrap {
    min-height: 300px;
    height: 400px;
  }
  #tm-chart-tc {
    min-height: 300px;
  }
  .tm-sli-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === Notification Overlay (shared) === */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.notif-overlay.open { opacity: 1; visibility: visible; }
.notif-content {
  width: 94%;
  max-width: 460px;
  max-height: 85vh;
  background: #0f172a;
  border: 1px solid #22314a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #1f2a3d;
}
.notif-title { font-size: 15px; font-weight: 700; color: #e5e7eb; }
.notif-body {
  padding: 14px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.notif-section { margin-bottom: 14px; padding-left: 4px; }
.notif-section:last-child { margin-bottom: 0; }
.notif-section-head { margin-bottom: 8px; }
.notif-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.notif-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}
.notif-row {
  padding: 5px 0;
  border-top: 1px solid #1a2538;
}
.notif-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e5e7eb;
  cursor: pointer;
}
.notif-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}
.notif-input {
  width: 70px;
  padding: 2px 6px;
  margin: 3px 0;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #e5e7eb;
  font-size: 11px;
  font-family: inherit;
}
.notif-hint {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}
.notif-period-group {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.notif-period-btn {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #111827;
  color: #94a3b8;
  cursor: pointer;
}
.notif-period-btn.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.notif-save-btn {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.notif-save-btn:hover { background: #2563eb; }

/* ── Alert levels (VB chart) ─────────────────────────────────────────── */

.tm-level-btn { font-size: 11px; width: auto; padding: 0 8px; font-weight: 700; color: #94a3b8; }
.tm-level-btn.active-level { color: #f59e0b; border-color: #f59e0b; background: rgba(245,158,11,0.12); }

#tm-sec-levels { margin-top: 2px; }
.tm-levels-empty { padding: 8px 12px; font-size: 12px; color: #64748b; }
.tm-level-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid #1f2a3d; border-radius: 8px;
  margin-bottom: 6px; background: #0d1526; flex-wrap: wrap;
}
.tm-level-price { font-size: 13px; font-weight: 800; color: #fbbf24; min-width: 90px; }
.tm-level-meta { font-size: 11px; color: #94a3b8; flex: 1; min-width: 120px; }
.tm-level-state { font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid #334155; background: #111827; color: #94a3b8; font-weight: 800; white-space: nowrap; }
.tm-level-state.near { color: #fbbf24; border-color: rgba(251,191,36,0.55); background: rgba(251,191,36,0.1); }
.tm-level-state.above { color: #22c55e; border-color: rgba(34,197,94,0.35); }
.tm-level-state.below { color: #ef4444; border-color: rgba(239,68,68,0.35); }
.tm-level-state.at { color: #fbbf24; border-color: rgba(251,191,36,0.55); }
.tm-level-state.disabled,
.tm-level-state.no_price,
.tm-level-state.unknown { color: #64748b; }
.tm-level-toggle { font-size: 10px; padding: 2px 8px; border: 1px solid #334155; border-radius: 6px; background: #111827; color: #94a3b8; cursor: pointer; font-weight: 700; }
.tm-level-toggle.on { color: #22c55e; border-color: #22c55e; background: rgba(34,197,94,0.1); }
.tm-level-type { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; cursor: pointer; border: 1px solid #334155; background: #111827; color: #94a3b8; }
.tm-level-type.cross { color: #f59e0b; border-color: #f59e0b; }
.tm-level-type.approach { color: #38bdf8; border-color: #38bdf8; }
.tm-vtrade-open { font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 800; cursor: pointer; border: 1px solid #334155; background: #111827; color: #94a3b8; }
.tm-vtrade-open.long { color: #22c55e; border-color: rgba(34,197,94,0.45); }
.tm-vtrade-open.short { color: #f87171; border-color: rgba(248,113,113,0.45); }
.tm-vtrade-config { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 7px; padding: 6px 8px; border: 1px solid #1f2a3d; border-radius: 8px; background: rgba(15,23,42,.62); }
.tm-vtrade-config-label { font-size: 10px; font-weight: 900; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.tm-vtrade-config label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #cbd5e1; font-weight: 800; }
.tm-vtrade-config input { width: 58px; background: #0d1526; border: 1px solid #334155; border-radius: 6px; color: #e5e7eb; font-size: 11px; padding: 3px 5px; }
.tm-level-dist { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; border: 1px solid #334155; background: #111827; color: #94a3b8; display: inline-flex; align-items: center; gap: 4px; }
.tm-level-dist input { width: 48px; background: #0d1526; border: 1px solid #334155; border-radius: 4px; color: #e5e7eb; font-size: 11px; padding: 2px 4px; }
.tm-level-del { width: 24px; height: 24px; border: none; background: transparent; color: #64748b; font-size: 13px; cursor: pointer; border-radius: 6px; flex-shrink: 0; }
.tm-level-del:hover { color: #ef4444; background: rgba(239,68,68,0.12); }

.tm-vtrade-list { display: flex; flex-direction: column; gap: 6px; }
.tm-vtrade-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 7px 10px; border: 1px solid #1f2a3d; border-radius: 8px; background: #0d1526; }
.tm-vtrade-row.closed, .tm-vtrade-row.cancelled { opacity: .72; }
.tm-vtrade-dir { font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; border: 1px solid #334155; text-transform: uppercase; }
.tm-vtrade-dir.long { color: #22c55e; border-color: rgba(34,197,94,.45); }
.tm-vtrade-dir.short { color: #f87171; border-color: rgba(248,113,113,.45); }
.tm-vtrade-main { font-size: 12px; font-weight: 800; color: #e5e7eb; }
.tm-vtrade-pnl { font-size: 11px; font-weight: 900; margin-left: auto; }
.tm-vtrade-pnl.positive { color: #22c55e; }
.tm-vtrade-pnl.negative { color: #f87171; }
.tm-vtrade-pnl.neutral { color: #94a3b8; }
.tm-vtrade-note { font-size: 11px; color: #94a3b8; min-width: 110px; }
.tm-vtrade-risk { font-size: 10px; color: #cbd5e1; padding: 2px 6px; border-radius: 999px; background: rgba(30,41,59,.72); border: 1px solid rgba(71,85,105,.7); }
.tm-vtrade-close, .tm-vtrade-cancel { font-size: 10px; padding: 2px 7px; border-radius: 6px; border: 1px solid #334155; background: #111827; color: #94a3b8; cursor: pointer; font-weight: 700; }
.tm-vtrade-close { color: #38bdf8; border-color: rgba(56,189,248,.38); }
.tm-vtrade-cancel { color: #f59e0b; border-color: rgba(245,158,11,.38); }
.tm-vtrade-status { font-size: 10px; color: #64748b; font-weight: 800; text-transform: uppercase; }

.tc-level-label {
  position: absolute; right: 8px; transform: translateY(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 2px 6px; background: rgba(2,23,42,0.92);
  border: 1px solid rgba(245,158,11,0.6); border-radius: 4px;
  font: 600 11px/1.6 "Segoe UI",system-ui,sans-serif; color: #fbbf24; white-space: nowrap;
  pointer-events: auto; z-index: 6;
}
.tc-level-name { pointer-events: none; }
.tc-level-dist { font-size: 10px; pointer-events: none; }
.tc-level-dist.up { color: #22c55e; }
.tc-level-dist.down { color: #ef4444; }
.tc-level-del {
  width: 16px; height: 16px; padding: 0; border: none; background: transparent;
  color: #64748b; font-size: 11px; cursor: pointer; border-radius: 4px; line-height: 1;
}
.tc-level-del:hover { color: #ef4444; background: rgba(239,68,68,0.15); }

.tc-info { font: 11px/1.45 "Segoe UI",system-ui,sans-serif; }
.tc-info-symbol { font-size: 12px; margin-bottom: 2px; color: #f1f5f9; }
.tc-info-time { color: #94a3b8; margin-bottom: 3px; font-size: 10px; }
.tc-info-cursor { display: flex; justify-content: space-between; gap: 10px; margin: 3px 0 4px; padding: 3px 6px; border-radius: 6px; background: rgba(56,189,248,0.12); color: #93c5fd; }
.tc-info-cursor b { color: #f8fafc; font-size: 12px; letter-spacing: .01em; }
.tc-info-ohlc { display: flex; flex-direction: column; gap: 2px; }
.tc-info-metrics { color: #64748b; margin-top: 4px; border-top: 1px dashed rgba(148,163,184,0.25); padding-top: 4px; }
.tc-info-up { color: #22c55e; }
.tc-info-down { color: #ef4444; }
