/* ==========================================================================
   Trademind.win Dynamic Terminal Components (Charts, Corridors, L2 Book,
   5-Pillar Bars, Heatmap, Sparklines & Auth Modal)
   ========================================================================== */

/* Active Position Cards & Price Corridors */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
.pos-card {
  background: var(--bn-bg-elevated, #121722);
  border: 1px solid var(--bn-border, #1e2634);
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.pos-card:hover,
.pos-card.active-inspect {
  border-color: var(--bn-yellow, #fcd535);
  box-shadow: 0 0 0 1px rgba(252, 213, 53, 0.25);
}
.pos-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}
.pos-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.pos-metric-lbl {
  color: var(--bn-text-secondary, #848e9c);
  font-size: 10.5px;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.pos-metric-val {
  font-weight: 700;
  color: var(--bn-text-primary, #eaecef);
}

.corridor-wrap {
  background: #0c1017;
  border: 1px solid var(--bn-border, #1e2634);
  border-radius: 8px;
  padding: 9px 11px;
}
.corridor-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}
.corridor-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(246, 70, 93, 0.45) 0%, rgba(59, 130, 246, 0.35) 45%, rgba(14, 203, 129, 0.55) 100%);
}
.corridor-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 14px;
  background: #eaecef;
  border-radius: 2px;
}
.corridor-dot {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bn-yellow, #fcd535);
  border: 2px solid #0b0e11;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(252, 213, 53, 0.85);
}

/* 5-Pillar Confluence & Microstructure Factor Bars */
.factor-row {
  margin-bottom: 10px;
}
.factor-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.factor-track {
  height: 7px;
  background: #1a2230;
  border-radius: 999px;
  overflow: hidden;
}
.factor-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* L2 Order Book Depth Ladder */
.depth-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 3px 8px;
  font-size: 11.5px;
  margin-bottom: 2px;
  border-radius: 4px;
  overflow: hidden;
}
.depth-bg-bid {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(14, 203, 129, 0.16);
  z-index: 0;
}
.depth-bg-ask {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(246, 70, 93, 0.16);
  z-index: 0;
}
.depth-row span {
  position: relative;
  z-index: 1;
}

/* Market Conviction Heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}
.heat-tile {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--bn-border, #1e2634);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.heat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--bn-yellow, #fcd535);
}
.heat-long {
  background: linear-gradient(145deg, rgba(14, 203, 129, 0.18), rgba(17, 22, 29, 0.92));
  border-color: rgba(14, 203, 129, 0.38);
}
.heat-short {
  background: linear-gradient(145deg, rgba(246, 70, 93, 0.18), rgba(17, 22, 29, 0.92));
  border-color: rgba(246, 70, 93, 0.38);
}
.heat-neutral {
  background: var(--bn-bg-elevated, #121722);
}

/* Live Telemetry Activity Log */
.log-box {
  max-height: 310px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-item {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #0d1219;
  border-left: 3px solid var(--bn-border, #1e2634);
}

/* Login / Registration (Sign Up) Modal */
.tm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.tm-modal-backdrop.open {
  display: flex;
}
.tm-auth-box {
  width: 100%;
  max-width: 440px;
  background: #11161d;
  border: 1px solid #2b3139;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}
.tm-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #0b0e11;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.tm-auth-tab {
  padding: 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  color: #848e9c;
  transition: all 0.15s ease;
}
.tm-auth-tab.active {
  background: var(--bn-yellow, #fcd535);
  color: #0b0e11;
}

/* Sidebar User Account Card */
.sb-user-card {
  margin: 12px 10px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(252, 213, 53, 0.08), rgba(18, 23, 34, 0.95));
  border: 1px solid rgba(252, 213, 53, 0.28);
}
.sb-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bn-yellow, #fcd535);
  color: #0b0e11;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}
.sb-avatar.guest {
  background: #2b3139;
  color: #eaecef;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0ecb81;
  box-shadow: 0 0 8px #0ecb81;
  display: inline-block;
  animation: tmPulse 1.6s infinite;
}
@keyframes tmPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

