/* GLOBAL */

body {
  margin: 0;
  padding: 0;
  font-family: "IRANSans", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
  color: #e5e5e5;
  transition: background 0.3s, color 0.3s;
  
}
body:not(.dark-mode) {
  background: #f3f4f6;
  color: #111827;
}
#app-root {
  min-height: 100vh;
}

/* Prevent background scroll when overlays are open */
.no-scroll {
  overflow: hidden;
  height: 100vh;
}
 
/* TOP NAV */
.top-nav {
  width: 95%;
  background: rgba(15, 23, 42, 0.96);
  color: white;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1f2937;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.hamburger-btn {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
}
.hamburger-btn:hover {
  background: rgba(31, 41, 55, 0.9);
  transform: translateY(-1px);
}
.app-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.top-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-49px);
}
.top-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.top-link:hover {
  color: #7dd3fc;
  cursor: pointer;
  font-size: 14px;
  text-shadow: #00e5ff;
}
.theme-btn {
  cursor: pointer;
  font-size: 18px;
  padding: 4px 9px;
  background: #020617;
  border-radius: 999px;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.75);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.theme-btn:hover {
  background: #111827;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.7);
}
@media (max-width: 768px) {
  .app-title {
    font-size: 17px;
  }
  
}

/* ANALYZE STRIP */
.analyze-strip {
  position: fixed;
  top: 56px;
  left: 0;
  width: 100%;
  z-index: 1002;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid #1f2937;
  padding: 8px 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
body:not(.dark-mode) .analyze-strip {
  background: #ffffff;
  border-color: #e5e7eb;
}

/* APP SHELL */
.app-shell {
  display: flex;
  position: relative;
  max-width: 1600px;
  margin: 70px auto 0;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  left: 0;
  top: 104px;
  bottom: 0;
  width: 260px;
  background: rgba(15, 23, 42, 0.98);
  border-right: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px;
  z-index: 999;
  transform: translateX(-290px);
  transition: transform 0.25s ease-out;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #374151 transparent;
}
.sidebar-open {
  transform: translateX(0);
}
.sidebar-closed {
  transform: translateX(-280px);
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: #374151;
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* SIDEBAR content */
.sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  margin: 6px auto 16px;
}
.sidebar-bottom-icons {
  margin-top: auto;
  margin-bottom: 4px;
}
.sidebar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.05s, box-shadow 0.12s, color 0.12s;
}
.sidebar-icon-btn:hover {
  background: #111827;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px #1d4ed8;
  color: #93c5fd;
}

/* OVERLAY for sidebar */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: none;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
  z-index: 998;
  pointer-events: none;
}
.sidebar-overlay-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* MAIN CONTAINER */
#main-container {
  flex: 1;
  margin-left: 0;
  padding: 10px 20px 50px;
  transition: margin-left 0.25s ease-out;
  position: relative;
  z-index: 1;
}
.sidebar-pushed {
  margin-left: 260px !important;
}

/* BUTTON ROWS */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  max-width: 100%;
  overflow-x: hidden;
}


/* MOBILE */
@media (max-width: 768px) {
  .sidebar {
    width: 85%;
    transform: translateX(-105%);
  }
  .sidebar-open {
    transform: translateX(0);
  }
  .sidebar-closed {
    transform: translateX(-105%);
  }
  #main-container {
    margin-left: 0 !important;
  }
  .sidebar-pushed {
    margin-left: 0 !important;
  }
  .tv-row {
    flex-wrap: wrap;
  }
  .tv-panel {
    flex: 1 1 100%;
  }
}

/* SETTINGS COLUMN IN SIDEBAR */
.settings-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CARDS */
.card {
  background: rgba(15, 23, 42, 0.9);
  padding: 13px 14px 14px;
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}
body:not(.dark-mode) .card {
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}
.card > h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

/* INPUTS & BUTTONS */
.dash-dropdown,
.dash-input {
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
}
.dash-input {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
}
body:not(.dark-mode) .dash-input {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}
.dash-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
}

.dash-button {
  margin-top: 0;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: 0.15s ease;
   max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}
.dash-button.primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: white;
}
.dash-button.primary:hover {
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.45);
}
.dash-button.secondary {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #374151;
}
body:not(.dark-mode) .dash-button.secondary {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}
.dash-button.ghost {
  background: transparent;
  border: 1px solid #4b5563;
  color: #e5e7eb;
}
body:not(.dark-mode) .dash-button.ghost {
  border-color: #d1d5db;
  color: #111827;
}

