/* Pocket Terminal v3 - Bot, Strategy Builder, Analytics, Community & Referral Gate Styles */

/* Referral Gate Overlay & Activation Modal */
.activation-overlay,
.referral-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 25%, rgba(13, 19, 33, 0.96) 0%, rgba(6, 9, 16, 0.98) 100%);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}

.activation-overlay[hidden],
#referral-gate-overlay[hidden],
.referral-gate-overlay[hidden] {
  display: none !important;
}

.activation-card {
  background: #0d121e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  max-width: 580px;
  width: 100%;
  padding: 38px 36px 32px 36px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.05);
  position: relative;
  color: #e2e8f0;
  animation: fadeIn 0.25s ease-out;
  text-align: left;
}

.act-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

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

.act-top-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 12px;
}

.act-main-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.act-main-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 26px 0;
}

/* Steps List */
.act-steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.act-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.act-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.act-step-icon.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.act-step-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.act-step-icon.waiting {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.25);
  color: #64748b;
}

.act-step-body {
  flex: 1;
}

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

.act-step-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.act-step-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
}

.act-step-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.act-step-badge.passed {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.act-step-badge.failed {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.act-step-badge.waiting {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.2);
  color: #64748b;
}

/* Balance Box */
.act-balance-box {
  background: #090e18;
  border: 1px solid #1a2233;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.act-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.act-balance-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.act-balance-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.act-progress-track {
  background: #1e2638;
  height: 6px;
  border-radius: 3px;
  margin: 12px 0 8px 0;
  overflow: hidden;
}

.act-progress-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.act-missing-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* ID Box */
.act-id-box {
  background: #090e18;
  border: 1px solid #1a2233;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.act-id-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.act-id-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.act-id-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.act-btn-copy {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.act-btn-copy:hover {
  background: rgba(2, 132, 199, 0.22);
  color: #ffffff;
}

.act-btn-copy.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

/* Actions Row */
.act-actions-row {
  display: flex;
  gap: 12px;
}

.act-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b1120;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  text-align: center;
}

.act-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.act-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.act-btn-secondary {
  flex: 1;
  background: #182234;
  border: 1px solid #2e3d56;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-align: center;
}

