/* ============================================================================
   BANK CLERK — Strategy CSS
   Accent: amber/orange  (#f97316)   Profit: neon green  (#10b981)
   All selectors scoped to .bc-* or #bc-* / .bankclerk-workspace to avoid
   collision with Trade X, Goon X, or Fresh X styles.
   ============================================================================ */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --bc-accent:          #f97316;
  --bc-accent-dim:      rgba(249, 115, 22, 0.18);
  --bc-accent-glow:     rgba(249, 115, 22, 0.32);
  --bc-green:           #10b981;
  --bc-green-dim:       rgba(16, 185, 129, 0.15);
  --bc-red:             #ef4444;
  --bc-red-dim:         rgba(239, 68, 68, 0.14);
  --bc-blue:            #6366f1;
  --bc-blue-dim:        rgba(99, 102, 241, 0.14);
  --bc-card-bg:         rgba(15, 20, 35, 0.82);
  --bc-card-border:     rgba(249, 115, 22, 0.22);
  --bc-text:            rgba(220, 230, 255, 0.88);
  --bc-text-muted:      rgba(175, 195, 240, 0.48);
  --bc-radius:          10px;
}

/* ── Workspace shell ────────────────────────────────────────────────────────── */
.bankclerk-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ── Shared card base ───────────────────────────────────────────────────────── */
.bc-card {
  background:    var(--bc-card-bg);
  border:        1px solid var(--bc-card-border);
  border-radius: var(--bc-radius);
  padding:       16px;
  box-shadow:    0 2px 18px var(--bc-accent-glow);
  width: 100%;
  box-sizing: border-box;
}

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

.bc-card-title {
  font-size:   13px;
  font-weight: 600;
  color:       var(--bc-accent);
  letter-spacing: 0.3px;
}

.bc-card-sub {
  font-size: 10.5px;
  color:     var(--bc-text-muted);
}

/* ════════════════════════════════════════════════════════════
   1. LIVE CHART CARD
   ════════════════════════════════════════════════════════════ */
.bc-chart-card {
  composes: bc-card;
}

.bc-chart-header {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  margin-bottom:   10px;
}

.bc-chart-market-name {
  font-size:   12px;
  font-weight: 600;
  color:       var(--bc-text);
}

.bc-chart-price-col {
  text-align: right;
}

.bc-chart-price {
  font-size:   18px;
  font-weight: 700;
  color:       var(--bc-green);
  font-variant-numeric: tabular-nums;
}

.bc-chart-change {
  font-size:  10px;
  color:      var(--bc-text-muted);
  margin-top: 1px;
}

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

.bc-chart-canvas-wrap {
  position: relative;
  width:    100%;
  height:   120px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(8, 14, 28, 0.6);
}

#bc-chart-canvas {
  width:  100%;
  height: 100%;
  display: block;
}

.bc-chart-waiting {
  position:  absolute;
  inset:     0;
  display:   flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color:     var(--bc-text-muted);
  background: rgba(8, 14, 28, 0.7);
  border-radius: 6px;
}

/* ════════════════════════════════════════════════════════════
   2. CONFIGURATION CARD
   ════════════════════════════════════════════════════════════ */
.bc-config-card {}

/* Market / symbol selectors row */
.bc-selectors-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:           8px;
  margin-bottom: 10px;
}