/* RESULTS GRID */
.two-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0 0 32px 0;
  align-items: flex-start;
}
@media (max-width: 1200px) {
  .two-symbol-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* TITLES & TEXT */
.analysis-title {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.result-title {
  text-align: center;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 800;
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.summary-label {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 800;
}

/* SUMMARY BLOCK */
.summary-block {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 13px;
  padding: 12px 14px 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  margin-bottom: 14px;
  border: 1px solid #1f2937;
}
body:not(.dark-mode) .summary-block {
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  border-color: #e5e7eb;
}

/* SIGNAL TABLE – FIXED VERSION */
.signal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 10px;              /* کوچکتر و جمع‌وجورتر */
  table-layout: fixed;          /* مهم‌ترین بخش */
  word-wrap: break-word;        /* جلوگیری از ترکیدن جدول */
  overflow: hidden;
}

.signal-table th {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: white;
  padding: 4px;                 /* کمتر از قبل */
  text-align: center;
  font-weight: 700;
  font-size: 11px;
}

body:not(.dark-mode) .signal-table th {
  background: #0ea5e9;
}

.signal-table td {
  padding: 4px;                 /* کمتر از قبل */
  border-bottom: 1px solid #1f2937;
  text-align: center;
  font-size: 10px;
  white-space: nowrap;          /* ردیف‌ها جمع‌تر */
  overflow: hidden;
  text-overflow: ellipsis;      /* اگر متن زیاد بود، سه‌نقطه */
}

body:not(.dark-mode) .signal-table td {
  border-bottom: 1px solid #e5e7eb;
}

/* INDICATOR TEXT & SIGNAL COLORS */
.indicator-text {
  white-space: pre-line;
  text-align: center;
  margin: 6px 0 8px;
  font-size: 12px;
  opacity: 0.9;
}
.signal-positive {
  color: #22c55e;
  font-weight: 700;
}
.signal-negative {
  color: #ef4444;
  font-weight: 700;
}
.signal-neutral {
  color: #eab308;
  font-weight: 700;
}

/* TRADINGVIEW PANELS */
.tv-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: space-between;
}
.tv-panel {
  flex: 0 0 32%;
  min-width: 0;
  background: transparent;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ANALYSIS BLOCK */
.analysis-block {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 13px;
  padding: 10px 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.85);
  border: 1px solid #111827;
  position: relative;
  z-index: 1;
}
body:not(.dark-mode) .analysis-block {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  border-color: #e5e7eb;
}

/* TIMEFRAME CHECKLIST */
.dash-checklist {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 6px;
  row-gap: 4px;
  margin-top: 6px;
}
.dash-checklist label {
  display: flex !important;
  align-items: center;
  margin: 0;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
body:not(.dark-mode) .dash-checklist label {
  background: #f9fafb;
  border-color: #d1d5db;
}
.dash-checklist input {
  margin-right: 4px;
}

/* SETTINGS MODAL (centered) */
.settings-modal {
  position: fixed;
  margin-top: 70PX;
  top: 50%;
  left: 50%;
 transform: translate(-50%, -50%);

  width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 3000 !important;


  animation: settingsFadeIn 0.3s ease-out;
}
body:not(.dark-mode) .settings-modal {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}
@keyframes settingsFadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
@media (max-width: 768px) {
  .settings-modal {
    width: 80%;
    height: 90vh;
    max-height: 90vh;
    padding: 16px;
    z-index: 9999 !important;
  }
    .dash-button {
    flex: 1 1 100%;
    text-align: center;
    font-size: 14px;
    padding: 10px 16px;
  }
  .button-row {
    flex-direction: column;
    align-items: stretch;    
  }

}

/* Modal overlay for settings */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
   z-index: 2999 !important;

}

/* Prob badges */
.prob-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 6px 0 8px;
}
.prob-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #374151;
  background: rgba(17, 24, 39, 0.6);
}
.prob-badge.buy {
  color: #22c55e;
  border-color: #166534;
  background: rgba(34, 197, 94, 0.08);
}
.prob-badge.sell {
  color: #ef4444;
  border-color: #7f1d1d;
  background: rgba(239, 68, 68, 0.08);
}
.prob-badge.up {
  color: #38bdf8;
  border-color: #075985;
  background: rgba(56, 189, 248, 0.08);
}
.prob-badge.down {
  color: #f59e0b;
  border-color: #7c2d12;
  background: rgba(245, 158, 11, 0.08);
}
.prob-badge.risk {
  color: #eab308;
  border-color: #854d0e;
  background: rgba(234, 179, 8, 0.08);
}
.prob-badge.strength {
  color: #34d399;
  border-color: #065f46;
  background: rgba(52, 211, 153, 0.08);
}
.prob-badge.backtest {
  color: #93c5fd;
  border-color: #1d4ed8;
  background: rgba(147, 197, 253, 0.08);
}
.prob-badge.rr {
  color: #f472b6;
  border-color: #9d174d;
  background: rgba(244, 114, 182, 0.08);
}
body:not(.dark-mode) .prob-badge {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
}

/* Alerts */
.alert-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  margin-left: 6px;
}
.alert-badge.buy {
  background: #064e3b;
  color: #a7f3d0;
  border: 1px solid #10b981;
}
.alert-badge.sell {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #ef4444;
}
.risk-warn {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #eab308;
  margin-top: 4px;
}

