/* ═══════════════════════════════════════════════════════════════════
   NLC SIGNAL PRO — Dark Terminal Trading Aesthetic
   Palette: Volcanic Glass + Acid Neon accents
   Fonts: Syne (display) + Space Mono (data) + Outfit (body)
═══════════════════════════════════════════════════════════════════ */

:root {
  /* Core palette */
  --bg-void:       #080B0F;
  --bg-deep:       #0D1117;
  --bg-panel:      #111820;
  --bg-card:       #141C26;
  --bg-card-hover: #1A2535;
  --bg-elevated:   #1E2D3D;
  --border-dim:    #1E2D3D;
  --border-glow:   #2A3F55;

  /* Signal colors */
  --buy:           #00E5A0;
  --buy-dim:       rgba(0, 229, 160, 0.12);
  --buy-glow:      rgba(0, 229, 160, 0.35);
  --sell:          #FF4560;
  --sell-dim:      rgba(255, 69, 96, 0.12);
  --sell-glow:     rgba(255, 69, 96, 0.35);
  --neutral:       #7B8FA6;
  --neutral-dim:   rgba(123, 143, 166, 0.12);

  /* Accent */
  --accent:        #F0B429;
  --accent-dim:    rgba(240, 180, 41, 0.15);
  --accent-glow:   rgba(240, 180, 41, 0.4);
  --accent-blue:   #3D9EFF;
  --accent-purple: #9B6DFF;

  /* Text */
  --text-primary:  #E8EDF5;
  --text-secondary:#8FA3B8;
  --text-muted:    #4A6070;
  --text-dim:      #2A3F55;

  /* Fonts */
  --font-display:  'Syne', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --font-body:     'Outfit', sans-serif;

  /* Sizing */
  --header-h:      64px;
  --ticker-h:      36px;
  --sidebar-w:     280px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
}

/* ─── RESET ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ─── HEADER ─────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.logo-icon {
  color: var(--accent);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 14px var(--accent-glow)); }
}
.logo-accent { color: var(--accent); }

.header-badges { display: flex; gap: 8px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  font-weight: 700;
}
.badge-live {
  background: var(--sell-dim);
  color: var(--sell);
  border: 1px solid var(--sell);
  display: flex;
  align-items: center;
  gap: 5px;
}
.badge-nlc {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(240,180,41,0.4);
}
.pulse-dot {
  width: 6px; height: 6px;
  background: var(--sell);
  border-radius: 50%;
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Session Tracker */
.header-center { flex: 1; display: flex; justify-content: center; }
.session-tracker {
  display: flex;
  gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 4px;
}
.session-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  min-width: 80px;
}
.session-item.active {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-blue);
}
.session-item.active .session-dot { background: var(--buy); box-shadow: 0 0 6px var(--buy-glow); }
.session-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-bottom: 2px;
}
.session-name {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.session-item.active .session-name { color: var(--accent-blue); }
.session-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Clock */
.header-right { display: flex; align-items: center; gap: 16px; }
.live-clock { text-align: right; }
.clock-time {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}
.clock-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.header-controls { display: flex; gap: 6px; }
.ctrl-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.ctrl-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  width: auto;
  padding: 0 8px;
}

/* ─── NEWS TICKER ─────────────────────────────────────────────────── */
.news-ticker-bar {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: var(--ticker-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 99;
}
.ticker-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-right: 1px solid var(--border-glow);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-content {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  padding-left: 100%;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ─── MAIN LAYOUT ─────────────────────────────────────────────────── */
.app-main {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
  gap: 0;
  margin-top: calc(var(--header-h) + var(--ticker-h));
  min-height: calc(100vh - var(--header-h) - var(--ticker-h));
}

/* ─── SIDEBARS ─────────────────────────────────────────────────────── */
.sidebar-left, .sidebar-right {
  background: var(--bg-deep);
  border-right: 1px solid var(--border-dim);
  padding: 16px;
  overflow-y: auto;
  height: calc(100vh - var(--header-h) - var(--ticker-h));
  position: sticky;
  top: calc(var(--header-h) + var(--ticker-h));
}
.sidebar-right { border-right: none; border-left: 1px solid var(--border-dim); }

.sidebar-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-dim);
}
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }

.section-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-tag {
  font-size: 0.55rem;
  color: var(--sell);
  background: var(--sell-dim);
  border: 1px solid var(--sell);
  padding: 1px 5px;
  border-radius: 2px;
  animation: pulseDot 1.5s ease-in-out infinite;
}

/* Market Stats */
.market-stats { display: flex; flex-direction: column; gap: 8px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
}
.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-value.accent { color: var(--accent); }
.stat-value.buy { color: var(--buy); }
.stat-value.sell { color: var(--sell); }
.stat-value.neutral { color: var(--neutral); }
.stat-value.mono { font-size: 0.7rem; }

/* NLC Steps */
.nlc-steps { display: flex; flex-direction: column; gap: 6px; }
.nlc-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
  transition: border-color 0.2s;
}
.nlc-step:hover { border-color: var(--accent); }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-info { display: flex; flex-direction: column; gap: 2px; }
.step-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}
.step-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Top Movers */
.top-movers-list { display: flex; flex-direction: column; gap: 6px; }
.mover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.mover-item:hover { border-color: var(--border-glow); background: var(--bg-card-hover); }
.mover-pair {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
}
.mover-change {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}
.mover-change.up { color: var(--buy); }
.mover-change.down { color: var(--sell); }

/* ─── FILTER BAR ─────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-dim);
  position: sticky;
  top: calc(var(--header-h) + var(--ticker-h));
  z-index: 50;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tab {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  background: var(--bg-panel);
  transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--border-glow); color: var(--text-secondary); }
.filter-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.filter-right { display: flex; gap: 8px; align-items: center; }
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent-blue); }
.search-icon { color: var(--text-muted); font-size: 0.9rem; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.75rem;
  width: 120px;
}
.search-box input::placeholder { color: var(--text-muted); }
.sort-select {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
}

/* ─── SIGNALS CENTER ─────────────────────────────────────────────── */
.signals-center {
  background: var(--bg-void);
  overflow-y: auto;
}

.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

/* ─── SIGNAL CARD ─────────────────────────────────────────────────── */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.signal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border-dim);
  transition: background 0.25s;
}
.signal-card.buy::before { background: var(--buy); box-shadow: 0 0 8px var(--buy-glow); }
.signal-card.sell::before { background: var(--sell); box-shadow: 0 0 8px var(--sell-glow); }
.signal-card.neutral::before { background: var(--neutral); }

.signal-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.signal-card.buy:hover { border-color: var(--buy); box-shadow: 0 8px 24px var(--buy-dim); }
.signal-card.sell:hover { border-color: var(--sell); box-shadow: 0 8px 24px var(--sell-dim); }

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.card-pair-info { display: flex; flex-direction: column; gap: 2px; }
.card-pair-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.card-pair-type {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.card-signal-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
}
.card-signal-badge.buy {
  background: var(--buy-dim);
  color: var(--buy);
  border: 1px solid rgba(0,229,160,0.4);
}
.card-signal-badge.sell {
  background: var(--sell-dim);
  color: var(--sell);
  border: 1px solid rgba(255,69,96,0.4);
}
.card-signal-badge.neutral {
  background: var(--neutral-dim);
  color: var(--neutral);
  border: 1px solid rgba(123,143,166,0.3);
}