.bc-field label {
  display:    block;
  font-size:  10px;
  color:      var(--bc-text-muted);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bc-select {
  width:         100%;
  background:    rgba(12, 17, 32, 0.85);
  border:        1px solid rgba(249, 115, 22, 0.22);
  border-radius: 6px;
  color:         var(--bc-text);
  font-size:     11.5px;
  padding:       5px 8px;
  appearance:    none;
  cursor:        pointer;
  transition:    border-color 0.2s;
}
.bc-select:focus {
  outline:       none;
  border-color:  var(--bc-accent);
}

/* Growth rate buttons */
.bc-growth-section {
  margin-bottom: 10px;
}

.bc-section-label {
  font-size:   10px;
  color:       var(--bc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.bc-growth-btns {
  display:     flex;
  gap:         5px;
  flex-wrap:   wrap;
}

.bc-growth-btn {
  flex:          1 1 0;
  min-width:     40px;
  padding:       5px 0;
  background:    rgba(30, 38, 60, 0.7);
  border:        1px solid rgba(249, 115, 22, 0.18);
  border-radius: 5px;
  color:         var(--bc-text-muted);
  font-size:     11px;
  font-weight:   600;
  cursor:        pointer;
  text-align:    center;
  transition:    background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.bc-growth-btn.active,
.bc-growth-btn:hover {
  background:    var(--bc-accent-dim);
  border-color:  var(--bc-accent);
  color:         var(--bc-accent);
  box-shadow:    0 0 8px var(--bc-accent-glow);
}

/* Stake section */
.bc-stake-section {
  margin-bottom: 10px;
}

.bc-stake-row {
  display:     flex;
  align-items: center;
  gap:         6px;
  margin-top:  4px;
}

.bc-stake-prefix {
  font-size: 11px;
  color:     var(--bc-text-muted);
  flex-shrink: 0;
}

.bc-stake-input {
  flex:          1;
  background:    rgba(12, 17, 32, 0.85);
  border:        1px solid rgba(249, 115, 22, 0.22);
  border-radius: 6px;
  color:         var(--bc-text);
  font-size:     13px;
  font-weight:   600;
  padding:       5px 8px;
  text-align:    right;
  font-variant-numeric: tabular-nums;
  transition:    border-color 0.2s;
}
.bc-stake-input:focus {
  outline:      none;
  border-color: var(--bc-accent);
}

/* Module toggle blocks (Take Ticks, Reinvest, Secure Profit, Auto Trade) */
.bc-module-block {
  background:    rgba(10, 15, 28, 0.55);
  border:        1px solid rgba(249, 115, 22, 0.12);
  border-radius: 7px;
  padding:       10px 12px;
  margin-bottom: 8px;
}

.bc-module-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  cursor:          pointer;
}

.bc-module-title {
  font-size:   11.5px;
  font-weight: 600;
  color:       var(--bc-text);
}

.bc-module-body {
  margin-top: 8px;
  display:    none;    /* shown when toggle is ON */
}
.bc-module-body.open { display: block; }

.bc-module-note {
  font-size: 10px;
  color:     var(--bc-text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* Mini toggle — same visual language as gx-mini-toggle */
.bc-mini-toggle {
  width:         34px;
  height:        18px;
  border-radius: 9px;
  background:    rgba(40, 50, 80, 0.7);
  border:        1px solid rgba(249, 115, 22, 0.2);
  position:      relative;
  cursor:        pointer;
  transition:    background 0.2s;
  flex-shrink:   0;
}
.bc-mini-toggle.on {
  background: rgba(249, 115, 22, 0.35);
  border-color: var(--bc-accent);
}
.bc-mini-knob {
  width:      12px;
  height:     12px;
  border-radius: 50%;
  background: rgba(180, 195, 230, 0.55);
  position:   absolute;
  top:        2px;
  left:       2px;
  transition: left 0.2s, background 0.2s;
}
.bc-mini-toggle.on .bc-mini-knob {
  left:       18px;
  background: var(--bc-accent);
}

/* Inline input in module body */
.bc-inline-row {
  display:     flex;
  align-items: center;
  gap:         8px;
  margin-top:  5px;
}

.bc-inline-label {
  font-size:  10.5px;
  color:      var(--bc-text-muted);
  flex-shrink: 0;
}

.bc-inline-input {
  flex:          1;
  max-width:     100px;
  background:    rgba(12, 17, 32, 0.85);
  border:        1px solid rgba(249, 115, 22, 0.18);
  border-radius: 5px;
  color:         var(--bc-text);
  font-size:     12px;
  padding:       4px 7px;
  text-align:    right;
  transition:    border-color 0.2s;
}
.bc-inline-input:focus {
  outline:      none;
  border-color: var(--bc-accent);
}

.bc-profit-info-row {
  display:   flex;
  gap:       12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.bc-profit-info-item {
  font-size: 10.5px;
  color:     var(--bc-text-muted);
}
.bc-profit-info-item span {
  color:       var(--bc-green);
  font-weight: 600;
}

/* Secure profit progress bar */
.bc-sp-progress-track {
  height:        5px;
  background:    rgba(30, 40, 65, 0.7);
  border-radius: 3px;
  overflow:      hidden;
  margin-top:    6px;
}
.bc-sp-progress-fill {
  height:     100%;
  background: linear-gradient(90deg, var(--bc-green), #34d399);
  border-radius: 3px;
  transition: width 0.5s ease;
  max-width:  100%;
}
.bc-sp-progress-text {
  font-size:  10px;
  color:      var(--bc-text-muted);
  margin-top: 3px;
}

/* Auto Trade status */
.bc-auto-status-text {
  font-size:  11px;
  color:      var(--bc-text-muted);
  margin-top: 5px;
  min-height: 14px;
}
.bc-auto-status-text.ready   { color: #f59e0b; font-weight: 600; }
.bc-auto-status-text.placing { color: var(--bc-accent); }
.bc-auto-status-text.waiting { color: var(--bc-blue); }
.bc-auto-status-text.error   { color: var(--bc-red); }
.bc-auto-status-text.secured { color: var(--bc-green); }

.bc-auto-progress {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 7px;
  background: rgba(9, 14, 26, 0.55);
}

.bc-auto-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--bc-text-muted);
}

.bc-auto-progress-head span:first-child {
  color: var(--bc-text);
  font-weight: 700;
}

.bc-auto-progress.ready .bc-auto-progress-head span:first-child {
  color: var(--bc-green);
}

.bc-auto-progress-track {
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 40, 65, 0.9);
}

.bc-auto-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bc-accent), var(--bc-green));
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.28);
  transition: width 0.35s ease;
}

.bc-auto-progress-runs {
  margin-top: 6px;
  min-height: 16px;
  font-size: 10px;
  color: var(--bc-text-muted);
}

.bc-auto-progress-runs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  margin-left: 4px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--bc-green);
  font-weight: 700;
}