/* Heatmap table */
.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}
.heatmap-table th,
.heatmap-table td {
  padding: 6px;
  text-align: center;
  border-bottom: 1px solid #1f2937;
}
.heat-bull {
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
  font-weight: 700;
}
.heat-bear {
  background: rgba(239, 68, 68, 0.18);
  color: #dc2626;
  font-weight: 700;
}
.heat-neutral {
  background: rgba(234, 179, 8, 0.18);
  color: #a16207;
  font-weight: 700;
}
body:not(.dark-mode) .heatmap-table td {
  border-bottom: 1px solid #e5e7eb;
}

/* Loading spinner */
.dash-spinner {
  margin: 12px auto;
  display: block;
  border: 4px solid #1e293b;
  border-top: 4px solid #38bdf8;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hero Final Market Signal */
.hero-signal {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  padding: 22px 26px;
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(0,0,0,0.45);
  color: white;
  margin: 16px auto 18px;
  max-width: 1180px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: heroFadeIn 0.4s ease-out;
}
.hero-left-block {
  display: flex;
  align-items: center;
}
.hero-icon {
  font-size: 42px;
  margin-right: 16px;
}
.hero-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.hero-label {
  margin: 4px 0;
  font-size: 18px;
  font-weight: 800;
}
.hero-score,
.hero-confidence {
  font-size: 13px;
  opacity: 0.9;
}
.hero-right {
  text-align: right;
}
.hero-badge {
  background: rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 6px;
  display: inline-block;
}
.hero-alert-title {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 4px;
}
.hero-alert-list {
  max-width: 260px;
}
.hero-alert {
  background: rgba(0,0,0,0.25);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

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

@media (max-width: 991px) {
  .hero-signal {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hero-right {
    text-align: left;
  }
}
.dashboard-header {
  text-align: center;
  margin: 12px 0 6px;
}

.dashboard-icon {
  font-size: 26px;
  display: inline-block;
  margin-right: 6px;
}

.dashboard-title {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
}

/* فقط روی موبایل عنوان مخفی شود */
@media (max-width: 768px) {
  .dashboard-title {
    display: none;
  }
  .dashboard-icon {
    font-size: 30px;
    margin: 10px 0;
  }
  .analyze-strip,
.button-row {
  flex-direction: column;
  align-items: stretch;
}

.dash-button {
  width: 100%;
  text-align: center;
  font-size: 14px;
  padding: 10px 16px;
}
}

  
 
body:not(.dark-mode) .Select-control {
 color: #000000;
  
} 

 
/* fixed */
 /* fixed: was black on dark */
 .sparkle-icon {
    display: inline-block;
    animation: sparkle 1.8s infinite ease-in-out;
}

@keyframes sparkle {
    0% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 2px #ffd700);
    }
    50% {
        opacity: 1;
        transform: scale(1.25) rotate(15deg);
        filter: drop-shadow(0 0 6px #ffea00);
    }
    100% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 2px #ffd700);
    }
}
.ai-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ai-badge {
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.15);
    font-size: 12px;
}

.ai-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ai-signal-text {
    font-size: 16px;
    font-weight: 600;
}

.ai-narrative {
    font-size: 14px;
    line-height: 1.6;
}

.ai-analysis-container {
    padding: 15px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}

/* AI SIDE PANEL */
.ai-side-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 395px;
    height: 100vh;
  
    background: rgba(15, 23, 42, 0.98);
    border-left: 1px solid #1f2937;
    box-shadow: -4px 0 25px rgba(0,0,0,0.45);
    padding: 20px;
    transition: right 0.35s ease;
    z-index: 5000;
    overflow-y: auto;
}

.ai-side-panel.open {
    right: 0;
    
}

.ai-side-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 4999;
}

.ai-side-close {
    font-size: 20px;
    cursor: pointer;
    margin-left: 62px;
    margin-bottom: 12px;
    text-align: right;
    opacity: 0.8;
}

.ai-side-close:hover {
    opacity: 1;
}

.ai-side-content {
    padding: 10px;
}
.ai-narrative-container {
    padding: 20px;
    line-height: 1.7;
}

.ai-header {
    font-size: 22px;
    margin-bottom: 15px;
}