.act-btn-secondary:hover {
  background: #233148;
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.act-status-feedback {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
  animation: fadeIn 0.2s ease-out;
}

.act-status-feedback.success {
  color: #34d399;
}

/* FAQs */
.act-faqs-box {
  border-top: 1px solid #1a2233;
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.act-faq-p {
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.act-faq-p strong {
  color: #94a3b8;
}

/* Bottom Nav */
.act-bottom-nav {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.act-switch-link {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

.act-switch-link:hover {
  color: #7dd3fc;
}

.act-bottom-sep {
  color: #475569;
  font-size: 12px;
}

.act-admin-pin-link {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.act-admin-pin-link:hover {
  color: #94a3b8;
}
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}
.referral-status-badge.checking { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid #38bdf8; }
.referral-status-badge.not_confirmed { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid #ef4444; }
.referral-status-badge.confirmed { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid #10b981; }
.referral-status-badge.revoked { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid #ef4444; }
.referral-status-badge.source_unavailable { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid #f59e0b; }

.referral-message {
  font-size: 13.5px;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 20px;
}
.referral-uid-box {
  background: #0d121d;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.referral-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-ref-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.btn-ref-primary:hover { opacity: 0.9; }
.btn-ref-secondary {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ref-secondary:hover { background: #26334a; }
.referral-admin-link {
  margin-top: 18px;
  font-size: 11.5px;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
}

/* Modals & Panels for Bot, Builder & Analytics */
.bot-main-container {
  position: absolute;
  top: 56px;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d131f;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}
.bot-main-container[hidden] {
  display: none !important;
}
.bot-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131b2c;
  border-bottom: 1px solid #222e44;
  padding: 0 16px;
  height: 48px;
}
.bot-tabs-group {
  display: flex;
  gap: 6px;
  height: 100%;
}
.bot-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}
.bot-tab-btn:hover { color: #fff; }
.bot-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}
.bot-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-danger-halt {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-danger-halt:hover { background: #b91c1c; }
.bot-pane-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: none;
}
.bot-pane-view.active {
  display: block;
}

/* Dashboard Cards Grid */
.bot-dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric-card {
  background: #141c2c;
  border: 1px solid #24324a;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-card-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.metric-card-val {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
}
.metric-card-val.green { color: #10b981; }
.metric-card-val.red { color: #ef4444; }

/* Dashboard 2-Column Layout */
.dash-columns-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .dash-columns-grid {
    grid-template-columns: 1fr;
  }
}
.dash-left-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Dashboard Trades Table */
.dash-trades-table-wrap {
  background: #141c2c;
  border: 1px solid #24324a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.dash-trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}
.dash-trades-table th {
  background: #0d1422;
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 11px 12px;
  border-bottom: 1px solid #24324a;
  white-space: nowrap;
}
.dash-trades-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  white-space: nowrap;
  color: #cbd5e1;
}
.dash-trades-table tr:last-child td {
  border-bottom: none;
}
.dash-trades-table tbody tr {
  transition: background-color 0.15s ease;
}
.dash-trades-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.dash-trades-table tr.dash-trade-live-row {
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3b82f6;
}
.dash-trades-table tr.dash-trade-live-row:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Direction Badges */
.dash-badge-dir {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.dash-badge-dir.call {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.dash-badge-dir.put {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Live Timer & Badges */
.dash-trade-timer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
  animation: dashPulse 1.5s infinite;
  margin-right: 4px;
}
@keyframes dashPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* Result & P&L Badges */
.dash-pnl-win {
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dash-pnl-loss {
  color: #ef4444;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dash-pnl-refund {
  color: #94a3b8;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dash-live-pnl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.dash-live-pnl.win {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.dash-live-pnl.loss {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.dash-live-pnl.pending {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}


/* Strategies List Cards */
.strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.strat-card {
  background: #141d2e;
  border: 1px solid #24324a;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s;
}
.strat-card:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.strat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.strat-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.strat-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.strat-badge.running { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid #10b981; }
.strat-badge.paused { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.strat-badge.stopped { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid #64748b; }
.strat-badge.ready { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid #38bdf8; }
.strat-badge.ready_for_test { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid #38bdf8; }
.strat-badge.draft { background: rgba(148,163,184,0.12); color: #94a3b8; border: 1px solid #475569; }

.strat-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
  margin: 3px 0;
}
.strat-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.strat-meta-item b {
  color: #e2e8f0;
  font-weight: 600;
}

.strat-desc {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 6px;
  line-height: 1.35;
}
.strat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.strat-tag {
  font-size: 10px;
  background: #1c273c;
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 3px;
}
.strat-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.launch-mode-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.launch-mode-switch {
  display: inline-flex;
  background: #090e18;
  border: 1px solid #222f46;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  align-items: center;
  user-select: none;
}
.mode-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-btn:hover {
  color: #cbd5e1;
}
.mode-btn.mode-demo.active {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.4);
}
.mode-btn.mode-real.active {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.5);
}
.btn-launch {
  font-weight: 600;
  transition: all 0.2s;
}
.btn-launch.real-mode {
  background: linear-gradient(135deg, #ea580c, #c2410c) !important;
  border-color: #f97316 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}
.btn-launch.real-mode:hover {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
}
.badge-account-mode {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}
.badge-account-mode.demo {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-account-mode.real {
  background: rgba(234, 88, 12, 0.18);
  color: #fb923c;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

/* Builder Workspace */
.builder-layout {
  display: flex;
  flex-direction: column;
  background: #131b2c;
  border: 1px solid #233149;
  border-radius: 10px;
  overflow: hidden;
  height: calc(100vh - 120px);
}
.builder-tabs {
  display: flex;
  background: #0d1421;
  border-bottom: 1px solid #202b3d;
  padding: 0 12px;
}
.builder-subtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
}
.builder-subtab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}
.builder-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.builder-pane {
  display: none;
}
.builder-pane.active {
  display: block;
}

/* Asset Selector Grid */
.asset-selector-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.asset-search-input {
  background: #0d131f;
  border: 1px solid #24324a;
  border-radius: 6px;
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  width: 260px;
}
.collapsible-header:hover {
  background: #1e2b44 !important;
}
.asset-count-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.btn-asset-filter {
  background: #182236;
  border: 1px solid #293852;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-asset-filter:hover {
  background: #22304a;
  color: #fff;
  border-color: #38bdf8;
}
/* Category tab buttons */
.btn-asset-cat {
  background: #182236;
  border: 1px solid #293852;
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-asset-cat:hover {
  background: #22304a;
  color: #e2e8f0;
  border-color: #38bdf8;
}
.btn-asset-cat.active {
  background: rgba(56,189,248,0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}
/* Category section header */
.asset-cat-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 4px 2px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #1e2d42;
  margin-top: 6px;
}
.asset-cat-count {
  font-size: 10px;
  color: #38bdf8;
  font-weight: normal;
}
.asset-cat-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 5px;
  margin-bottom: 4px;
}
.asset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}
.asset-checkbox-item {
  background: #182236;
  border: 1px solid #283752;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  transition: all 0.15s;
}
.asset-checkbox-item:hover { border-color: #38bdf8; }
.asset-checkbox-item.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
}
.asset-checkbox-item.hidden {
  display: none !important;
}
.asset-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.asset-tag-otc {
  font-size: 9px;
  padding: 1px 4px;
  background: #312e81;
  color: #a5b4fc;
  border-radius: 3px;
  font-weight: 600;
}
.asset-tag-live {
  font-size: 9px;
  padding: 1px 4px;
  background: #064e3b;
  color: #6ee7b7;
  border-radius: 3px;
  font-weight: 600;
}


/* Condition Builder Trees */
.condition-tree-box {
  background: #0d1421;
  border: 1px solid #222f46;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.condition-rule-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #172033;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}
.condition-rule-row select, .condition-rule-row input {
  background: #0d121c;
  border: 1px solid #2b3b55;
  color: #fff;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12.5px;
}

/* Martingale Step Card */
.mg-step-box {
  background: #162033;
  border: 1px solid #253550;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mg-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #38bdf8;
}

/* Analytics & Equity Chart */
.analytics-canvas-box {
  background: #0d131f;
  border: 1px solid #222f46;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
  position: relative;
}
.analytics-table-wrap {
  background: #141c2c;
  border: 1px solid #222f46;
  border-radius: 8px;
  overflow: hidden;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.analytics-table th {
  background: #0e1522;
  color: #94a3b8;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #222f46;
}
.analytics-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #1c273a;
  color: #cbd5e1;
}

/* Community Cards */
.community-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.community-card {
  background: #141c2c;
  border: 1px solid #24324a;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.comm-badge-verified {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid #10b981;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Admin Dashboard Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th, .admin-table td {
  padding: 8px 12px;
  border: 1px solid #222f46;
}
.admin-table th { background: #0d131f; color: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════
   STRATEGY BUILDER — Visual Condition Editor Styles
   strategy_builder.js renders into #strategy-builder-root
   ═══════════════════════════════════════════════════════════════════ */

/* ── Builder Wrapper ── */
.sb-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Sections ── */
.sb-section {
  background: #131b2c;
  border: 1px solid #24324a;
  border-radius: 8px;
  padding: 16px;
}

.sb-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-section-icon { font-size: 16px; }

/* ── Header ── */
.sb-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.sb-header-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 280px;
}

.sb-header-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Mode Toggle ── */
.sb-mode-toggle-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0d1421;
  border: 1px solid #1e2d44;
  border-radius: 8px;
}

.sb-mode-btn {
  padding: 6px 14px;
  font-size: 12px;
  border: 1px solid #24324a;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.sb-mode-btn.active {
  background: #1e3a5f;
  color: #38bdf8;
  border-color: #38bdf8;
}

.sb-mode-hint {
  font-size: 11px;
  color: #64748b;
  margin-left: 4px;
}

/* ── Field Groups ── */
.sb-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sb-fields-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.sb-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.sb-input {
  padding: 7px 10px;
  background: #0d131f;
  border: 1px solid #24324a;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.sb-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.sb-select {
  padding: 7px 10px;
  background: #0d131f;
  border: 1px solid #24324a;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s;
}

.sb-select:focus {
  outline: none;
  border-color: #38bdf8;
}

.sb-help {
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

/* ── Entry Sections ── */
.sb-entry-section {
  border-left-width: 3px;
}

.sb-entry-up   { border-left-color: #10b981; }
.sb-entry-down { border-left-color: #ef4444; }

.sb-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sb-entry-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.sb-entry-up   .sb-entry-title { color: #10b981; }
.sb-entry-down .sb-entry-title { color: #ef4444; }

.sb-entry-operator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-operator-select {
  font-size: 12px !important;
  padding: 5px 8px !important;
}

/* ── Rules List ── */
.sb-rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.sb-empty-rules {
  padding: 16px;
  text-align: center;
  border: 1px dashed #24324a;
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
}

.sb-empty-hint { font-style: italic; }

/* ── Condition Cards ── */
.sb-condition-card {
  background: #0d1829;
  border: 1px solid #1e2d44;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}

.sb-condition-card:hover {
  border-color: #2a4065;
}

.sb-condition-card.disabled {
  opacity: 0.45;
  border-style: dashed;
}

.sb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sb-card-indicator {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

.sb-card-actions {
  display: flex;
  gap: 4px;
}

.sb-card-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  transition: all 0.15s;
}

.sb-card-btn:hover {
  background: #182236;
  color: #e2e8f0;
  border-color: #24324a;
}

.sb-card-delete:hover {
  color: #ef4444;
  background: #1a0a0a;
  border-color: #ef4444;
}

.sb-card-condition {
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.sb-card-params {
  font-size: 11px;
  color: #64748b;
}

.sb-card-status {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sb-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.sb-status.ok {
  background: #052c1a;
  color: #10b981;
  border: 1px solid #10b981;
}

.sb-status.fail {
  background: #1a0505;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.sb-status.insufficient {
  background: #1a1a05;
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.sb-status-reason {
  font-size: 11px;
  color: #64748b;
}

.sb-disabled-note {
  font-size: 11px;
  color: #475569;
  padding: 6px 10px;
  background: #0d1421;
  border-radius: 4px;
}

/* ── Add Condition Button ── */
.sb-add-condition-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed #38bdf8;
  border-radius: 6px;
  color: #38bdf8;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: all 0.15s;
}

.sb-add-condition-btn:hover {
  background: #0a1e35;
  border-style: solid;
}

/* ── Collapsible ── */
.sb-collapsible-body { padding-top: 12px; }

.sb-collapse-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  margin-left: auto;
  padding: 2px 6px;
}

.sb-collapse-btn:hover { color: #94a3b8; }

.sb-subsection-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 8px;
}

.sb-subsection-title:first-child { margin-top: 0; }

/* ── Narrative Summary ── */
.sb-narrative-section { background: #0d1421; }

.sb-narrative {
  font-size: 13px;
  line-height: 1.6;
  color: #94a3b8;
}

.sb-narrative-trigger {
  margin-bottom: 8px;
  color: #cbd5e1;
}

.sb-narrative-rule {
  padding: 8px 12px;
  background: #131b2c;
  border-radius: 6px;
  margin-bottom: 6px;
  border-left: 3px solid #24324a;
}

.sb-narrative-note {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

/* ── Actions Bar ── */
.sb-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}

/* ── Check Result ── */
.sb-check-result {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.sb-check-result.loading { color: #64748b; }
.sb-check-result.error   { color: #ef4444; }

.sb-check-header {
  padding: 8px 12px;
  background: #0d1421;
  border-radius: 6px;
  margin-bottom: 8px;
  color: #94a3b8;
}

.sb-check-group {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid transparent;
}

.sb-check-group.ok   { background: #052c1a; border-color: #10b981; color: #10b981; }
.sb-check-group.fail { background: #1a0505; border-color: #ef4444; color: #ef4444; }

.sb-check-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.sb-check-list li {
  padding: 2px 0;
  font-size: 11px;
}

.sb-check-list li.ok   { color: #10b981; }
.sb-check-list li.fail { color: #ef4444; }
.sb-check-list li.insuf { color: #f59e0b; }

.sb-check-signal {
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}

.sb-check-signal.up   { background: #052c1a; color: #10b981; }
.sb-check-signal.down { background: #1a0505; color: #ef4444; }
.sb-check-conflict    { background: #1a1005; color: #f59e0b; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.sb-check-no-signal   { background: #0d1421; color: #64748b; padding: 8px 12px; border-radius: 6px; }

/* ── JSON Panel ── */
.sb-json-panel {
  padding: 16px;
  background: #131b2c;
  border: 1px solid #24324a;
  border-radius: 8px;
  margin-top: 8px;
}

.sb-json-textarea {
  width: 100%;
  min-height: 350px;
  background: #090d16;
  border: 1px solid #1e2d44;
  border-radius: 6px;
  color: #38bdf8;
  font-family: monospace;
  font-size: 12px;
  padding: 12px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
  margin-top: 10px;
}

.sb-json-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.sb-json-status      { font-size: 12px; }
.sb-json-status.ok   { color: #10b981; }
.sb-json-status.err  { color: #ef4444; }

/* ── MODAL ── */
.sb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sb-modal {
  background: #131b2c;
  border: 1px solid #24324a;
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.sb-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #1e2d44;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.sb-modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}

.sb-modal-close:hover { color: #ef4444; }

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

.sb-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #1e2d44;
}

/* ── Indicator Picker ── */
.sb-picker-hint {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 14px;
}

.sb-ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.sb-ind-item {
  padding: 12px;
  background: #0d1421;
  border: 1px solid #1e2d44;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.sb-ind-item:hover {
  background: #0f1e38;
  border-color: #38bdf8;
}

.sb-ind-item.experimental {
  border-style: dashed;
}

.sb-ind-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.sb-ind-item-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.sb-exp-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  padding: 1px 5px;
  background: #1a1005;
  color: #f59e0b;
  border: 1px solid #f59e0b;
  border-radius: 3px;
  font-weight: 700;
}

/* ── Condition Editor ── */
.sb-editor { }

.sb-editor-ind-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.sb-editor-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.5;
}

.sb-exp-warning {
  padding: 8px 12px;
  background: #1a1005;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #f59e0b;
  font-size: 12px;
  margin-bottom: 12px;
}

.sb-editor-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1e2d44;
}

/* ── Mode Account Switch ── */
.sb-mode-account {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ═══════════════════════════════════════════════════════════════════
   COMPETITOR-MATCHING STRATEGY BUILDER UI (TABS + SIDEBAR + CARDS)
   ═══════════════════════════════════════════════════════════════════ */

.sb-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 14px;
}

.sb-title-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed #38bdf8;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 2px 4px;
  min-width: 260px;
}
.sb-title-input:focus {
  outline: none;
  border-bottom: 2px solid #38bdf8;
}

/* 4-Tabs Navigation */
.sb-subtabs-nav {
  display: flex;
  gap: 6px;
  background: #0b101b;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #1c2638;
  margin-bottom: 16px;
}

.sb-subtab-btn {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.sb-subtab-btn:hover {
  background: #141c2c;
  color: #f1f5f9;
}

.sb-subtab-btn.active {
  background: #1e293b;
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

/* Indicators 2-Column Layout */
.sb-indicators-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 16px;
  align-items: start;
}

.sb-sidebar-indicators {
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sb-sidebar-header {
  padding: 12px 14px;
  background: #172133;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  border-bottom: 1px solid #1f293d;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-ind-picker-list {
  display: flex;
  flex-direction: column;
  max-height: 620px;
  overflow-y: auto;
}

.sb-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #172133;
  transition: background 0.15s;
  cursor: pointer;
}
.sb-picker-row:hover {
  background: #17243b;
}

.sb-picker-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #e2e8f0;
  font-weight: 500;
}

.sb-picker-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #22c55e;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.sb-picker-add-btn:hover {
  background: #22c55e;
  color: #fff;
}

/* Accordion Cards */
.sb-main-indicators-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sb-card-accordion {
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.sb-card-accordion.expanded {
  border-color: #2b3b55;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #162133;
  cursor: pointer;
  user-select: none;
}
.sb-card-head:hover {
  background: #19253b;
}

.sb-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-card-icon {
  font-size: 17px;
}

.sb-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.sb-card-tag {
  font-size: 11px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.sb-card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-card-btn-action {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.sb-card-btn-action:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.sb-card-arrow {
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s;
}
.sb-card-accordion.expanded .sb-card-arrow {
  transform: rotate(180deg);
}

/* Card Body */
.sb-card-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #1a2538;
}

.sb-param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sb-param-label {
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 500;
}

.sb-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sb-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #172133;
  border: 1px solid #27354d;
  color: #38bdf8;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sb-step-btn:hover {
  background: #24324a;
  color: #fff;
}

.sb-step-input {
  width: 58px;
  height: 26px;
  background: #0a0f18;
  border: 1px solid #27354d;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
}

.sb-card-select {
  background: #0a0f18;
  border: 1px solid #27354d;
  color: #fff;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
  min-width: 140px;
}

.sb-signal-box {
  background: #0c121e;
  border: 1px solid #1e2a3d;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sb-signal-title {
  font-size: 12.5px;
  font-weight: 600;
}
.sb-signal-title.up { color: #22c55e; }
.sb-signal-title.down { color: #ef4444; }

.sb-signal-select {
  flex: 1;
  max-width: 380px;
  background: #141c2c;
  border: 1px solid #26364f;
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px;
}

.sb-legend-box {
  background: #090e17;
  border-left: 3px solid #38bdf8;
  padding: 8px 12px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  border-radius: 0 5px 5px 0;
  margin-top: 6px;
}

.sb-bottom-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #1a2538;
}

.sb-check-status-box {
  flex: 1;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 12.5px;
}
.sb-check-status-box.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid #22c55e;
  color: #4ade80;
}
.sb-check-status-box.neutral {
  background: #131d2e;
  border: 1px solid #253550;
  color: #cbd5e1;
}
.sb-check-status-box.alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #ef4444;
  color: #f87171;
}

.sb-live-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sb-live-badge.ok {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
}
.sb-live-badge.fail {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
}

/* ══════════════════════════════════════════════════════════════
   COMPETITOR 1:1 REGLAMENT & MARTINGALE STYLING
   ══════════════════════════════════════════════════════════════ */

.competitor-reglament-card {
  max-width: 680px;
  margin: 0 auto;
}

.competitor-card-title {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 12px;
}

.competitor-card-box {
  background: #141c2c;
  border: 1px solid #212c3f;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.competitor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #1a2538;
}

.competitor-row:last-child {
  border-bottom: none;
}

.competitor-row-label {
  font-size: 13.5px;
  color: #e2e8f0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.competitor-row-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.competitor-select {
  background: #0f1624;
  border: 1px solid #233148;
  color: #94a3b8;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  min-width: 140px;
  text-align: right;
  transition: border-color 0.15s;
}

.competitor-select:hover, .competitor-select:focus {
  border-color: #38bdf8;
  color: #fff;
}

.competitor-select option {
  background: #0f172a;
  color: #fff;
  text-align: left;
}

.competitor-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  border: none;
  transition: all 0.12s;
  padding: 0;
  line-height: 1;
}

.btn-step-circle.minus {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.btn-step-circle.minus:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.08);
}

.btn-step-circle.plus {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.btn-step-circle.plus:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: scale(1.08);
}

.competitor-stepper-val {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.competitor-text-input {
  background: transparent;
  border: 1px solid #233148;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 13px;
  padding: 5px 8px;
  width: 105px;
  text-align: center;
  outline: none;
}

.competitor-text-input:focus {
  border-color: #38bdf8;
  color: #fff;
}

/* ── Competitor Martingale Step Cards ── */
.competitor-step-card {
  background: #141c2c;
  border: 1px solid #212c3f;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: border-color 0.2s;
}

.competitor-step-card:hover {
  border-color: #2b3a54;
}

.competitor-step-header {
  padding: 12px 18px;
  background: #101725;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a2538;
}

.competitor-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 8px;
}

.competitor-step-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.competitor-step-ctrl-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 3px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.competitor-step-ctrl-btn:hover {
  color: #fff;
  background: #1e293b;
}

.competitor-step-ctrl-btn.close:hover {
  color: #ef4444;
}

.competitor-step-body {
  padding: 0;
}

.competitor-step-body.collapsed {
  display: none;
}

.competitor-inline-num {
  width: 44px;
  background: #0d1421;
  border: 1px solid #24344d;
  color: #38bdf8;
  border-radius: 4px;
  text-align: center;
  padding: 3px 4px;
  font-weight: 600;
  font-size: 13px;
  margin: 0 4px;
  outline: none;
}

.competitor-inline-num:focus {
  border-color: #38bdf8;
}

.btn-add-competitor-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed #0284c7;
  border-radius: 8px;
  color: #38bdf8;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-competitor-step:hover {
  background: rgba(14, 165, 233, 0.16);
  border-style: solid;
  color: #7dd3fc;
}

/* AI Self-Learning Badges & Status */
.badge-ai-learning {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-learning-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-ai 1.8s infinite;
}

@keyframes pulse-ai {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Competitor-Matching History Tab Styles
   ───────────────────────────────────────────────────────────────────────────── */
.history-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: #141c2c;
  border: 1px solid #222f46;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.hf-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hf-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: none;
}

.hf-control-box {
  display: flex;
  align-items: center;
  background: #1a2333;
  border: 1px solid #2a3b57;
  border-radius: 6px;
  padding: 0 8px;
  height: 36px;
  box-sizing: border-box;
}

.hf-control-box:hover {
  border-color: #3b82f6;
}

.hf-icon {
  font-size: 14px;
  margin-right: 6px;
  opacity: 0.85;
}

.hf-select {
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  padding-right: 12px;
  width: 100%;
}

.hf-select option {
  background: #141c2c;
  color: #f1f5f9;
}

.hf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.hf-btn-apply {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0 16px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hf-btn-apply:hover {
  background: #1d4ed8;
}

.hf-btn-export {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hf-btn-export:hover {
  background: #0369a1;
}

.hf-btn-clear {
  background: #ea580c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hf-btn-clear:hover {
  background: #c2410c;
}

.history-empty-placeholder {
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

/* ─── Rail Open Deals Indicator Badge (Pocket Option Style 1:1) ─── */
.rail-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rail-deal-badge {
  position: absolute;
  top: -4px;
  right: -16px;
  background: #26262f;
  border: 1px solid #46464e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  min-width: 18px;
  height: 18px;
  border-radius: 4px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  line-height: 1;
  z-index: 5;
}

.rail-deal-badge.has-deals {
  background: #1e2638;
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}


