/* =============================================================================
   ROB E BANK AI — Matches Pro (Trade X feature)
   Premium all-pair matches scanner: dark glass, gold rim, neon signal bars,
   purple/gold CTA. Tier accents: PRIME=green · STRONG=gold · FAIR=cyan · WEAK=grey.
   ============================================================================= */

.mpro-card {
  position: relative;
  border-radius: 13px;
  margin: 12px 0;
  overflow: hidden;
  background:
    radial-gradient(130% 90% at 12% -10%, rgba(124, 58, 237, 0.10), transparent 50%),
    radial-gradient(120% 80% at 100% 0%, rgba(208, 149, 48, 0.10), transparent 52%),
    linear-gradient(165deg, #110c06 0%, #0a0a12 60%, #07060a 100%);
  border: 1px solid rgba(208, 149, 48, 0.30);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.08) inset,
    0 18px 46px rgba(0, 0, 0, 0.55),
    0 0 38px rgba(180, 120, 32, 0.10);
}

.mpro-card::before {
  content: "";
  position: absolute; top: 0; left: 6%; right: 6%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,168,50,0.6), rgba(124,58,237,0.5), rgba(34,197,94,0.4), transparent);
  pointer-events: none;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.mpro-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px 12px;
  background: linear-gradient(120deg, rgba(124,58,237,0.10), rgba(208,149,48,0.07) 60%, transparent);
  border-bottom: 1px solid rgba(208, 149, 48, 0.16);
}
.mpro-title-area { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mpro-icon { font-size: 21px; filter: drop-shadow(0 0 8px rgba(232,168,50,0.55)); }
.mpro-title {
  font-size: 15px; font-weight: 900; letter-spacing: 0.04em;
  color: var(--text-primary); display: flex; align-items: center; gap: 7px;
}
.mpro-pro {
  font-size: 8.5px; font-weight: 900; letter-spacing: 0.12em;
  color: #0a0a0a; background: linear-gradient(92deg, #eaaa36, #ffd98a);
  border-radius: 4px; padding: 2px 6px; box-shadow: 0 0 12px rgba(232,168,50,0.4);
}
.mpro-subtitle { font-size: 9.5px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.02em; }
.mpro-header-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.mpro-state-badge {
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 5px; padding: 3px 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted);
}
.mpro-state-badge.live { background: rgba(34,197,94,0.13); border-color: rgba(34,197,94,0.4); color: var(--green); text-shadow: 0 0 8px rgba(34,197,94,0.5); }
.mpro-state-badge.scan { background: rgba(208,149,48,0.13); border-color: rgba(208,149,48,0.4); color: var(--gold-bright); }
.mpro-state-badge.warn { background: rgba(208,149,48,0.13); border-color: rgba(208,149,48,0.4); color: var(--gold-bright); }
.mpro-state-badge.stop { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); color: #ff6b6b; }

.mpro-reset-btn {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 7px; padding: 7px 10px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.14); color: var(--text-muted);
  transition: all 0.2s;
}
.mpro-reset-btn:hover { border-color: rgba(208,149,48,0.5); color: var(--gold-bright); }

.mpro-scan-toggle {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 7px; padding: 7px 12px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.16); color: var(--text-secondary);
  transition: all 0.2s;
}
.mpro-scan-toggle:hover { border-color: rgba(208,149,48,0.5); color: var(--text-primary); }
.mpro-scan-toggle.on {
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(16,160,70,0.28));
  border-color: rgba(34,197,94,0.6); color: #7dffb0;
  box-shadow: 0 0 16px rgba(34,197,94,0.25); animation: mproScanPulse 2.2s ease-in-out infinite;
}
@keyframes mproScanPulse { 0%,100%{box-shadow:0 0 14px rgba(34,197,94,0.2);} 50%{box-shadow:0 0 22px rgba(34,197,94,0.38);} }

/* ── Body ───────────────────────────────────────────────────────────────────── */
.mpro-body { padding: 13px 15px 14px; }

.mpro-controls {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.mpro-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mpro-field > span {
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
}
.mpro-field input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(208,149,48,0.22);
  border-radius: 7px; color: var(--text-primary); font-size: 12.5px; font-weight: 600; padding: 7px 9px;
}

.mpro-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 9px 11px; border-radius: 9px;
  background: rgba(124,58,237,0.06); border: 1px solid rgba(124,58,237,0.18);
}
.mpro-toggle-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); display: block; }
.mpro-toggle-hint { font-size: 9px; color: var(--text-muted); }
/* The global .toggle-switch is pointer-events:none by default (nav rows enable
   it via .strategy-row.unlocked). Re-enable it for this in-card toggle so it is
   actually clickable. */
.mpro-toggle-row .toggle-switch { pointer-events: auto; cursor: pointer; }

