/* ============================================================
   SCALP PRO v9 — REVOLUTION DESIGN SYSTEM
   Dark mode premium | TradingView-inspired | Glass morphism
   ============================================================ */

:root {
  /* Color palette */
  --bg-base:        #0a0e1a;
  --bg-panel:       #0f1629;
  --bg-card:        #141e35;
  --bg-hover:       #1a2540;
  --bg-glass:       rgba(20, 30, 53, 0.85);

  --border:         rgba(255,255,255,0.07);
  --border-light:   rgba(255,255,255,0.12);

  --text-primary:   #e8eaf6;
  --text-secondary: #8892a4;
  --text-muted:     #4a5568;

  --accent:         #4f8ef7;
  --accent-glow:    rgba(79, 142, 247, 0.25);

  --green:          #00d084;
  --green-dim:      rgba(0, 208, 132, 0.15);
  --red:            #ff4757;
  --red-dim:        rgba(255, 71, 87, 0.15);
  --yellow:         #ffa502;
  --yellow-dim:     rgba(255, 165, 2, 0.15);
  --purple:         #a855f7;
  --cyan:           #06b6d4;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --transition: 150ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  text-decoration: none;
}

.topbar-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-glow);
}

.topbar-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: default;
  white-space: nowrap;
}

.pill.green   { border-color: rgba(0,208,132,0.3); color: var(--green); background: var(--green-dim); }
.pill.red     { border-color: rgba(255,71,87,0.3);  color: var(--red);   background: var(--red-dim); }
.pill.yellow  { border-color: rgba(255,165,2,0.3);  color: var(--yellow); background: var(--yellow-dim); }
.pill.blue    { border-color: rgba(79,142,247,0.3); color: var(--accent); background: var(--accent-glow); }
.pill.purple  { border-color: rgba(168,85,247,0.3); color: var(--purple); background: rgba(168,85,247,0.1); }

.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.red   { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.dot.yellow{ background: var(--yellow); }

/* ── MAIN LAYOUT ── */
.main-content {
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ── HERO STATS ROW ── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover { border-color: var(--border-light); }
.stat-card:hover::before { opacity: 1; }

.stat-card.green::before { background: linear-gradient(90deg, var(--green), transparent); opacity: 1; }
.stat-card.red::before   { background: linear-gradient(90deg, var(--red), transparent); opacity: 1; }

.stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--text-primary);
}