/* ── Buy button ─────────────────────────────────────────────────────────────── */
.bc-buy-btn {
  width:         100%;
  padding:       11px 0;
  background:    linear-gradient(135deg, #f97316, #ea580c);
  border:        none;
  border-radius: 8px;
  color:         #fff;
  font-size:     13px;
  font-weight:   700;
  cursor:        pointer;
  letter-spacing: 0.3px;
  box-shadow:    0 2px 14px rgba(249, 115, 22, 0.4);
  transition:    opacity 0.18s, box-shadow 0.18s, transform 0.1s;
  margin-top:    6px;
}
.bc-buy-btn:hover:not(:disabled) {
  box-shadow:  0 4px 22px rgba(249, 115, 22, 0.55);
  transform:   translateY(-1px);
}
.bc-buy-btn:active:not(:disabled) { transform: translateY(0); }
.bc-buy-btn:disabled {
  opacity: 0.42;
  cursor:  not-allowed;
  box-shadow: none;
}

.bc-buy-summary {
  margin: 8px 0 6px;
  color: var(--bc-text-muted);
  font-size: 10px;
  letter-spacing: 0;
}

.bc-active-trade {
  margin: 8px 0 7px;
  padding: 9px 10px;
  border: 1px solid rgba(249, 115, 22, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 18, 31, 0.96), rgba(8, 12, 24, 0.92));
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.04), 0 0 18px rgba(249, 115, 22, 0.08);
}
.bc-active-trade[hidden] { display: none !important; }
.bc-active-head,
.bc-active-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bc-active-title {
  color: var(--bc-text);
  font-size: 11px;
  font-weight: 700;
}
.bc-active-meta {
  color: var(--bc-text-muted);
  font-size: 9.5px;
  text-align: right;
}
.bc-active-status {
  margin-top: 4px;
  color: var(--bc-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.bc-active-profit {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.bc-active-profit.pos { color: var(--bc-green); }
.bc-active-profit.neg { color: var(--bc-red); }
.bc-active-ticks,
.bc-active-spots {
  margin-top: 5px;
  color: var(--bc-text-muted);
  font-size: 10px;
}
.bc-active-track {
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 38, 60, 0.86);
}
.bc-active-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bc-accent), var(--bc-green));
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  transition: width 0.25s ease;
}
.bc-buy-btn.sell-mode {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.34);
}
.bc-buy-btn.sell-mode:hover:not(:disabled) {
  box-shadow: 0 4px 22px rgba(16, 185, 129, 0.5);
}