/* Card Price */
.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.card-price {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-change {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}
.card-change.up { color: var(--buy); }
.card-change.down { color: var(--sell); }

/* Confluence Bar */
.confluence-bar {
  margin-bottom: 10px;
}
.conf-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.conf-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.conf-score {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
}
.conf-track {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.conf-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.conf-fill.buy { background: linear-gradient(90deg, var(--buy), #00FFB3); }
.conf-fill.sell { background: linear-gradient(90deg, var(--sell), #FF8FA0); }
.conf-fill.neutral { background: var(--neutral); }

/* NLC Mini Indicators */
.card-nlc-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.nlc-dot {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.nlc-dot.active {
  background: var(--buy-dim);
  color: var(--buy);
  border: 1px solid rgba(0,229,160,0.3);
}
.nlc-dot.inactive {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-dim);
}
.nlc-dot.sell-active {
  background: var(--sell-dim);
  color: var(--sell);
  border: 1px solid rgba(255,69,96,0.3);
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border-dim);
}
.card-session {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}
.card-session.ny-active { color: var(--accent-blue); }
.card-strength {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
}
.card-strength.strong { color: var(--accent); }
.card-strength.medium { color: var(--text-secondary); }
.card-strength.weak { color: var(--text-muted); }

/* New signal flash */
.signal-card.new-signal {
  animation: newSignalFlash 1.5s ease-out;
}
@keyframes newSignalFlash {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 20px 4px var(--accent-glow); }
  100% { box-shadow: none; }
}

/* ─── NEWS FEED ─────────────────────────────────────────────────── */
.news-feed { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.news-item {
  padding: 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--border-dim);
  transition: all 0.2s;
  cursor: pointer;
}
.news-item:hover { background: var(--bg-card-hover); }
.news-item.high { border-left-color: var(--sell); }
.news-item.medium { border-left-color: var(--accent); }
.news-item.low { border-left-color: var(--neutral); }

.news-impact-badge {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: inline-block;
}
.news-impact-badge.high { background: var(--sell-dim); color: var(--sell); }
.news-impact-badge.medium { background: var(--accent-dim); color: var(--accent); }
.news-impact-badge.low { background: var(--neutral-dim); color: var(--neutral); }

.news-headline {
  font-size: 0.72rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.news-time {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
}
.news-pairs {
  display: flex;
  gap: 3px;
}
.news-pair-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  padding: 1px 4px;
  background: var(--bg-elevated);
  color: var(--accent-blue);
  border-radius: 2px;
}

/* ─── ECONOMIC CALENDAR ─────────────────────────────────────────── */
.econ-calendar { display: flex; flex-direction: column; gap: 6px; }
.econ-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
}
.econ-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 40px;
}
.econ-flag { font-size: 0.8rem; }
.econ-info { flex: 1; }
.econ-name {
  font-size: 0.68rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.econ-impact {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  margin-top: 2px;
}
.econ-impact.high { color: var(--sell); }
.econ-impact.medium { color: var(--accent); }
.econ-impact.low { color: var(--neutral); }

/* ─── SENTIMENT GAUGE ─────────────────────────────────────────────── */
.sentiment-panel { padding: 8px 0; }
.sentiment-gauge { margin-bottom: 12px; }
.gauge-track {
  height: 8px;
  background: linear-gradient(90deg, var(--sell) 0%, var(--neutral) 50%, var(--buy) 100%);
  border-radius: 4px;
  position: relative;
  margin-bottom: 6px;
}
.gauge-needle {
  position: absolute;
  top: -4px;
  width: 4px; height: 16px;
  background: var(--text-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 1s ease;
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}
.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
}
.sell-label { color: var(--sell); }
.neutral-label { color: var(--neutral); }
.buy-label { color: var(--buy); }
.sentiment-stats { display: flex; justify-content: space-around; }
.sent-stat { text-align: center; }
.sent-label { display: block; font-size: 0.6rem; color: var(--text-muted); margin-bottom: 2px; }
.sent-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

/* ─── MODAL ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.signal-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 680px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.modal-overlay.open .signal-modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-dim);
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  z-index: 1;
}
.modal-pair-info { display: flex; align-items: center; gap: 10px; }
.modal-pair-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-pair-type {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
}
.modal-signal-badge {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.1em;
}
.modal-signal-badge.buy {
  background: var(--buy-dim);
  color: var(--buy);
  border: 1px solid var(--buy);
  box-shadow: 0 0 16px var(--buy-glow);
}
.modal-signal-badge.sell {
  background: var(--sell-dim);
  color: var(--sell);
  border: 1px solid var(--sell);
  box-shadow: 0 0 16px var(--sell-glow);
}
.modal-signal-badge.neutral {
  background: var(--neutral-dim);
  color: var(--neutral);
  border: 1px solid var(--neutral);
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--sell-dim); color: var(--sell); }

.modal-body { padding: 20px 24px; }

.modal-price-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.modal-price-block {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mpb-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.mpb-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.mpb-value.accent { color: var(--accent); }

.modal-section-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-dim);
}

/* NLC Checklist */
.modal-nlc-section { margin-bottom: 20px; }
.nlc-checklist { display: flex; flex-direction: column; gap: 8px; }
.nlc-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
}
.nlc-check-item.passed { border-color: rgba(0,229,160,0.25); background: rgba(0,229,160,0.04); }
.nlc-check-item.failed { border-color: rgba(255,69,96,0.2); }
.check-icon {
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.check-icon.pass { color: var(--buy); }
.check-icon.fail { color: var(--sell); }
.check-icon.warn { color: var(--accent); }
.check-content { flex: 1; }
.check-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: 0.04em;
}
.check-detail {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.check-value {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  flex-shrink: 0;
}
.check-value.bull { background: var(--buy-dim); color: var(--buy); }
.check-value.bear { background: var(--sell-dim); color: var(--sell); }
.check-value.warn { background: var(--accent-dim); color: var(--accent); }
.check-value.neutral { background: var(--neutral-dim); color: var(--neutral); }

/* Trade Levels */
.modal-trade-section { margin-bottom: 20px; }
.trade-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.trade-level-block {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.tl-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.tl-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}
.tl-value.entry { color: var(--accent); }
.tl-value.sl { color: var(--sell); }
.tl-value.tp { color: var(--buy); }
.tl-rr {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modal News */
.modal-news-section { margin-bottom: 16px; }
.modal-news-list { display: flex; flex-direction: column; gap: 6px; }
.modal-news-item {
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-dim);
}
.modal-news-item.high { border-left-color: var(--sell); }
.modal-news-item.medium { border-left-color: var(--accent); }
.modal-news-headline { font-size: 0.72rem; color: var(--text-primary); margin-bottom: 3px; }
.modal-news-time { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-muted); }

.modal-disclaimer {
  font-size: 0.62rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.5;
}

/* ─── LOADING STATE ─────────────────────────────────────────────── */
.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 14px;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.loading-line {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 4px;
  margin-bottom: 8px;
}
.loading-line.short { width: 60%; }
.loading-line.medium { width: 80%; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  :root { --sidebar-w: 240px; }
}
@media (max-width: 960px) {
  .app-main { grid-template-columns: 1fr; }
  .sidebar-left, .sidebar-right {
    position: static;
    height: auto;
    border: none;
    border-bottom: 1px solid var(--border-dim);
  }
  .header-center { display: none; }
  .signals-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 600px) {
  .app-header { padding: 0 12px; }
  .logo-text { display: none; }
  .header-badges { display: none; }
  .modal-price-row { grid-template-columns: repeat(2, 1fr); }
  .trade-levels { grid-template-columns: 1fr; }
}

/* ─── UTILITY ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.up { color: var(--buy); }
.down { color: var(--sell); }
.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }
/* --- LOADING SKELETON -------------------------------------------- */
.loading-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}
.loading-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border-dim) 25%, var(--border) 50%, var(--border-dim) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  width: 100%;
}
.loading-line.short  { width: 45%; }
.loading-line.medium { width: 70%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
