/* ==========================================================================
   MAN10X SIGNAL HUB - FINTECH CYBER DARK DESIGN SYSTEM
   Modern, Ultra-responsive, Glassmorphic Financial Trading Marketplace
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(25, 36, 60, 0.85);
  --bg-modal: #0d1424;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.25);
  --border-active: rgba(16, 185, 129, 0.4);

  /* Neon Financial Accents */
  --color-emerald: #10b981;
  --color-emerald-glow: rgba(16, 185, 129, 0.25);
  --color-cyan: #00f2fe;
  --color-cyan-glow: rgba(0, 242, 254, 0.25);
  --color-ruby: #f43f5e;
  --color-ruby-glow: rgba(244, 63, 94, 0.25);
  --color-amber: #f59e0b;
  --color-amber-glow: rgba(245, 158, 11, 0.25);
  --color-purple: #8b5cf6;
  --color-blue: #3b82f6;

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #ffffff;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.35);
  --shadow-glow-cyan: 0 0 25px rgba(0, 242, 254, 0.35);
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dark-theme {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Generic Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

/* ==================== APP HEADER ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1560px;
  margin: 0 auto;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.logo-icon {
  font-size: 22px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.accent-text {
  background: linear-gradient(90deg, #00f2fe, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--color-emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.live-clock {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-cyan);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-emerald);
}

.glow-button {
  position: relative;
  overflow: hidden;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-size: 0.8rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ==================== TICKER STRIP ==================== */
.market-ticker-strip {
  background: rgba(14, 22, 38, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 6px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.market-ticker-strip::-webkit-scrollbar {
  display: none;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  font-size: 0.82rem;
  max-width: 1560px;
  margin: 0 auto;
}

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

.ticker-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.ticker-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.ticker-change.up {
  color: var(--color-emerald);
  font-family: var(--font-mono);
  font-weight: 600;
}

.stage-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.stage-confirmed-bull {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.alloc-val {
  color: var(--color-cyan);
  font-weight: 700;
  font-family: var(--font-mono);
}

.strat-val {
  color: #f1f5f9;
  font-weight: 600;
}

.lmp-val {
  color: var(--color-emerald);
  font-weight: 600;
}

.ticker-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==================== STATS OVERVIEW ==================== */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.bg-blue { background: rgba(59, 130, 246, 0.15); }
.bg-green { background: rgba(16, 185, 129, 0.15); }
.bg-purple { background: rgba(139, 92, 246, 0.15); }
.bg-amber { background: rgba(245, 158, 11, 0.15); }

.stat-main-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.color-emerald { color: var(--color-emerald) !important; }
.color-cyan { color: var(--color-cyan) !important; }
.color-ruby { color: var(--color-ruby) !important; }
.color-amber { color: var(--color-amber) !important; }

.stat-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.stat-sub {
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-sub.up {
  color: var(--color-emerald);
}

.stat-desc {
  color: var(--text-muted);
}

/* ==================== CONTROL TOOLBAR ==================== */
.control-toolbar {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 260px;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  opacity: 0.6;
}

.search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 32px 8px 36px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.btn-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.select-control {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.select-control:focus {
  border-color: var(--color-cyan);
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.pill {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 6px;
}

.pill:hover {
  color: #ffffff;
}

.pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.view-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.view-btn:hover {
  color: #ffffff;
}

.view-btn.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--color-cyan);
  border-color: rgba(0, 242, 254, 0.4);
  font-weight: 700;
}

.view-btn.icon-only {
  padding: 6px 10px;
}

/* ==================== SIGNALS SECTION ==================== */
.signals-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.count-badge {
  background: rgba(0, 242, 254, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.filter-status-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== SIGNAL CARDS GRID ==================== */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.signal-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition-normal);
  border: 1px solid var(--border-color);
}

.signal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.15);
}

.signal-card.new-pulse {
  animation: card-appear-glow 1.5s ease-out;
}

@keyframes card-appear-glow {
  0% { transform: scale(0.96); box-shadow: 0 0 35px var(--color-emerald); border-color: var(--color-emerald); }
  100% { transform: scale(1); }
}

/* Card Header */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ticker-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-symbol {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.02em;
}

.exchange-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.ticker-company-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.card-status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-new {
  background: rgba(0, 242, 254, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 242, 254, 0.4);
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-profit {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid var(--color-emerald);
}

.badge-hit-tp {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-amber);
  border: 1px solid var(--color-amber);
}

.badge-stopped {
  background: rgba(244, 63, 94, 0.2);
  color: var(--color-ruby);
  border: 1px solid var(--color-ruby);
}

/* Strategy Banner */
.card-strategy-banner {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid var(--color-cyan);
}

.strategy-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

.confidence-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Price Levels 3-Column Grid */
.price-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.price-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pi-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pi-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.pi-sub {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Visual Risk-Reward Range Bar */
.visual-range-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.range-fill {
  position: absolute;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-ruby) 0%, var(--color-cyan) 40%, var(--color-emerald) 100%);
}

.range-marker-entry {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 14px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 8px #ffffff;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Card Metrics Strip */
.card-metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.metric-item strong {
  color: #ffffff;
  font-family: var(--font-mono);
}

/* Card Action Footer */
.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-footer-actions button {
  flex: 1;
}

/* ==================== FINANCIAL TABLE VIEW ==================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
}

.financial-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.financial-table th {
  background: rgba(14, 22, 38, 0.95);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.financial-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  white-space: nowrap;
}

.financial-table tbody tr {
  transition: var(--transition-fast);
}

.financial-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tbl-ticker {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
}

.tbl-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

.modal-card {
  background: var(--bg-modal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.modal-md { max-width: 580px; }
.modal-lg { max-width: 820px; }

.modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-ticker {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.modal-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.modal-close {
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 6px;
  border-radius: 6px;
}

.modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Mini Chart Box */
.chart-container-box {
  background: #080c14;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}

.chart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.chart-sub {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-cyan);
}

.svg-chart-wrap svg {
  width: 100%;
  height: 200px;
}

/* Modal Levels Grid */
.modal-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.level-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.box-entry { border-color: rgba(0, 242, 254, 0.3); }
.box-tp { border-color: rgba(16, 185, 129, 0.3); }
.box-sl { border-color: rgba(244, 63, 94, 0.3); }

.lvl-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.lvl-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
}

.lvl-note {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Modal Details Box */
.modal-details-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.details-text {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.details-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.meta-pill {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
}

.meta-pill strong {
  color: #ffffff;
}

/* Modal Action Bar */
.modal-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px 16px;
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.action-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.action-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn-profit {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-profit:hover {
  background: var(--color-amber);
  color: #000000;
}

.btn-stop {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-ruby);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.btn-stop:hover {
  background: var(--color-ruby);
  color: #ffffff;
}

.btn-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-delete {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-delete:hover {
  background: var(--color-ruby);
  color: #ffffff;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 12px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-cyan);
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
}

/* API Docs Body */
.api-docs-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.api-code-block {
  background: #080c14;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
}

.code-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 6px;
}

.api-code-block code,
.api-code-block pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0e172a;
  border: 1px solid var(--color-emerald);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), var(--shadow-glow-emerald);
  padding: 12px 18px;
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-content {
  display: flex;
  flex-direction: column;
}

.toast-title {
  font-weight: 700;
  color: var(--color-emerald);
}

.toast-msg {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.empty-desc {
  color: var(--text-secondary);
  max-width: 480px;
  font-size: 0.85rem;
}

/* Spinner Icon */
.spinning {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-levels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
  .signals-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
}

/* ==========================================================================
   SIGNAL TYPE TABS
   ========================================================================== */
.signal-tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.signal-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.signal-tab.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border-color: var(--color-emerald);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.tab-icon {
  font-size: 1.1rem;
}

/* Fix dark calendar icon on date inputs for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.6;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ==================== ZWEIG QUANTITATIVE MODEL STYLES ==================== */
.zweig-hero-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(13, 20, 36, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.zweig-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #f43f5e 0%, #f59e0b 25%, #10b981 65%, #8b5cf6 100%);
}

.zweig-score-display {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.zweig-score-badge-huge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 2px solid var(--color-emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

.zweig-score-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: var(--font-mono);
}

.zweig-score-max {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

.zweig-info-group {
  flex: 1;
  min-width: 280px;
}

.zweig-regime-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zweig-nav-line {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.zweig-strategy-line {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Gauge Meter Bar */
.zweig-meter-container {
  margin-top: 20px;
}

.zweig-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.zweig-gauge-bar {
  height: 12px;
  width: 100%;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  position: relative;
  background: #1e293b;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.gauge-seg {
  height: 100%;
}
.seg-bear { width: 30%; background: #f43f5e; }
.seg-def { width: 15%; background: #f97316; }
.seg-neu { width: 20%; background: #eab308; }
.seg-bull { width: 15%; background: #10b981; }
.seg-super { width: 20%; background: #a855f7; }

.zweig-gauge-indicator {
  position: relative;
  width: 100%;
  height: 14px;
}

.zweig-gauge-pointer {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pillar Cards Grid */
.zweig-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .zweig-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.pillar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-score-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.pillar-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.pillar-item-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 12px 14px;
  transition: var(--transition-fast);
}

.pillar-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.pillar-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.pillar-item-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.pillar-item-pts {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.pillar-item-cond {
  font-size: 0.85rem;
  color: var(--color-cyan);
  margin-bottom: 4px;
  font-weight: 500;
}

.pillar-item-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Action Matrix Table */
.matrix-row-highlight {
  background: rgba(16, 185, 129, 0.12) !important;
  border-left: 4px solid var(--color-emerald);
}

.matrix-row-highlight td {
  font-weight: 600 !important;
  color: #fff !important;
}

/* Trading Playbook Modal Styles */
.playbook-tab-btn {
  transition: all 0.2s ease;
  white-space: nowrap;
}
.playbook-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
.playbook-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.playbook-card.emerald {
  border-left: 4px solid var(--color-emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.playbook-card.cyan {
  border-left: 4px solid var(--color-cyan);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.playbook-card.amber {
  border-left: 4px solid var(--color-amber);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.playbook-card.ruby {
  border-left: 4px solid var(--color-ruby);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.btn-guide-sm {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
  transition: all 0.2s ease;
}
.btn-guide-sm:hover {
  background: #f59e0b;
  color: #000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}


