/* ========================================================
   LIGHT THEME - Xtrade Trading Platform
   Comprehensive light mode overrides.
   Activated by body.light-theme class (toggled via theme button).
   ======================================================== */

/* ========= CSS VARIABLE OVERRIDES ========= */
body.light-theme {
  /* Core background & text */
  --bg-main: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0b0c10;
  --text-secondary: rgba(11, 12, 16, 0.6);
  --border-color: rgba(0, 0, 0, 0.1);

  /* Dark-prefixed vars (used in index.html embedded CSS) */
  --bg-dark-primary: #f5f7fa;
  --bg-dark-secondary: #ffffff;
  --bg-dark-tertiary: #f0f2f5;
  --bg-card-hover: #f8f9fb;

  /* Xt design system vars */
  --xt-bg-primary: #f5f7fa;
  --xt-bg-secondary: #ffffff;
  --xt-bg-card: #ffffff;
  --xt-bg-card-hover: #f0f2f5;
  --xt-text-primary: #0b0c10;
  --xt-text-secondary: rgba(11, 12, 16, 0.6);
  --xt-text-muted: rgba(11, 12, 16, 0.4);
  --xt-border: rgba(0, 0, 0, 0.12);
  --xt-border-accent: rgba(33, 150, 238, 0.4);
  --xt-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Accent colors stay the same */
  --accent-dim: rgba(33, 150, 238, 0.12);
  --accent-glow: rgba(33, 150, 238, 0.08);

  background: #f5f7fa !important;
  color: #0b0c10 !important;
}

/* ========= LAYOUT SHELLS ========= */
body.light-theme .wrap,
body.light-theme .main {
  background: var(--bg-main) !important;
}

body.light-theme .shell {
  background: var(--bg-main);
}

body.light-theme .gradient {
  background: transparent !important;
}