.stat-value.green { color: var(--green); }
.stat-value.red   { color: var(--red); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.blue  { color: var(--accent); }

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── GRID LAYOUT ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.dashboard-grid > * { min-width: 0; }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── PANEL ── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel-body { padding: 16px; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
}

.tab {
  flex: 1;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.tab:hover { color: var(--text-secondary); background: var(--bg-card); }
.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  background: rgba(255,255,255,0.1);
}
.tab.active .tab-badge { background: var(--accent); color: white; }

/* ── SIGNAL TABLE ── */
.signal-table {
  width: 100%;
  border-collapse: collapse;
}

.signal-table th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.signal-table th:hover { color: var(--text-secondary); }

.signal-table td {
  padding: 10px 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.signal-table tr:hover td { background: rgba(255,255,255,0.025); }
.signal-table tr:last-child td { border-bottom: none; }

/* Signal row colors */
.signal-table tr.buy td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.signal-table tr.sell td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ── ACTION BADGE ── */
.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.action-badge.buy   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,208,132,0.2); }
.action-badge.sell  { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(255,71,87,0.2); }
.action-badge.wait  { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* ── CONFIDENCE BAR ── */
.conf-bar {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 3px;
}

.conf-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.conf-bar-fill.strong { background: linear-gradient(90deg, var(--green), #26d973); }
.conf-bar-fill.moderate { background: linear-gradient(90deg, var(--yellow), #ffc83d); }
.conf-bar-fill.weak { background: linear-gradient(90deg, var(--text-muted), var(--text-muted)); }

/* ── POSITION CARD ── */
.position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.position-card.has-position {
  border-color: rgba(79,142,247,0.3);
  background: rgba(79,142,247,0.04);
}

.position-card.profit { border-color: rgba(0,208,132,0.3); }
.position-card.loss   { border-color: rgba(255,71,87,0.3); }

.position-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.position-symbol {
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-mono);
}

.position-pnl {
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-mono);
}

.position-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.position-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ── BOT CONTROLS ── */
.bot-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 15px rgba(79,142,247,0.3);
}
.btn-primary:hover { background: #5f9ef8; box-shadow: 0 4px 20px rgba(79,142,247,0.5); }

.btn-danger {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 15px rgba(255,71,87,0.3);
}
.btn-danger:hover { background: #ff6577; }

.btn-success {
  background: var(--green);
  color: #0a0e1a;
  box-shadow: 0 4px 15px rgba(0,208,132,0.3);
}
.btn-success:hover { background: #26d973; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }

.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-full { width: 100%; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── LOG TERMINAL ── */
.log-terminal {
  background: #070b14;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  max-height: 280px;
  overflow-y: auto;
  color: #8fba8e;
}

.log-entry {
  padding: 1px 0;
  word-break: break-word;
  transition: background var(--transition);
}

.log-entry:hover { background: rgba(255,255,255,0.02); }
.log-entry.buy   { color: var(--green); }
.log-entry.sell  { color: var(--red); }
.log-entry.warn  { color: var(--yellow); }
.log-entry.info  { color: #7ecde8; }
.log-entry.brain { color: var(--purple); }

/* ── BRAIN PANEL ── */
.brain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.brain-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brain-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brain-metric-value {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.brain-metric-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* Weight bars */
.weight-list { display: flex; flex-direction: column; gap: 6px; }

.weight-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weight-label {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 75px;
  font-family: var(--font-mono);
}

.weight-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.weight-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 0.6s ease;
}

.weight-pct {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

/* ── HISTORY TABLE ── */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 8px 10px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.history-table tr:hover td { background: rgba(255,255,255,0.02); }

.trade-won  { color: var(--green); font-weight: 600; }
.trade-lost { color: var(--red);   font-weight: 600; }

/* ── FILTERS ROW ── */
.filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.filter-btn:hover  { border-color: var(--border-light); color: var(--text-secondary); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.filter-btn.active.buy  { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.filter-btn.active.sell { border-color: var(--red);   color: var(--red);   background: var(--red-dim); }

.search-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.conf-input {
  width: 60px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 11px;
  font-family: var(--font-mono);
  outline: none;
  text-align: center;
}

/* ── SL/TP CONFIG ── */
.config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.config-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.config-input {
  width: 56px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
  outline: none;
  text-align: center;
  transition: border-color var(--transition);
}

.config-input:focus { border-color: var(--accent); }

/* ── MARKET CONTEXT BANNER ── */
.market-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.market-banner.trade  { background: rgba(0,208,132,0.08); border: 1px solid rgba(0,208,132,0.2); color: var(--green); }
.market-banner.caution{ background: rgba(255,165,2,0.08);  border: 1px solid rgba(255,165,2,0.2);  color: var(--yellow); }
.market-banner.avoid  { background: rgba(255,71,87,0.08);  border: 1px solid rgba(255,71,87,0.2);  color: var(--red); }

/* ── COUNTDOWN RING ── */
.countdown-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.countdown-svg {
  transform: rotate(-90deg);
  width: 40px;
  height: 40px;
}

.countdown-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}

.countdown-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  stroke-dasharray: 113;
  stroke-dashoffset: 0;
}

.countdown-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ── TOAST NOTIFICATIONS ── */
#alert-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 300px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  font-weight: 500;
  pointer-events: all;
  animation: toastIn 0.3s ease;
}

.toast.buy   { border-color: rgba(0,208,132,0.3);  color: var(--green); }
.toast.sell  { border-color: rgba(255,71,87,0.3);   color: var(--red); }
.toast.info  { border-color: var(--accent-glow);    color: var(--accent); }
.toast.warn  { border-color: rgba(255,165,2,0.3);   color: var(--yellow); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.modal-row:last-child { border-bottom: none; }
.modal-label { color: var(--text-muted); }
.modal-value { font-weight: 600; font-family: var(--font-mono); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── LOGIN SCREEN ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(79,142,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.06) 0%, transparent 50%);
}

.login-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-glow);
}

.login-title { font-size: 18px; font-weight: 700; }
.login-sub   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.input-group {
  position: relative;
  margin-bottom: 12px;
}

.input-field {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text-muted); }

.input-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
}

.input-eye:hover { color: var(--text-secondary); }

.login-error {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-dim);
  color: var(--red);
  font-size: 12px;
  margin-bottom: 10px;
  display: none;
}

.login-error.show { display: block; }

/* ── SIGNAL DETAIL ── */
.signal-pair {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.signal-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.signal-change.up   { color: var(--green); }
.signal-change.down { color: var(--red); }

.rr-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.rr-badge.good { background: rgba(0,208,132,0.1); color: var(--green); }
.rr-badge.ok   { background: rgba(255,165,2,0.1);  color: var(--yellow); }
.rr-badge.bad  { background: rgba(255,71,87,0.1);  color: var(--red); }

/* ── REASON PILLS ── */
.reason-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.reason-pill.positive { border-color: rgba(0,208,132,0.3); color: var(--green); background: var(--green-dim); }
.reason-pill.negative { border-color: rgba(255,71,87,0.3);  color: var(--red);   background: var(--red-dim); }

/* ── FAVORITE STAR ── */
.fav-star {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.fav-star.active { color: var(--yellow); }
.fav-star:hover  { color: var(--yellow); }

/* ── MARKET STATE BADGE ── */
.market-state {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-state.bull     { background: var(--green-dim); color: var(--green); }
.market-state.bear     { background: var(--red-dim);   color: var(--red); }
.market-state.volatile { background: var(--yellow-dim); color: var(--yellow); }
.market-state.lateral  { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.market-state.squeeze  { background: rgba(168,85,247,0.1); color: var(--purple); }
.market-state.divg     { background: rgba(6,182,212,0.1); color: var(--cyan); }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 8px;
  text-align: center;
}

.empty-icon { font-size: 28px; opacity: 0.4; }
.empty-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.empty-sub   { font-size: 11px; }

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-shine {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── STATUS INDICATOR ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.live    { background: var(--green); box-shadow: 0 0 0 3px rgba(0,208,132,0.2); animation: pulse-green 2s infinite; }
.status-dot.pending { background: var(--yellow); animation: pulse-yellow 1.5s infinite; }
.status-dot.dead    { background: var(--red); }
.status-dot.idle    { background: var(--text-muted); }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,208,132,0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(0,208,132,0.05); }
}

@keyframes pulse-yellow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── SORTINO/DRAWDOWN BADGES ── */
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.metric-badge.positive { background: var(--green-dim); color: var(--green); }
.metric-badge.negative { background: var(--red-dim); color: var(--red); }
.metric-badge.neutral  { background: var(--yellow-dim); color: var(--yellow); }

/* ── PARTIAL TP INDICATOR ── */
.partial-tp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(168,85,247,0.15);
  color: var(--purple);
  border: 1px solid rgba(168,85,247,0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .main-content { padding: 12px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 12px; }
  .topbar-pills { gap: 4px; }
  .pill { padding: 3px 7px; font-size: 11px; }
  .stat-value { font-size: 18px; }
  .panel-header { min-width: 0; }
  .panel-header .tabs { min-width: 0; width: 100%; overflow-x: auto; }
  .panel-header .tab { flex: 0 0 auto; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .filters-row { padding: 8px 10px; gap: 5px; }
  .signal-table td, .signal-table th { padding: 8px 6px; font-size: 11px; }
}

/* ── FADE ANIMATIONS ── */
.fade-in  { animation: fadeIn 0.25s ease; }
.slide-up { animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── TOOLTIP ── */
[data-tip] {
  position: relative;
}

[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  color: var(--text-primary);
}