.ai-section-title {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

.ai-simple-view {
    margin-bottom: 10px;
    opacity: 0.9;
}

.ai-pro-list {
    margin-left: 20px;
}

.ai-pro-item {
    margin-bottom: 6px;
}

.ai-risk-block {
    margin-top: 10px;
    padding: 10px;
    border-left: 3px solid #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.ai-invalidation {
    margin-top: 15px;
    font-style: italic;
    opacity: 0.8;
}.final-compact-box {
  background: #1e1e2f;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 0 18px rgba(0,0,0,0.35);
  color: #f0f0f0;
  font-family: 'IRANSans', 'Segoe UI', sans-serif;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- بخش سیگنال نهایی --- */
.final-signal-header {
  background: #2a2a3d;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

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

.final-signal-icon {
  font-size: 48px;
}

.final-signal-title {
  font-size: 20px;
  color: #00e5ff;
  margin-bottom: 4px;
}

.final-signal-label {
  font-size: 24px;
  font-weight: bold;
  color: #ffd54f;
}

.final-signal-meta {
  font-size: 15px;
  margin-top: 4px;
}

.final-signal-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.final-badge {
  background: #444;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.final-alert {
  background: #ff9800;
  color: #000;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
}

/* --- بخش اجماع --- */
.final-consensus-box {
  background: #262637;
  border-radius: 10px;
  padding: 14px;
}

.final-section-title {
  font-size: 18px;
  font-weight: bold;
  color: #00e676;
  margin-bottom: 6px;
}

.final-consensus-text {
  font-size: 15px;
  color: #ccc;
}

/* --- بخش اسپات/فیوچرز --- */
.final-spot-box {
  background: #262637;
  border-radius: 10px;
  padding: 14px;
}

.final-spot-text {
  font-size: 15px;
  color: #ccc;
}

.final-spot-text.bullish {
  color: #4caf50;
}

.final-spot-text.bearish {
  color: #f44336;
}
.sidebar-bottn{
  height: 70px0;
  width: auto;
  margin-bottom: 15px;
  
}
/* برای تغییر رنگ یا آپدیت داده‌ها */
.signal-table td, .heatmap-table td {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* برای ورود/خروج بخش‌ها */
.analysis-block {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.analysis-block.show {
  opacity: 1;
  transform: translateY(0);
}
.analysis-block.hide {
  opacity: 0;
  transform: translateY(10px);
}

/* پیش‌فرض: جدول‌ها عرض 100% بگیرند و بدون اسکرول باشند */
.signal-table, .heatmap-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  table-layout: auto;
  word-wrap: break-word;
}

/* فقط روی موبایل اسکرول افقی فعال شود */
@media (max-width: 768px) {
  .table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .signal-table, .heatmap-table {
    min-width: 720px;   /* حداقل عرض برای جا شدن ستون‌ها */
  }
  .signal-table th, .signal-table td,
  .heatmap-table th, .heatmap-table td {
    font-size: 9px;
    padding: 2px;
  }
}
/* Combined View text fix */
.ai-meta-row,
.ai-meta-row.secondary,
.indicator-text {
  color: #e5e5e5;  
   border-radius: 12px;  
  margin-bottom: 20px;
  padding: 20px; 
}

body:not(.dark-mode) .ai-meta-row,
body:not(.dark-mode) .ai-meta-row.secondary,
body:not(.dark-mode) .indicator-text {
  color: #111827; background-color: #e5e5e5; 
  border-radius: 12px;  
  margin-bottom: 20px;
  padding: 20px;
}

.heatmap-table td.buy {
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
  font-weight: 700;
}
.heatmap-table td.sell {
  background: rgba(239, 68, 68, 0.18);
  color: #dc2626;
  font-weight: 700;
}
.heatmap-table td.neutral {
  background: rgba(234, 179, 8, 0.18);
  color: #a16207;
  font-weight: 700;
}
/* ============================
   FINAL MARKET SIGNAL — CLEAN UI
   ============================ */

.final-market-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

/* TOP BOX: LEFT + RIGHT */
.final-signal-box {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* LEFT SIDE */
.final-signal-left {
    flex: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.final-signal-icon {
    font-size: 34px;
    line-height: 34px;
}

.final-signal-left-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.final-signal-title {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

.final-signal-label {
    font-size: 20px;
    font-weight: 700;
    color: #4ade80; /* green */
}

.final-signal-meta {
    font-size: 14px;
    opacity: 0.85;
}

.final-badge {
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

/* RIGHT SIDE */
.final-signal-right {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.final-alerts-row {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.8;
}

/* COLORS */
.bullish {
    color: #4ade80 !important;
}
.bearish {
    color: #f87171 !important;
}

/* MTF BLOCK */
.analysis-block {
    margin-top: 18px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.final-consensus-text {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.85;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .final-signal-box {
        flex-direction: column;
        text-align: center;
    }
    .final-signal-right {
        text-align: center;
    }
} 

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* مهم‌ترین بخش */
    border-radius: 12px;
}

.loader-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}
.result-section {
    background: rgba(255, 255, 255, 0.03);   /* مثل summary */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 18px;                     /* فاصله داخلی استاندارد */
    margin-bottom: 20px;                    /* فاصله از بخش بعدی */
    box-shadow: 0 0 12px rgba(0,0,0,0.15);  /* مثل کارت‌های پایین */
    display: flex;
    flex-direction: column;
    gap: 10px;                              /* فاصله بین عناصر داخلی */
}
.loader-overlay {
    z-index: 9999;
}



/* ============================================
   TRADINGVIEW MTF — 99TA100 PREMIUM EDITION
   ============================================ */

.tv-mtf-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--tv-bg);
    border: 1px solid var(--tv-border);
    box-shadow: var(--tv-shadow);
    margin-top: 14px;
}

/* LEFT CIRCLE */
.tv-mtf-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-mtf-circle {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1px;
    box-shadow: 0 0 18px rgba(0,0,0,0.25);
}

.tv-mtf-circle.yes {
    background: #22c55e;
    box-shadow: 0 0 18px rgba(34,197,94,0.45);
}

.tv-mtf-circle.no {
    background: #ef4444;
    box-shadow: 0 0 18px rgba(239,68,68,0.45);
}

/* RIGHT SIDE */
.tv-mtf-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tv-mtf-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tv-accent);
}

.tv-mtf-pills {
    display: flex;
    gap: 8px;
}

.tv-pill {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--tv-border);
}

.tv-pill.buy {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.tv-pill.sell {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.tv-pill.neutral {
    background: rgba(234,179,8,0.15);
    color: #eab308;
}

.tv-mtf-consensus {
    font-size: 14px;
    opacity: 0.85;
}

/* THEMES */
body.dark-mode {
    --tv-bg: rgba(10, 14, 22, 0.92);
    --tv-border: rgba(255,255,255,0.08);
    --tv-shadow: 0 0 22px rgba(0, 200, 255, 0.25);
    --tv-accent: #00eaff;
}

body:not(.dark-mode) {
    --tv-bg: #ffffff;
    --tv-border: #e5e7eb;
    --tv-shadow: 0 4px 18px rgba(0,0,0,0.08);
    --tv-accent: #0284c7;
}

/* MOBILE */
@media (max-width: 768px) {
    .tv-mtf-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   FINAL SIGNAL BOX — TRADINGVIEW STYLE
   ============================================ */

.tv-final-box {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--tv-bg);
    border: 1px solid var(--tv-border);
    box-shadow: var(--tv-shadow);
    margin-bottom: 22px;
}

/* LEFT CIRCLE */
.tv-final-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-final-circle {
    width: 90px;
    height: 90px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1px;
}

.tv-final-circle.buy {
    background: #22c55e;
    box-shadow: 0 0 22px rgba(34,197,94,0.45);
}

.tv-final-circle.sell {
    background: #ef4444;
    box-shadow: 0 0 22px rgba(239,68,68,0.45);
}

.tv-final-circle.neutral {
    background: #eab308;
    box-shadow: 0 0 22px rgba(234,179,8,0.45);
}

/* RIGHT SIDE */
.tv-final-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tv-final-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--tv-accent);
}

.tv-final-sub {
    font-size: 14px;
    opacity: 0.8;
}

.tv-final-btc {
    background: var(--tv-box-bg);
    border: 1px solid var(--tv-border);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--tv-accent);
}

/* META ROW */
.tv-meta-row {
    display: flex;
    gap: 10px;
}

.tv-meta-box {
    flex: 1;
    background: var(--tv-box-bg);
    border: 1px solid var(--tv-border);
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
}

.tv-meta-label {
    font-size: 12px;
    opacity: 0.7;
}

.tv-meta-value {
    font-size: 16px;
    font-weight: 700;
}

/* ALERTS */
.tv-final-alerts {
    margin-top: 4px;
}

.tv-final-alert {
    background: rgba(255, 180, 0, 0.15);
    border-left: 3px solid #ffb300;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

/* THEMES */
body.dark-mode {
    --tv-bg: rgba(10, 14, 22, 0.92);
    --tv-border: rgba(255,255,255,0.08);
    --tv-shadow: 0 0 22px rgba(0, 200, 255, 0.25);
    --tv-accent: #00eaff;
    --tv-box-bg: rgba(255,255,255,0.05);
}

body:not(.dark-mode) {
    --tv-bg: #ffffff;
    --tv-border: #e5e7eb;
    --tv-shadow: 0 4px 18px rgba(0,0,0,0.08);
    --tv-accent: #0284c7;
    --tv-box-bg: #f3f4f6;
}

/* MOBILE */
@media (max-width: 768px) {
    .tv-final-box {
        flex-direction: column;
        text-align: center;
    }
}

/* FINAL BOX WRAPPER */
.tv-final-box {
    display: flex;
    gap: 18px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    margin-bottom: 18px;
    align-items: center;
}

/* LEFT CIRCLE */
.tv-final-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-final-circle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-final-circle.buy {
    background: rgba(34,197,94,0.25);
    color: #22c55e;
}

.tv-final-circle.sell {
    background: rgba(239,68,68,0.25);
    color: #ef4444;
}

.tv-final-circle.neutral {
    background: rgba(234,179,8,0.25);
    color: #eab308;
}

/* RIGHT SIDE */
.tv-final-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tv-final-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tv-final-title {
    font-size: 20px;
    font-weight: 800;
}

.tv-final-sub {
    font-size: 14px;
    opacity: 0.8;
}

.tv-final-btc {
    font-size: 14px;
    font-weight: 600;
    color: #38bdf8;
}

/* META ROW */
.tv-meta-row {
    display: flex;
    gap: 12px;
}

.tv-meta-box {
    flex: 1;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.tv-meta-label {
    font-size: 12px;
    opacity: 0.7;
}

.tv-meta-value {
    font-size: 15px;
    font-weight: 700;
}

/* ALERTS */
.tv-final-alerts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tv-final-alert {
    background: rgba(255,170,0,0.15);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
}

/* MOBILE */
@media (max-width: 768px) {
    .tv-final-box {
        flex-direction: column;
        text-align: center;
    }
    .tv-final-title-wrap {
        flex-direction: column;
        gap: 4px;
    }
    .tv-meta-row {
        flex-direction: column;
    }
}

/* WRAPPER */
.tv-final-box {
    display: flex;
    gap: 20px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    align-items: center;
}

/* LEFT SIDE */
.tv-final-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* BIG CIRCLE */
.tv-final-circle {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-final-circle.buy { background: rgba(34,197,94,0.25); color:#22c55e; }
.tv-final-circle.sell { background: rgba(239,68,68,0.25); color:#ef4444; }
.tv-final-circle.neutral { background: rgba(234,179,8,0.25); color:#eab308; }

/* TEXT UNDER CIRCLE */
.tv-circle-info {
    margin-top: 8px;
    text-align: center;
}

.tv-circle-title {
    font-size: 15px;
    font-weight: 700;
}

.tv-circle-sub {
    font-size: 13px;
    opacity: 0.75;
}

/* RIGHT SIDE */
.tv-final-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* BTC DOMINANCE */
.tv-final-btc {
    font-size: 14px;
    font-weight: 600;
    color: #38bdf8;
}

/* META ROW */
.tv-meta-row {
    display: flex;
    gap: 10px;
}

.tv-meta-box {
    flex: 1;
    background: rgba(255,255,255,0.06);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.tv-meta-label {
    font-size: 12px;
    opacity: 0.7;
}

.tv-meta-value {
    font-size: 16px;
    font-weight: 700;
}

/* ALERTS */
.tv-final-alerts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tv-final-alert {
    background: rgba(255,170,0,0.15);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
}

/* MOBILE */
@media (max-width: 768px) {
    .tv-final-box {
        flex-direction: column;
        text-align: center;
    }
    .tv-meta-row {
        flex-direction: column;
    }
}

/* MTF BLOCK WRAPPER */
.mtf-block {
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    margin-top: 12px;
}

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

.mtf-header-title {
    font-size: 16px;
    font-weight: 700;
}

/* BADGES */
.mtf-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.mtf-badge-yes {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
}

.mtf-badge-no {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}

/* PILLS */
.mtf-pills-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.mtf-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.mtf-pill-buy {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.mtf-pill-sell {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.mtf-pill-neutral {
    background: rgba(234,179,8,0.15);
    color: #eab308;
}

/* CONSENSUS TEXT */
.mtf-consensus-text {
    font-size: 13px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.signal-positive { color: #22c55e; }
.signal-negative { color: #ef4444; }
.signal-neutral  { color: #eab308; }

/* AI LINE */
.final-consensus-text {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 6px;
}
/* ============================
   SCALPING — MODE LABEL
   ============================ */
.scalp-mode-label {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
}

/* ============================
   SCALPING — BOX
   ============================ */
.scalp-box {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    min-height: 70px;
    transition: background 0.25s ease;
}

/* Dark mode */
body.dark-mode .scalp-box {
    background: rgba(255,255,255,0.05);
    color: #e6e6e6;
}

/* Light mode */
body:not(.dark-mode) .scalp-box {
    background: rgba(0,0,0,0.05);
    color: #222;
}

/* ============================
   SCALPING — ROWS
   ============================ */
.scalp-row {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 2px;
    text-align: center;
    white-space: nowrap;
}

/* Mobile */
@media (max-width: 600px) {
    .scalp-row {
        font-size: 12px;
        white-space: normal;
        line-height: 1.4;
    }
}
.scalp-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 0;
}

.scalp-title-icon {
    font-size: 18px;
}

.scalp-title-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.result-title {   
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--title-color);
    background: none;
    padding: 10px 0;
    border-radius: 8px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
:root.dark {
    --title-color: #f5f5f5;
}
 :root.light {
    --title-color: #111827;
}
.signal-card {
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transition: 0.25s ease;
}

/* Light Mode */
.signal-light {
    background: #ffffff;
    color: #222;
    border: 1px solid #e5e5e5;
}

/* Dark Mode */
.signal-dark {
    background: #1b1b1b;
    color: #eaeaea;
    border: 1px solid #333;
}

/* Title */
.signal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Values Row */
.signal-values {
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
}


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

.mtf-header-title {
    font-weight: 700;
    font-size: 15px;
}

.mtf-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.mtf-badge-yes {
    background: rgba(34,197,94,0.16);
    color: #4ade80;
}

.mtf-badge-no {
    background: rgba(248,113,113,0.16);
    color: #fca5a5;
}

.mtf-pills-row {
    display: flex;
    gap: 8px;
    margin: 6px 0 8px 0;
    flex-wrap: wrap;
}

.mtf-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(15,23,42,0.7);
}

.mtf-pill-buy { color: #4ade80; }
.mtf-pill-sell { color: #f97373; }
.mtf-pill-neutral { color: #e5e7eb; }

.mtf-trend-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}

.mtf-trend-label {
    opacity: 0.8;
}

.mtf-trend-value {
    font-weight: 700;
}

.mtf-trend-buy { color: #4ade80; }
.mtf-trend-sell { color: #f97373; }
.mtf-trend-neutral { color: #e5e7eb; }

.mtf-consensus-text {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.9;
}
.mtf-header-row {
    display: flex;
    align-items: center;
    gap: 10px;              /* فاصله بین عنوان و badge */
    justify-content: flex-start;   /* ← این مهمه */
}
/* ===== MTF PRO UI — BIGGER & CLEARER ===== */

.mtf-pro-card {
    border-radius: 16px;
    padding: 20px 22px;
    background: linear-gradient(135deg, rgba(17,24,39,0.95), rgba(30,58,138,0.92));
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    width:96%;
    
    margin: 0 auto;
}

/* Header */
.mtf-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.mtf-header-title {
    font-size: 20px;        /* ← بزرگ‌تر */
    font-weight: 800;
    color: #fff;
}

/* Badge */
.mtf-badge {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 16px;        /* ← بزرگ‌تر */
    font-weight: 700;
}

.mtf-badge-yes {
    background: rgba(34,197,94,0.25);
    color: #4ade80;
}

.mtf-badge-no {
    background: rgba(248,113,113,0.25);
    color: #f87171;
}

/* Pills */
.mtf-pills-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.mtf-pill {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 15px;        /* ← بزرگ‌تر */
    font-weight: 700;
    background: rgba(255,255,255,0.08);
}

.mtf-pill-buy { color: #4ade80; }
.mtf-pill-sell { color: #f87171; }
.mtf-pill-neutral { color: #e5e7eb; }

/* Trend Row */
.mtf-trend-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.mtf-trend-label {
    font-size: 16px;        /* ← بزرگ‌تر */
    opacity: 0.9;
    color: #fff;
}

.mtf-trend-value {
    font-size: 18px;        /* ← بزرگ‌تر */
    font-weight: 800;
}

.mtf-trend-buy { color: #4ade80; }
.mtf-trend-sell { color: #f87171; }
.mtf-trend-neutral { color: #e5e7eb; }

/* Consensus Text */
.mtf-consensus-text {
    font-size: 16px;        /* ← بزرگ‌تر */
    font-weight: 600;
    opacity: 0.95;
    margin-top: 8px;
}
.risk-wrapper {
    display: flex;
    align-items: center;      /* عمودی وسط */
    justify-content: center;  /* افقی وسط */
    gap: 6px;
}

.risk-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
}
.risk-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.risk-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
}
.chart-popup {
    position: fixed;
    top: 80px;
    left: 80px;
    z-index: 999999;
    background: #050816;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
    padding: 0;
    min-width: 420px;
    min-height: 320px;
    resize: both;
    overflow: hidden;
}

.chart-popup-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-popup-header {
    cursor: move;
    padding: 8px 12px;
    background: linear-gradient(135deg, #111827, #020617);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 14px;
}

.chart-popup-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
}

#btc-chart-graph, #alt-chart-graph {
    flex: 1;
}
.price-and-chartview {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 10px;
}

.chart-view-btn {
    margin-top: 6px;
    padding: 6px 12px;
    font-size: 13px;
}
.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* قیمت و دکمه زیر هم و مرتب */
    margin-bottom: 12px;
}

.price-box {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.chart-view-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.chart-view-btn:hover {
    background: #334155;
}
.price-inline-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between; /* یا flex-start اگر چپ‌چین می‌خوای */
    gap: 12px;
    margin-bottom: 10px;
}

.price-box-inline {
    font-size: 18px;
    font-weight: 700;
}

.chart-view-btn-inline {
    padding: 6px 14px;
    font-size: 13px;
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap; /* مهم: دکمه نمی‌شکند */
}

.chart-view-btn-inline:hover {
    background: #334155;
}
.price-inline-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;        /* وسط‌چین عمودی */
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 4px;         /* هماهنگ با summary */
}

.price-box-inline {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.chart-view-btn-inline {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    background: linear-gradient(90deg, #1b0467, #100841);
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(171, 163, 163, 0.35);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}

.result-section {
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--card-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* قیمت + دکمه در یک سطر */
.price-inline-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; 
    gap: 10px;
    width: 100%;
}

/* استایل قیمت */
.price-box-inline {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
     
}

/* دکمه Chart View */
.chart-view-btn-inline {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    background: var(--btn-bg, linear-gradient(90deg, #1b0467, #100841));
    color: var(--btn-text, #fff);
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(171, 163, 163, 0.35);
    cursor: pointer;
    white-space: nowrap;
}

.chart-view-btn-inline:hover {
    opacity: 0.85;
}

:root.light {
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --text-color: #111827;
    --btn-bg: #2563eb;
    --btn-text: #ffffff;
}

:root.dark {
    --card-bg: rgba(255,255,255,0.03);
    --card-border: rgba(255,255,255,0.08);
    --text-color: #f5f5f5;
    --btn-bg: linear-gradient(90deg, #1b0467, #100841);
    --btn-text: #ffffff;
}

/* ============================
   📱 Mobile Responsive (max 600px)
   ============================ */
@media (max-width: 600px) {

    /* پاپ‌آپ چارت */
    .chart-popup {
        top: 40px !important;
        left: 10px !important;
        width: 95% !important;
        min-width: unset !important;
        height: 70vh !important;
        min-height: unset !important;
        border-radius: 10px;
    }

    .chart-popup-header {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* کارت اصلی BTC / ALT */
    .result-section {
        padding: 12px 14px;
        gap: 10px;
        margin-bottom: 16px;
    }

    /* قیمت + دکمه → زیر هم */
    .price-inline-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 8px;
    }

    .price-box-inline {
        font-size: 16px;
        line-height: 1.3;
    }

    .chart-view-btn-inline {
        width: 100%;
        text-align: center;
        padding: 8px 0;
        font-size: 14px;
        border-radius: 8px;
    }

    /* جدول‌ها اسکرول افقی داشته باشند */
    .table-scroll {
        overflow-x: auto;
    }

    /* عنوان‌ها */
    .result-title {
        font-size: 18px;
        padding: 8px 0;
    }
}


/* =========================================================
   DARK MODE — readable fonts (labels, dropdowns, checklist)
   Applied without breaking light mode
   ========================================================= */
body.dark-mode,
body.dark-mode #app-root {
  color: #e5e7eb !important;
}

body.dark-mode .card,
body.dark-mode .card > h4,
body.dark-mode .settings-column,
body.dark-mode .settings-column h3,
body.dark-mode .settings-column h4,
body.dark-mode .result-title,
body.dark-mode .analysis-title,
body.dark-mode .summary-label,
body.dark-mode .section-title,
body.dark-mode .sidebar 
 {
  color: #e5e7eb !important;
}
body.dark-mode .sidebar label,
body.dark-mode .dash-dropdown-content, body.dark-mode .dash-dropdown-search,
body.dark-mode label ,body.dark-mode input , body.dark-mode .dash-options-list-virtualized  ,
body.dark-mode .dash-dropdown-grid-container , body.dark-mode .dash-dropdown-search-container

, body.dark-mode  .dash-slider-wrapper,

body.dark-mode  .dash-slider-mark  , body.dark-mode  .dash-slider-mark-outside-selection
{
  color: #e4e4e4 !important; background: #020116;
}
/* React-Select / Dash dropdowns — dark */
body.dark-mode .dash-dropdown,
body.dark-mode .Select,
body.dark-mode .Select-control,
body.dark-mode .Select-value,
body.dark-mode .Select-value-label,
body.dark-mode .Select-placeholder,
body.dark-mode .Select-input,
body.dark-mode .Select-input > input,
body.dark-mode .VirtualizedSelectOption,
body.dark-mode .Select-menu-outer,
body.dark-mode .Select-option,
body.dark-mode .Select-single-value,
body.dark-mode div[class*="SingleValue"],
body.dark-mode div[class*="placeholder"],
body.dark-mode div[class*="control"],
body.dark-mode div[class*="Input"] input {
  color: #f3f4f6 !important;
  background-color: #0f172a !important;
  border-color: #374151 !important;
}

body.dark-mode .Select-control {
  background: #0f172a !important;
  border: 1px solid #4b5563 !important;
  min-height: 36px;
}

body.dark-mode .Select-menu-outer,
body.dark-mode .Select-menu {
  background: #0f172a !important;
  border: 1px solid #374151 !important;
  z-index: 9999 !important;
}

body.dark-mode .Select-option.is-focused,
body.dark-mode .VirtualizedSelectFocusedOption {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-mode .Select-option.is-selected {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

body.dark-mode .dash-input {
  background: #020617 !important;
  color: #e5e7eb !important;
  border-color: #4b5563 !important;
}

body.dark-mode .dash-checklist label {
  color: #e5e7eb !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: #4b5563 !important;
}

body.dark-mode .rc-slider-mark-text {
  color: #9ca3af !important;
}

body.dark-mode .top-link {
  color: #38bdf8 !important;
}
body.dark-mode .dashboard-title,
body.dark-mode .app-title {
  color: #e5e7eb !important;
}

body.dark-mode .demo-locked-card h4 {
  color: #fbbf24 !important;
}

/* Light mode — keep dark text */
body:not(.dark-mode) .dash-dropdown,
body:not(.dark-mode) .Select-control,
body:not(.dark-mode) .Select-value-label,
body:not(.dark-mode) .Select-placeholder,
body:not(.dark-mode) .Select-single-value {
  color: #111827 !important;
  background-color: #ffffff !important;
}

body:not(.dark-mode) .card > h4,
body:not(.dark-mode) label,
body:not(.dark-mode) .result-title,
body:not(.dark-mode) .section-title {
  color: #111827 !important;
}

body:not(.dark-mode) .dash-input {
  background: #f9fafb !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