/* ── Session stats ──────────────────────────────────────────────────────────── */
.mpro-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 11px; }
.mpro-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 8px 4px;
}
.mpro-stat-val { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.mpro-stat-val.green { color: var(--green); }
.mpro-stat-val.red { color: #ff6b6b; }
.mpro-stat-lbl { font-size: 8px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }

/* ── Active selection ───────────────────────────────────────────────────────── */
.mpro-selection {
  margin-top: 10px; padding: 9px 12px; border-radius: 9px; font-size: 12px; color: var(--text-secondary);
  background: rgba(34,197,94,0.07); border: 1px solid rgba(34,197,94,0.28);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mpro-selection b { color: var(--text-primary); }
.mpro-sel-tag {
  font-size: 8px; font-weight: 900; letter-spacing: 0.08em; color: #0a0a0a;
  background: var(--green); border-radius: 4px; padding: 2px 6px;
}
.mpro-sel-str { margin-left: auto; font-weight: 800; color: var(--green); }

/* ── Status line ────────────────────────────────────────────────────────────── */
.mpro-statusline {
  display: flex; align-items: center; gap: 9px; margin-top: 10px;
  padding: 8px 11px; border-radius: 9px; font-size: 11px;
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08);
}
.mpro-sl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.mpro-sl-text { flex: 1; min-width: 0; color: var(--text-secondary); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpro-statusline.scan { background: rgba(208,149,48,0.06); border-color: rgba(208,149,48,0.3); }
.mpro-statusline.scan .mpro-sl-dot { background: var(--gold-bright); box-shadow: 0 0 8px rgba(234,170,54,0.7); animation: mproDot 1.5s ease-in-out infinite; }
.mpro-statusline.live { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.3); }
.mpro-statusline.live .mpro-sl-dot { background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,0.8); animation: mproDot 1.2s ease-in-out infinite; }
.mpro-statusline.warn .mpro-sl-dot { background: var(--gold-bright); }
.mpro-statusline.stop { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.28); }
.mpro-statusline.stop .mpro-sl-dot { background: #ff6b6b; }
@keyframes mproDot { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(0.72);} }

/* ── Ranked setups ──────────────────────────────────────────────────────────── */
.mpro-scan-head { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 7px; }
.mpro-scan-title { font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold-bright); }
.mpro-scan-count { font-size: 9px; color: var(--text-muted); }

.mpro-results { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.mpro-empty { font-size: 11px; color: var(--text-muted); text-align: center; padding: 18px 0; }

.mpro-row {
  display: grid; grid-template-columns: minmax(0, 1.5fr) 120px 78px; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-left-width: 3px; border-radius: 9px; padding: 9px 11px; transition: border-color 0.2s, background 0.2s;
}
.mpro-row.tier-prime  { border-left-color: var(--green); }
.mpro-row.tier-strong { border-left-color: var(--gold-bright); }
.mpro-row.tier-fair   { border-left-color: var(--cyan); }
.mpro-row.tier-weak   { border-left-color: rgba(150,150,170,0.5); }
.mpro-row.locked { background: rgba(34,197,94,0.07); border-color: rgba(34,197,94,0.4); box-shadow: 0 0 16px rgba(34,197,94,0.12); }
.mpro-row.stale { opacity: 0.5; }

.mpro-row-main { min-width: 0; }
.mpro-row-pair { font-size: 12px; font-weight: 800; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpro-row-rule { font-size: 10.5px; color: var(--text-secondary); margin-top: 2px; }
.mpro-row-rule b { color: var(--gold-bright); font-weight: 800; }
.mpro-row-sub { display: block; font-size: 8.5px; color: var(--text-muted); margin-top: 1px; }

.mpro-row-sig { display: flex; flex-direction: column; gap: 4px; }
.mpro-sig-bar { width: 100%; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.mpro-sig-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; background: linear-gradient(90deg, rgba(150,150,170,0.6), rgba(180,180,200,0.85)); }
.mpro-row.tier-prime  .mpro-sig-fill { background: linear-gradient(90deg, rgba(34,197,94,0.6), rgba(34,197,94,0.95)); box-shadow: 0 0 10px rgba(34,197,94,0.4); }
.mpro-row.tier-strong .mpro-sig-fill { background: linear-gradient(90deg, rgba(208,149,48,0.6), rgba(234,170,54,0.95)); box-shadow: 0 0 10px rgba(234,170,54,0.35); }
.mpro-row.tier-fair   .mpro-sig-fill { background: linear-gradient(90deg, rgba(6,182,212,0.55), rgba(6,182,212,0.9)); }
.mpro-sig-meta { display: flex; align-items: baseline; gap: 6px; }
.mpro-sig-val { font-size: 12px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mpro-tier { font-size: 7.5px; font-weight: 800; letter-spacing: 0.05em; color: var(--text-muted); }
.mpro-row.tier-prime  .mpro-tier { color: var(--green); }
.mpro-row.tier-strong .mpro-tier { color: var(--gold-bright); }
.mpro-row.tier-fair   .mpro-tier { color: var(--cyan); }

.mpro-use-btn {
  font-size: 11px; font-weight: 800; letter-spacing: 0.03em; border: none; cursor: pointer;
  border-radius: 8px; padding: 9px 10px; white-space: nowrap;
  background: linear-gradient(135deg, #7c3aed 0%, #9d5cff 100%); color: #fff;
  box-shadow: 0 3px 12px rgba(124,58,237,0.3); transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.mpro-use-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(124,58,237,0.45); filter: brightness(1.08); }
.mpro-use-btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.mpro-use-btn.stop { background: linear-gradient(135deg, #dc2626 0%, #f04444 100%); box-shadow: 0 3px 12px rgba(220,38,38,0.35); }
.mpro-use-btn.weak, .mpro-use-btn:disabled { background: rgba(255,255,255,0.06); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

.mpro-note { margin-top: 12px; font-size: 9px; color: var(--text-muted); line-height: 1.5; text-align: center; opacity: 0.85; }

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .mpro-controls { grid-template-columns: 1fr 1fr; }
  .mpro-stats { grid-template-columns: repeat(3, 1fr); }
  .mpro-row { grid-template-columns: minmax(0, 1fr) 84px 62px; gap: 7px; padding: 8px 9px; }
  .mpro-row-sig { gap: 3px; }
  .mpro-use-btn { padding: 8px 6px; font-size: 10px; }
  .mpro-results { max-height: 300px; }
}