/* Status bar (below buy button) */
.bc-status-bar {
  min-height: 18px;
  font-size:  11px;
  text-align: center;
  margin-top: 4px;
  color:      var(--bc-text-muted);
  transition: color 0.2s;
}
.bc-status-bar.ok    { color: var(--bc-green); }
.bc-status-bar.error { color: var(--bc-red); }

/* ════════════════════════════════════════════════════════════
   3. STATS / KNOCKOUT HISTORY CARD
   ════════════════════════════════════════════════════════════ */
.bc-stats-card {}

.bc-stats-live-row {
  display:     flex;
  align-items: center;
  gap:         6px;
  margin-bottom: 10px;
}

.bc-live-dot {
  width:         7px;
  height:        7px;
  border-radius: 50%;
  background:    var(--bc-green);
  box-shadow:    0 0 6px var(--bc-green);
  animation:     bc-pulse 1.4s ease-in-out infinite;
}
@keyframes bc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

.bc-live-label {
  font-size:  11px;
  color:      var(--bc-green);
  font-weight: 600;
}

.bc-tick-counter {
  font-size:  10px;
  color:      var(--bc-text-muted);
  margin-left: auto;
}

/* Stats grid */
.bc-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap:           6px;
  margin:        8px 0 10px;
}

.bc-stat-item {
  background:    rgba(10, 14, 28, 0.5);
  border:        1px solid rgba(249, 115, 22, 0.1);
  border-radius: 6px;
  padding:       6px 4px;
  text-align:    center;
}