/* ========= HEADER ========= */
body.light-theme header {
  background: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme header .Xtrade-name,
body.light-theme header .logo-text {
  color: #0b0c10 !important;
}

body.light-theme .auth-buttons .guest-badge {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(11, 12, 16, 0.6) !important;
}

body.light-theme .auth-buttons .user-badge {
  background: rgba(33, 150, 238, 0.1) !important;
  color: #2196ee !important;
}

/* Theme toggle button */
body.light-theme .theme-toggle-btn {
  border-color: rgba(0, 0, 0, 0.2);
  color: #0b0c10;
}
body.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

/* ========= SIDEBAR ========= */
body.light-theme .sidebar {
  background: #ffffff !important;
  background-image: linear-gradient(180deg, rgba(33, 150, 238, 0.04) 0%, transparent 40%) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .conversation-list-header {
  color: rgba(0, 0, 0, 0.5) !important;
}

body.light-theme .conversation-search input {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0b0c10 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}
body.light-theme .conversation-search input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

body.light-theme .conversation-item {
  color: #0b0c10 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}
body.light-theme .conversation-item:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}
body.light-theme .conversation-item.active {
  background: rgba(33, 150, 238, 0.08) !important;
  color: #2196ee !important;
}
body.light-theme .conversation-item .conv-date {
  color: rgba(0, 0, 0, 0.4) !important;
}
body.light-theme .conversation-item .conv-delete {
  color: rgba(0, 0, 0, 0.3) !important;
}
body.light-theme .conversation-item .conv-delete:hover {
  color: #ef4444 !important;
}

body.light-theme .conversation-title {
  color: #0b0c10 !important;
}

/* Sidebar scrollbar */
body.light-theme .conversation-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .conversation-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}
body.light-theme .conversation-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

body.light-theme .sidebar-indicator {
  background: linear-gradient(90deg, #2196ee, rgba(33, 150, 238, 0.2));
}

/* ========= CHAT AREA ========= */
body.light-theme .chat {
  background: var(--bg-main) !important;
}

body.light-theme .messages {
  background: transparent !important;
}

body.light-theme .bubble.bot {
  background: transparent !important;
  color: #0b0c10 !important;
  border: none;
}

body.light-theme .bubble.user {
  background: #2196ee !important;
  color: #fff !important;
}

body.light-theme .bubble.bot a {
  color: #2196ee;
}

body.light-theme .bubble.bot code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #c7254e;
}

body.light-theme .bubble.bot pre {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.light-theme .bubble.bot pre code {
  color: #0b0c10;
}

body.light-theme .bubble.bot table {
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .bubble.bot th {
  background: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .bubble.bot td {
  border-color: rgba(0, 0, 0, 0.08);
  color: #0b0c10;
}

body.light-theme .bubble .avatar.bot {
  background: rgba(33, 150, 238, 0.1);
}

body.light-theme .row.bot .thinking-dots span {
  background: rgba(0, 0, 0, 0.3);
}

/* Financial bubble shimmer */
body.light-theme .row.bot .bubble.financial-bubble {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ========= COMPOSER / INPUT ========= */
body.light-theme .composer {
  background: var(--bg-main) !important;
}

body.light-theme .inputbar {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .inputbar:focus-within {
  background: #ffffff !important;
  border-color: #2196ee !important;
}

body.light-theme #input {
  background: transparent !important;
  border: none !important;
  color: #0b0c10 !important;
}
body.light-theme #input::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme #input:focus {
  border-color: #2196ee !important;
}

body.light-theme .sendbtn {
  background: #2196ee !important;
  color: #fff !important;
}

/* Badge (BETA) and hint text */
body.light-theme .badge {
  color: rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .meta {
  color: rgba(0, 0, 0, 0.45) !important;
}
body.light-theme .meta #hint {
  color: rgba(0, 0, 0, 0.45) !important;
}

/* ========= CHART COMPONENTS ========= */
body.light-theme .chart-symbol {
  color: #0b0c10 !important;
}
body.light-theme .chart-current-price {
  color: #0b0c10 !important;
}
body.light-theme .chart-percent-change {
  color: rgba(11, 12, 16, 0.7) !important;
}
body.light-theme .chart-type-btn {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .chart-type-btn:hover {
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .chart-type-btn.active {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0b0c10 !important;
}
body.light-theme .chart-type-controls {
  background: rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .chart-timeframe-btn {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .chart-timeframe-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .chart-timeframe-btn.active {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #0b0c10 !important;
}
body.light-theme .price-chart-container,
body.light-theme .strategy-chart-container {
  background: var(--bg-main) !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Status indicator */
body.light-theme #status {
  color: rgba(0, 0, 0, 0.4);
}

/* ========= RIGHT PANEL ========= */
body.light-theme .xt-right-panel {
  background: #ffffff !important;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .xt-right-panel-header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .xt-right-panel-title,
body.light-theme .xt-panel-title,
body.light-theme h2.xt-right-panel-title {
  color: #0b0c10 !important;
}

body.light-theme .xt-right-panel-subtitle,
body.light-theme .xt-panel-subtitle {
  color: rgba(11, 12, 16, 0.6) !important;
}

body.light-theme .xt-right-panel-close {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-right-panel-close:hover {
  color: #0b0c10;
}

/* Right panel scrollbar */
body.light-theme .xt-right-panel-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .xt-right-panel-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* ========= STEPPER ========= */
body.light-theme .xt-stepper-step span {
  color: rgba(11, 12, 16, 0.5) !important;
}
body.light-theme .xt-stepper-step.active span {
  color: #2196ee !important;
}
body.light-theme .xt-stepper-step.completed span {
  color: #22c55e !important;
}
body.light-theme .xt-stepper-step .xt-step-number {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-stepper-step.active .xt-step-number {
  background: rgba(33, 150, 238, 0.15);
  color: #2196ee;
}
body.light-theme .xt-stepper-step.completed .xt-step-number {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
body.light-theme .xt-stepper-connector {
  background: rgba(0, 0, 0, 0.1);
}

/* ========= SECTOR CARDS ========= */
body.light-theme .xt-sector-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0b0c10 !important;
}
body.light-theme .xt-sector-card:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.02) !important;
}
body.light-theme .xt-sector-card.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.05) !important;
}
body.light-theme .xt-sector-name {
  color: #0b0c10 !important;
}
body.light-theme .xt-sector-tickers {
  color: rgba(11, 12, 16, 0.5) !important;
}
body.light-theme .xt-sector-desc {
  color: rgba(11, 12, 16, 0.5) !important;
}

/* Stock items */
body.light-theme .xt-stock-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0b0c10;
}
body.light-theme .xt-stock-item:hover {
  background: rgba(33, 150, 238, 0.04);
}
body.light-theme .xt-stock-item.selected {
  background: rgba(33, 150, 238, 0.08);
  border-color: #2196ee;
}
body.light-theme .xt-stock-symbol {
  color: #0b0c10;
}
body.light-theme .xt-stock-sector {
  color: rgba(11, 12, 16, 0.5);
}

/* Custom ticker input */
body.light-theme .xt-custom-ticker input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0b0c10 !important;
}
body.light-theme .xt-custom-ticker input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* ========= PORTFOLIO PANEL ========= */
body.light-theme .xt-portfolio-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-portfolio-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
body.light-theme .xt-portfolio-symbol {
  color: #0b0c10;
}
body.light-theme .xt-portfolio-alloc input {
  background: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
  border-color: rgba(0, 0, 0, 0.12);
}
body.light-theme .xt-portfolio-strategy {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-portfolio-remove {
  color: rgba(0, 0, 0, 0.3);
}
body.light-theme .xt-portfolio-remove:hover {
  color: #ef4444;
}
body.light-theme .xt-portfolio-add input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-portfolio-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
  color: rgba(11, 12, 16, 0.6);
}

/* Allocation bar */
body.light-theme .xt-allocation-bar {
  background: rgba(0, 0, 0, 0.06);
}

/* ========= STRATEGY PANEL ========= */

/* Tab bar */
body.light-theme .xt-strategy-tab-bar {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-strategy-tab-btn {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-strategy-tab-btn.active {
  color: #2196ee;
  border-bottom-color: #2196ee;
}
body.light-theme .xt-strategy-tab-btn:hover {
  color: #0b0c10;
}

/* Ticker tabs */
body.light-theme .xt-strategy-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-tab {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(11, 12, 16, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-tab.active {
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
  border-color: #2196ee;
}
body.light-theme .xt-strategy-tab.assigned {
  border-color: #22c55e;
}
body.light-theme .xt-strategy-counter {
  color: rgba(11, 12, 16, 0.4);
}

/* Timeframe buttons */
body.light-theme .xt-timeframe-btn {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-timeframe-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-timeframe-btn.active {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}

/* Current ticker info */
body.light-theme .xt-strategy-current {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-current-symbol {
  color: #0b0c10;
}
body.light-theme .xt-strategy-current-alloc {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-strategy-current-hint {
  color: rgba(11, 12, 16, 0.4);
}

/* Quick pick cards */
body.light-theme .xt-quick-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-quick-card:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.03);
}
body.light-theme .xt-quick-card.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.06);
}
body.light-theme .xt-quick-card-name {
  color: #0b0c10;
}
body.light-theme .xt-quick-card-desc {
  color: rgba(11, 12, 16, 0.5);
}

/* Preset strategy items */
body.light-theme .xt-preset-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-preset-item:hover {
  background: rgba(33, 150, 238, 0.04);
  border-color: rgba(33, 150, 238, 0.3);
}
body.light-theme .xt-preset-item.selected {
  background: rgba(33, 150, 238, 0.08);
  border-color: #2196ee;
}
body.light-theme .xt-preset-name {
  color: #0b0c10;
}
body.light-theme .xt-preset-check {
  color: #2196ee;
}

/* Preset list scrollbar */
body.light-theme .xt-preset-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .xt-preset-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* Quick actions (Improve / Reset / Undo) */
body.light-theme .xt-btn-improve {
  border-color: rgba(139, 92, 246, 0.3);
  color: #7c3aed;
}
body.light-theme .xt-btn-improve:hover {
  background: rgba(139, 92, 246, 0.08);
}
body.light-theme .xt-btn-reset,
body.light-theme .xt-btn-undo {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-btn-reset:hover,
body.light-theme .xt-btn-undo:hover {
  border-color: rgba(33, 150, 238, 0.4);
  color: #2196ee;
}

/* Backtest results */
body.light-theme .xt-backtest-results {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-backtest-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-backtest-value {
  color: #0b0c10;
}

/* Advanced section */
body.light-theme .xt-advanced-section {
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-advanced-header {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-advanced-header:hover {
  color: #0b0c10;
}
body.light-theme .xt-advanced-title {
  color: rgba(11, 12, 16, 0.6);
}

/* Code editor */
body.light-theme .xt-code-editor {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .strategy-name-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0b0c10 !important;
}
body.light-theme .xt-code-tab {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-code-tab.active {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}
body.light-theme .xt-code-area {
  background: #ffffff !important;
  color: #0b0c10 !important;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-code-chat input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-code-chat input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .xt-code-actions button {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-code-actions button:hover {
  border-color: rgba(33, 150, 238, 0.4);
  color: #2196ee;
}
body.light-theme .xt-llm-response {
  color: rgba(11, 12, 16, 0.6) !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* ========= SIMULATION RESULTS ========= */
body.light-theme .xt-sim-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-sim-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-sim-value {
  color: #0b0c10;
}

/* ========= TRADING SETUP ========= */
body.light-theme .xt-trading-mode {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-trading-mode-btn {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-trading-mode-btn.active {
  background: #ffffff;
  color: #0b0c10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-trading-budget input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-trading-preset-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-trading-preset-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-trading-preset-btn.active {
  background: rgba(33, 150, 238, 0.1);
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-trading-summary {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-trading-summary-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-trading-summary-value {
  color: #0b0c10;
}

/* ========= ACTIVE TRADING BAR ========= */
body.light-theme .xt-active-trading-bar {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-label {
  color: #0b0c10;
}

body.light-theme .xt-atb-mode {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(11, 12, 16, 0.6);
}

body.light-theme .xt-atb-pnl-value.positive {
  color: #16a34a;
}
body.light-theme .xt-atb-pnl-value.negative {
  color: #dc2626;
}

body.light-theme .xt-atb-stat-label {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .xt-atb-stat-value {
  color: #0b0c10;
}

body.light-theme .xt-atb-expand {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-atb-expand:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0b0c10;
}

/* Action buttons row */
body.light-theme .xt-atb-actions {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-action-btn {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-atb-action-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-atb-action-btn.primary {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}

/* Positions table */
body.light-theme .xt-atb-positions {
  border-top-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .xt-atb-positions-table {
  color: #0b0c10;
}
body.light-theme .xt-atb-positions-table th {
  color: rgba(11, 12, 16, 0.5);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-atb-positions-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
}
body.light-theme .xt-atb-close-position {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-atb-close-position:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Close all / Stop buttons */
body.light-theme .xt-atb-close-all {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}
body.light-theme .xt-atb-stop {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

/* View toggle buttons (grid/list/full) */
body.light-theme .xt-atb-view-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .xt-atb-view-btn.active {
  background: rgba(33, 150, 238, 0.1);
  border-color: #2196ee;
  color: #2196ee;
}

/* ========= MANUAL TRADING SECTION ========= */
body.light-theme .xt-manual-trade-section {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .xt-manual-trade-search input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-manual-trade-search input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .xt-manual-trade-field label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-manual-trade-field input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}

/* ========= ACTIVE TRADES MANAGER (sidebar panel) ========= */
body.light-theme .at-balance-row {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .at-balance-value {
  color: #0b0c10;
}
body.light-theme .at-position {
  border-color: rgba(0, 0, 0, 0.06);
  color: #0b0c10;
}
body.light-theme .at-position.cash {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .at-ticker {
  color: #0b0c10;
}
body.light-theme .at-invested {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .at-pnl-small.positive {
  color: #16a34a;
}
body.light-theme .at-pnl-small.negative {
  color: #dc2626;
}
body.light-theme .at-sell-btn {
  color: rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .at-sell-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}
body.light-theme .at-sell-portfolio-btn {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* ========= MODALS ========= */
body.light-theme .modal-backdrop {
  background: rgba(0, 0, 0, 0.3);
}
body.light-theme .modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.98)) !important;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  color: #0b0c10;
}
body.light-theme .modal-content h2,
body.light-theme .modal-content h3 {
  color: #0b0c10 !important;
}
body.light-theme .modal-content p {
  color: rgba(11, 12, 16, 0.7);
}
body.light-theme .modal-content label {
  color: rgba(11, 12, 16, 0.7);
}
body.light-theme .modal-content input[type="text"],
body.light-theme .modal-content input[type="email"],
body.light-theme .modal-content input[type="password"],
body.light-theme .modal-content input[type="number"] {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #0b0c10 !important;
}
body.light-theme .modal-content input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .modal-close {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .modal-close:hover {
  color: #0b0c10;
}

/* Trading setup modal */
body.light-theme .trading-setup-modal {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1);
}

/* ========= SIGNALS MODAL ========= */
body.light-theme .signals-modal-content {
  background: #ffffff !important;
  color: #0b0c10;
}

/* ========= SCROLL TO BOTTOM BUTTON ========= */
body.light-theme .scroll-btn {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========= QUALIFICATION FLOW BUTTONS ========= */
body.light-theme .qual-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0b0c10;
}
body.light-theme .qual-btn:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.05);
}
body.light-theme .qual-btn.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
}

/* ========= GENERAL SCROLLBAR ========= */
body.light-theme ::-webkit-scrollbar {
  width: 6px;
}
body.light-theme ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}
body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ========= GLOW ADJUSTMENTS FOR LIGHT MODE ========= */
/* Dimmer glow effects on light background */
body.light-theme .xt-btn-primary,
body.light-theme .xt-trading-start,
body.light-theme .xt-atb-action-btn.primary,
body.light-theme .xt-custom-ticker button {
  box-shadow: 0 0 10px rgba(33, 150, 238, 0.2);
}
body.light-theme .xt-btn-primary:hover,
body.light-theme .xt-trading-start:hover,
body.light-theme .xt-atb-action-btn.primary:hover,
body.light-theme .xt-custom-ticker button:hover {
  box-shadow: 0 0 16px rgba(33, 150, 238, 0.35);
}
body.light-theme .sendbtn {
  box-shadow: 0 0 10px rgba(33, 150, 238, 0.2), 0 2px 8px rgba(33, 150, 238, 0.15) !important;
}
body.light-theme .xt-atb-close-all,
body.light-theme .at-sell-portfolio-btn,
body.light-theme .xt-atb-stop {
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
body.light-theme .xt-manual-trade-buy {
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}
body.light-theme .xt-manual-trade-sell {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* ========= UTILITY CLASSES FOR INLINE STYLE OVERRIDES ========= */
body.light-theme .xt-text-dim {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .xt-text-muted-inline {
  color: rgba(0, 0, 0, 0.4) !important;
}
body.light-theme .xt-text-light {
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .xt-bg-dim {
  background: rgba(0, 0, 0, 0.04) !important;
}

/* ========= PREMIUM BLUR SECTION ========= */
body.light-theme .premium-blur {
  background: rgba(255, 255, 255, 0.9);
}

/* ========= TOOLTIP / POPOVER ========= */
body.light-theme [data-tooltip]::after {
  background: #0b0c10;
  color: #ffffff;
}

/* ========= LEVERAGE BADGE ========= */
body.light-theme .leverage-badge {
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
}

/* ========= ACTIVITY LOG ========= */
body.light-theme .xt-activity-log-panel {
  background: #ffffff !important;
  border-left-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .xt-activity-log-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .xt-activity-log-close {
  color: rgba(0, 0, 0, 0.4) !important;
}
body.light-theme .xt-activity-log-close:hover {
  color: #0b0c10 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
body.light-theme .xt-activity-log-line {
  color: rgba(11, 12, 16, 0.7) !important;
}
body.light-theme .xt-log-time {
  color: rgba(11, 12, 16, 0.4) !important;
}