.bc-stat-label {
  font-size:  9px;
  color:      var(--bc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.bc-stat-value {
  font-size:  13px;
  font-weight: 700;
  color:      var(--bc-accent);
  font-variant-numeric: tabular-nums;
}

/* Growth rate filter buttons */
.bc-filter-row {
  display:     flex;
  gap:         5px;
  flex-wrap:   wrap;
  margin-bottom: 10px;
}

.bc-filter-btn {
  padding:       3px 9px;
  background:    rgba(30, 38, 60, 0.7);
  border:        1px solid rgba(249, 115, 22, 0.15);
  border-radius: 4px;
  color:         var(--bc-text-muted);
  font-size:     10.5px;
  font-weight:   500;
  cursor:        pointer;
  transition:    background 0.15s, color 0.15s, border-color 0.15s;
}
.bc-filter-btn.active,
.bc-filter-btn:hover {
  background:  var(--bc-accent-dim);
  border-color: var(--bc-accent);
  color:       var(--bc-accent);
}

/* Per-rate summary bar */
.bc-rate-summary {
  display:     flex;
  flex-wrap:   wrap;
  gap:         5px;
  margin-bottom: 8px;
  min-height:  20px;
}
.bc-rate-badge {
  display:       inline-flex;
  align-items:   center;
  gap:           3px;
  background:    rgba(249, 115, 22, 0.1);
  border:        1px solid rgba(249, 115, 22, 0.2);
  border-radius: 4px;
  padding:       2px 7px;
  font-size:     10px;
  color:         var(--bc-text);
  white-space:   nowrap;
  cursor:        default;
}
.bc-rate-badge b {
  color:      var(--bc-accent);
  font-weight: 700;
}
.bc-rate-nums {
  color: var(--bc-text-muted);
}

/* Max ticks row */
.bc-max-ticks-row {
  font-size:     10px;
  color:         var(--bc-text-muted);
  margin-bottom: 6px;
}
.bc-max-ticks-row span {
  color:       var(--bc-accent);
  font-weight: 700;
}

.bc-scan-proof-row {
  margin: 0 0 8px;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  background: rgba(14, 165, 233, 0.06);
  color: var(--bc-text-muted);
  font-size: 10px;
  line-height: 1.35;
}

/* Knockout run blocks */
.bc-runs-strip {
  display:     flex;
  flex-wrap:   wrap;
  gap:         4px;
  min-height:  58px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.bc-run-block {
  width:           50px;
  height:          24px;
  border-radius:   4px;
  cursor:          default;
  transition:      transform 0.1s, box-shadow 0.15s;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       10.5px;
  font-weight:     700;
  color:           rgba(255, 255, 255, 0.85);
  letter-spacing:  0;
  font-variant-numeric: tabular-nums;
  box-shadow:      inset 0 0 0 1px rgba(255,255,255,0.04);
}
.bc-run-block:hover {
  transform:  translateY(-3px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
  z-index: 1;
}

/* Color coding by ticks survived (matching legend) */
.bc-run-block.tier-0  { background: #7f1d1d; }   /* 1–3 ticks */
.bc-run-block.tier-1  { background: #8f1d1d; }   /* 4–10 */
.bc-run-block.tier-2  { background: #a16207; }   /* 11–25 */
.bc-run-block.tier-3  { background: #0f766e; }   /* 26–50 */
.bc-run-block.tier-4  { background: #047857; }   /* 51+ */
.bc-run-block.tier-5  {
  background: #0891b2;
  color: #c8f5ff;
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.18);
}  /* completed/max survived */

.bc-runs-empty {
  font-size:  11px;
  color:      var(--bc-text-muted);
  padding:    6px 0;
}

/* Color legend */
.bc-ko-legend {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px 10px;
  padding-top: 6px;
  border-top:  1px solid rgba(249, 115, 22, 0.08);
}
.bc-legend-item {
  display:     inline-flex;
  align-items: center;
  gap:         4px;
  font-size:   9.5px;
  color:       var(--bc-text-muted);
}
.bc-legend-dot {
  width:         8px;
  height:        8px;
  border-radius: 2px;
  flex-shrink:   0;
}

/* ── Knockout History section header (inside stats card) ─────────────────── */
.bc-ko-history-header {
  display:     flex;
  align-items: center;
  gap:         6px;
  margin-bottom: 8px;
  padding-top:   6px;
  border-top:    1px solid rgba(249, 115, 22, 0.1);
}

.bc-ko-history-title {
  font-size:   11px;
  font-weight: 600;
  color:       var(--bc-accent);
  flex-shrink: 0;
}

.bc-live-dot-sm {
  width:         5px;
  height:        5px;
  border-radius: 50%;
  background:    var(--bc-green);
  box-shadow:    0 0 4px var(--bc-green);
  animation:     bc-pulse 1.4s ease-in-out infinite;
  flex-shrink:   0;
}

.bc-ko-tracked-label {
  font-size:  10px;
  color:      var(--bc-text-muted);
  flex:       1;
}

/* Rescan / restart icon button */
.bc-scan-reset-btn {
  width:         24px;
  height:        24px;
  border-radius: 50%;
  background:    rgba(249, 115, 22, 0.12);
  border:        1px solid rgba(249, 115, 22, 0.28);
  color:         var(--bc-accent);
  font-size:     14px;
  line-height:   1;
  cursor:        pointer;
  display:       flex;
  align-items:   center;
  justify-content: center;
  flex-shrink:   0;
  transition:    background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.bc-scan-reset-btn:hover:not(:disabled) {
  background:  rgba(249, 115, 22, 0.24);
  box-shadow:  0 0 8px var(--bc-accent-glow);
  transform:   rotate(30deg);
}
.bc-scan-reset-btn:disabled {
  opacity: 0.45;
  cursor:  not-allowed;
}

/* Stats live row — keep on same line as card title (override original margin) */
.bc-stats-live-row {
  display:       flex;
  align-items:   center;
  gap:           5px;
  margin-bottom: 0;    /* override the earlier 10px — bc-card-header handles spacing */
}
.bc-stats-live-row .bc-tick-counter {
  font-size:   10px;
  color:       var(--bc-text-muted);
  margin-left: 2px;
}

/* ════════════════════════════════════════════════════════════
   4. TRADE HISTORY CARD
   ════════════════════════════════════════════════════════════ */
.bc-history-card {}

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

.bc-history-title {
  font-size:   13px;
  font-weight: 600;
  color:       var(--bc-accent);
}

.bc-clear-btn {
  background:    transparent;
  border:        1px solid rgba(249, 115, 22, 0.2);
  border-radius: 5px;
  color:         var(--bc-text-muted);
  font-size:     13px;
  padding:       2px 7px;
  cursor:        pointer;
  transition:    color 0.15s, border-color 0.15s;
}
.bc-clear-btn:hover {
  color:        var(--bc-accent);
  border-color: var(--bc-accent);
}

.bc-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:           8px;
  margin-bottom: 8px;
}

.bc-hist-stat-box {
  background:    rgba(10, 14, 28, 0.5);
  border:        1px solid rgba(249, 115, 22, 0.1);
  border-radius: 6px;
  padding:       7px 10px;
}

.bc-hist-stat-label {
  font-size:  10px;
  color:      var(--bc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bc-hist-stat-value {
  font-size:   14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top:  2px;
}
.bc-hist-stat-value.green { color: var(--bc-green); }
.bc-hist-stat-value.red   { color: var(--bc-red); }
.bc-hist-stat-value.neutral { color: var(--bc-text); }

.bc-hist-filter-row {
  display:     grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:         5px;
  margin-bottom: 8px;
}

.bc-hist-filter-btn {
  width:         100%;
  padding:       6px 9px;
  background:    rgba(30, 38, 60, 0.7);
  border:        1px solid rgba(249, 115, 22, 0.15);
  border-radius: 4px;
  color:         var(--bc-text-muted);
  font-size:     10.5px;
  font-weight:   600;
  text-align:    center;
  white-space:   nowrap;
  cursor:        pointer;
  transition:    background 0.15s, color 0.15s, border-color 0.15s;
}
.bc-hist-filter-btn.active {
  background:  var(--bc-accent-dim);
  border-color: var(--bc-accent);
  color:       var(--bc-accent);
}

.bc-history-list {
  max-height: 320px;
  overflow-y: auto;
  display:    flex;
  flex-direction: column;
  gap: 6px;
}
.bc-history-list::-webkit-scrollbar { width: 4px; }
.bc-history-list::-webkit-scrollbar-track { background: transparent; }
.bc-history-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, 0.3); border-radius: 2px; }

.bc-history-empty {
  font-size:  11px;
  color:      var(--bc-text-muted);
  text-align: center;
  padding:    12px 0;
}

/* ── Premium trade cards ──────────────────────────────────────────────────── */
.bc-trade-card {
  background:    rgba(10, 16, 32, 0.78);
  border:        1px solid rgba(249, 115, 22, 0.14);
  border-left:   3px solid rgba(249, 115, 22, 0.3);
  border-radius: 8px;
  padding:       10px 12px 8px;
  font-size:     11px;
  transition:    border-color 0.18s, box-shadow 0.18s;
}
.bc-trade-card:hover {
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.1);
}
.bc-trade-card.won  {
  border-left: 3px solid var(--bc-green);
  background:  rgba(6, 34, 22, 0.55);
}
.bc-trade-card.lost {
  border-left: 3px solid var(--bc-red);
  background:  rgba(32, 8, 8, 0.55);
}
.bc-trade-card.pending {
  border-left: 3px solid var(--bc-accent);
}
.bc-trade-card.error {
  border-left: 3px solid #6b7280;
  opacity: 0.8;
}

/* Card header row: symbol + result badge */
.bc-tc-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   5px;
}
.bc-tc-symbol {
  font-size:   12px;
  font-weight: 700;
  color:       var(--bc-text);
  letter-spacing: 0.2px;
}
.bc-tc-badge {
  font-size:   10px;
  font-weight: 700;
  padding:     2px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}
.bc-tc-badge.won     { background: rgba(16,185,129,0.18); color: var(--bc-green); }
.bc-tc-badge.lost    { background: rgba(239,68,68,0.18);  color: var(--bc-red); }
.bc-tc-badge.pending { background: rgba(249,115,22,0.16); color: var(--bc-accent);
                       animation: bc-badge-pulse 1.4s ease-in-out infinite; }
.bc-tc-badge.error   { background: rgba(107,114,128,0.18); color: #9ca3af; }

@keyframes bc-badge-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* Meta row: pill + ticks + reason + timestamp */
.bc-tc-meta-row {
  display:     flex;
  align-items: center;
  gap:         6px;
  flex-wrap:   wrap;
  margin-bottom: 5px;
}
.bc-tc-pill {
  background:    rgba(249, 115, 22, 0.14);
  border:        1px solid rgba(249, 115, 22, 0.22);
  border-radius: 3px;
  padding:       1px 5px;
  font-size:     9.5px;
  font-weight:   600;
  color:         var(--bc-accent);
}
.bc-tc-strategy {
  background:    rgba(16, 185, 129, 0.14);
  border:        1px solid rgba(16, 185, 129, 0.22);
  border-radius: 3px;
  padding:       1px 5px;
  font-size:     9.5px;
  font-weight:   700;
  color:         var(--bc-green);
}
.bc-tc-take {
  background:    rgba(250, 204, 21, 0.10);
  border:        1px solid rgba(250, 204, 21, 0.18);
  border-radius: 3px;
  padding:       1px 5px;
  font-size:     9.5px;
  font-weight:   600;
  color:         #facc15;
}
.bc-tc-ticks {
  font-size:  9.5px;
  color:      var(--bc-text-muted);
  font-variant-numeric: tabular-nums;
}
.bc-tc-reason {
  font-size:  9.5px;
  color:      rgba(175, 195, 240, 0.38);
  font-style: italic;
}
.bc-tc-time {
  font-size:  9px;
  color:      rgba(175, 195, 240, 0.3);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Financials row: stake / payout / profit */
.bc-tc-financials {
  display:     flex;
  align-items: baseline;
  gap:         8px;
  flex-wrap:   wrap;
}
.bc-tc-val {
  font-size: 10px;
  color:     var(--bc-text-muted);
}
.bc-tc-val b {
  color: var(--bc-text);
  font-weight: 600;
}
.bc-tc-profit {
  font-size:   12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.bc-tc-profit.pos     { color: var(--bc-green); }
.bc-tc-profit.neg     { color: var(--bc-red); }
.bc-tc-profit.neutral { color: var(--bc-text-muted); }

/* Entry / exit spots */
.bc-tc-spots {
  display:     flex;
  gap:         10px;
  flex-wrap:   wrap;
  margin-top:  4px;
  padding-top: 4px;
  border-top:  1px solid rgba(255,255,255,0.04);
}
.bc-tc-spot-item {
  font-size: 9.5px;
  color:     var(--bc-text-muted);
}
.bc-tc-spot-item b {
  color:      var(--bc-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Error line */
.bc-tc-error {
  font-size:   9.5px;
  color:       var(--bc-red);
  margin-top:  4px;
  padding-top: 4px;
  border-top:  1px solid rgba(239,68,68,0.12);
}

/* ════════════════════════════════════════════════════════════
   5. BANK CLERK PROFILE CARD
   ════════════════════════════════════════════════════════════ */
.bc-profile-card {}

.bc-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.bc-profile-box {
  background:    rgba(10, 14, 28, 0.5);
  border:        1px solid rgba(249, 115, 22, 0.12);
  border-radius: 7px;
  padding:       8px 10px;
}

.bc-profile-label {
  font-size:      9.5px;
  color:          var(--bc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom:  3px;
}

.bc-profile-value {
  font-size:            14px;
  font-weight:          700;
  color:                var(--bc-text);
  font-variant-numeric: tabular-nums;
}

.bc-profile-accent { color: var(--bc-accent); }
.bc-profile-muted  { color: var(--bc-text-muted); font-weight: 500; }

.bc-profile-sm {
  font-size:   10px;
  font-weight: 500;
  color:       var(--bc-text-muted);
  line-height: 1.5;
  letter-spacing: 0.15px;
}

.bc-profile-desc {
  font-size:    10.5px;
  color:        var(--bc-text-muted);
  line-height:  1.58;
  padding-top:  8px;
  border-top:   1px solid rgba(249, 115, 22, 0.08);
}

.bc-profile-desc strong {
  color:       var(--bc-accent);
  font-weight: 700;
}

/* ── Growth rate max hint ─────────────────────────────────────────────────────── */
.bc-growth-max-hint {
  font-size:    10px;
  color:        var(--bc-text-muted);
  text-align:   center;
  margin-top:   5px;
  letter-spacing: 0.3px;
  opacity: 0.82;
}

/* ── Secure profit info rows ─────────────────────────────────────────────────── */
.bc-sp-info-row {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-top:      5px;
  font-size:       10.5px;
}

.bc-sp-info-label {
  color: var(--bc-text-muted);
}

.bc-sp-info-val {
  font-weight:          600;
  font-variant-numeric: tabular-nums;
  color:                var(--bc-text);
}

.bc-sp-info-val.pos { color: var(--bc-green); }
.bc-sp-info-val.neg { color: var(--bc-red);   }

/* ── Live run block ──────────────────────────────────────────────────────────── */
.bc-run-block.tier-live {
  background:  rgba(99, 102, 241, 0.22);
  border:      1px solid rgba(99, 102, 241, 0.55);
  color:       #a5b4fc;
  animation:   bc-live-pulse 1.4s ease-in-out infinite;
}

@keyframes bc-live-pulse {
  0%, 100% { opacity: 1;    box-shadow: 0 0 0   0   rgba(99,102,241,0); }
  50%       { opacity: 0.78; box-shadow: 0 0 6px 2px rgba(99,102,241,0.45); }
}

/* ── Legend live dot ─────────────────────────────────────────────────────────── */
.bc-legend-live .bc-legend-dot.tier-live {
  background:  rgba(99, 102, 241, 0.7);
  border:      1px solid rgba(99, 102, 241, 0.9);
  animation:   bc-live-pulse 1.4s ease-in-out infinite;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .bc-stats-grid    { grid-template-columns: repeat(3, 1fr); }
  .bc-run-block     { width: 44px; height: 24px; }
  .bc-selectors-row { grid-template-columns: 1fr; }
  .bc-profile-grid  { grid-template-columns: 1fr; }
}
