
/* ===================================================================
   MRKT THEME — 4K CRYSTAL EDITION
   Bold typography + crystal-clear text rendering + vivid 3D colour.
   Scoped 100% to html[data-theme="mrkt"] — no other theme is touched.
   Pure CSS, zero JS. Placed LAST so it wins the cascade.
   To revert, delete this whole <style nonce="kPmovXGkWTLUoADPvACT5w==" id="tc-mrkt-4k"> block.
   =================================================================== */

/* ---- 1. VIVID 4K PALETTE (variable overrides) --------------------- */
html[data-theme="mrkt"]{
  --hq-bg:#04040A;
  --hq-surface-1:#0d0d16; --hq-surface-2:#151522; --hq-surface-3:#1e1e30;
  --hq-border:#222238; --hq-border-2:#30304c; --hq-border-hi:#4c4c74;
  --hq-text-1:#FFFFFF; --hq-text-2:#D8DBEA; --hq-text-3:#9CA2BA;
  --hq-accent:#8B6CFF; --hq-accent-hover:#B49CFF;
  --hq-accent-soft:rgba(139,108,255,0.18); --hq-accent-border:rgba(139,108,255,0.55);
  --hq-success:#27D767; --hq-success-2:#5CF093; --hq-success-soft:rgba(39,215,103,0.14);
  --hq-danger:#FF4D5E; --hq-danger-2:#FF8A94; --hq-danger-soft:rgba(255,77,94,0.14);
  --hq-warning:#FFB020;
  --btn-glow-rgb:139,108,255;
}

/* ---- 2. CRYSTAL-CLEAR TEXT RENDERING ------------------------------ */
html[data-theme="mrkt"] body{
  -webkit-font-smoothing:antialiased !important;
  -moz-osx-font-smoothing:grayscale !important;
  text-rendering:optimizeLegibility !important;
  font-weight:500 !important;
  color:#E9ECF7 !important;
}

/* ---- 3. BOLD 4K TYPOGRAPHY ---------------------------------------- */
html[data-theme="mrkt"] h1,
html[data-theme="mrkt"] h2,
html[data-theme="mrkt"] h3,
html[data-theme="mrkt"] body .section-title.section-title,
html[data-theme="mrkt"] body .stat-title.stat-title,
html[data-theme="mrkt"] body .hero-headline.hero-headline,
html[data-theme="mrkt"] body .sb-brand.sb-brand{
  font-weight:800 !important;
  letter-spacing:-0.01em !important;
  color:#FFFFFF !important;
}
html[data-theme="mrkt"] body .hero-stat .val,
html[data-theme="mrkt"] body .stat-card .val{
  font-weight:800 !important;
  text-shadow:0 0 22px rgba(139,108,255,0.25) !important;
}
html[data-theme="mrkt"] body .hero-stat .lbl,
html[data-theme="mrkt"] body .stat-card .lbl,
html[data-theme="mrkt"] body .form-label{
  font-weight:700 !important;
  letter-spacing:.08em !important;
}
html[data-theme="mrkt"] body .nav-btn{ font-weight:600 !important; }
html[data-theme="mrkt"] body .nav-btn.active{ font-weight:700 !important; }
html[data-theme="mrkt"] body .btn-primary.btn-primary,
html[data-theme="mrkt"] body .auth-btn.auth-btn,
html[data-theme="mrkt"] body .landing-btn-primary.landing-btn-primary,
html[data-theme="mrkt"] body .landing-btn-primary-lg.landing-btn-primary-lg{
  font-weight:700 !important;
  letter-spacing:.02em !important;
}
html[data-theme="mrkt"] body .pnl-pos.pnl-pos,
html[data-theme="mrkt"] body .pnl-neg.pnl-neg{ font-weight:700 !important; }

/* ---- 4. CRYSTAL 3D DEPTH — cards & surfaces ------------------------ */
html[data-theme="mrkt"] body .stat-card.stat-card,
html[data-theme="mrkt"] body .section-card.section-card{
  background:linear-gradient(165deg,#13131f 0%,#0d0d16 55%,#0a0a12 100%) !important;
  border:1px solid #2a2a44 !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 12px 32px rgba(0,0,0,0.55),
    0 2px 8px rgba(0,0,0,0.4) !important;
}
html[data-theme="mrkt"] body .stat-card.stat-card:hover{
  border-color:rgba(139,108,255,0.45) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.09) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 16px 40px rgba(0,0,0,0.6),
    0 0 24px rgba(139,108,255,0.12) !important;
}
html[data-theme="mrkt"] body .hero-banner.hero-banner{
  background:linear-gradient(160deg,#15152400 0%,#10101c 60%,#0b0b14 100%) !important;
  border:1px solid #2e2e4a !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 18px 48px rgba(0,0,0,0.6),
    0 0 36px rgba(139,108,255,0.10) !important;
}
html[data-theme="mrkt"] body .modal.modal{
  border:1px solid #30304c !important;
  box-shadow:0 1px 0 rgba(255,255,255,0.07) inset, 0 24px 64px rgba(0,0,0,0.7) !important;
}

/* ---- 5. 3D TACTILE BUTTONS ----------------------------------------- */
html[data-theme="mrkt"] body .btn-primary.btn-primary,
html[data-theme="mrkt"] body .auth-btn.auth-btn,
html[data-theme="mrkt"] body .landing-btn-primary.landing-btn-primary,
html[data-theme="mrkt"] body .landing-btn-primary-lg.landing-btn-primary-lg{
  background:linear-gradient(180deg,#9D80FF 0%,#8B6CFF 45%,#7553F2 100%) !important;
  border:1px solid rgba(180,156,255,0.6) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -2px 0 rgba(0,0,0,0.25) inset,
    0 8px 22px rgba(139,108,255,0.35),
    0 2px 6px rgba(0,0,0,0.4) !important;
  text-shadow:0 1px 1px rgba(0,0,0,0.3) !important;
}
html[data-theme="mrkt"] body .btn-primary.btn-primary:hover,
html[data-theme="mrkt"] body .auth-btn.auth-btn:hover:not(:disabled),
html[data-theme="mrkt"] body .landing-btn-primary.landing-btn-primary:hover,
html[data-theme="mrkt"] body .landing-btn-primary-lg.landing-btn-primary-lg:hover{
  background:linear-gradient(180deg,#AE95FF 0%,#9A7DFF 45%,#8262FA 100%) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -2px 0 rgba(0,0,0,0.25) inset,
    0 12px 30px rgba(139,108,255,0.45),
    0 2px 8px rgba(0,0,0,0.45) !important;
}

/* ---- 6. VIVID P&L / STATUS COLOUR ---------------------------------- */
html[data-theme="mrkt"] body .pnl-pos.pnl-pos,
html[data-theme="mrkt"] body .grade-A.grade-A,
html[data-theme="mrkt"] body .badge-green.badge-green{
  color:#2EE873 !important;
  text-shadow:0 0 14px rgba(46,232,115,0.3) !important;
}
html[data-theme="mrkt"] body .pnl-neg.pnl-neg,
html[data-theme="mrkt"] body .grade-D.grade-D,
html[data-theme="mrkt"] body .badge-red.badge-red{
  color:#FF5C6C !important;
  text-shadow:0 0 14px rgba(255,92,108,0.3) !important;
}

/* ---- 7. PERF-MODE SOFTENING (mobile / low-power: no jank) ---------- */
html.perf-mode[data-theme="mrkt"] body .stat-card.stat-card,
html.perf-mode[data-theme="mrkt"] body .section-card.section-card,
html.perf-mode[data-theme="mrkt"] body .hero-banner.hero-banner{
  box-shadow:0 6px 18px rgba(0,0,0,0.45) !important;
}
html.perf-mode[data-theme="mrkt"] body .hero-stat .val,
html.perf-mode[data-theme="mrkt"] body .stat-card .val,
html.perf-mode[data-theme="mrkt"] body .pnl-pos.pnl-pos,
html.perf-mode[data-theme="mrkt"] body .pnl-neg.pnl-neg{
  text-shadow:none !important;
}


/* ===================================================================
   TRADERCAB PRO TOOLS v2 — 4 tools, each with its own sidebar entry
   in the TOOLS section and its own page:
     1. Prop Pass Simulator   (page: tcpprop)
     2. What-If Analyzer      (page: tcpwhatif)
     3. Edge Decay Monitor    (page: tcpedge)
     4. Pre-Trade Risk Gate   (page: tcpgate)
   Pure additive runtime injection. Reads app data via loadTrades()
   and surru_settings. Never modifies existing data or code.
   To remove: delete this style block (id tc-pro-tools) and the
   script block (id tc-pro-tools-js) that follows it.
   =================================================================== */
.tcp-card{margin-top:18px;padding:20px;}
.tcp-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:14px;}
.tcp-title{font-family:'Space Grotesk',sans-serif;font-size:14px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--hq-text-1,#fff);}
.tcp-sub{font-size:12px;color:var(--hq-text-3,#8B8FA3);margin-top:2px;font-family:'Rubik',sans-serif;}
.tcp-badge{font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.14em;padding:4px 10px;border-radius:999px;border:1px solid var(--hq-accent-border,rgba(124,92,252,0.42));color:var(--hq-accent,#7C5CFC);background:var(--hq-accent-soft,rgba(124,92,252,0.14));}
.tcp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0;}
.tcp-field label{display:block;font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--hq-text-3,#8B8FA3);margin-bottom:5px;}
.tcp-field input,.tcp-field select{width:100%;background:var(--hq-surface-2,#14141d);border:1px solid var(--hq-border-2,#26263a);border-radius:9px;color:var(--hq-text-1,#fff);font-family:'JetBrains Mono',monospace;font-size:13px;padding:9px 10px;outline:none;}
.tcp-field input:focus,.tcp-field select:focus{border-color:var(--hq-accent,#7C5CFC);}
.tcp-btn{display:inline-block;background:var(--hq-accent,#7C5CFC);color:#fff;border:none;border-radius:10px;font-family:'Space Grotesk',sans-serif;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;padding:11px 18px;cursor:pointer;transition:transform .12s,opacity .12s;}
.tcp-btn:hover{transform:translateY(-1px);opacity:.92;}
.tcp-btn:disabled{opacity:.6;cursor:wait;}
.tcp-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-top:14px;}
.tcp-stat{background:var(--hq-surface-2,#14141d);border:1px solid var(--hq-border,#1a1a26);border-radius:12px;padding:12px 14px;}
.tcp-stat .l{font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--hq-text-3,#8B8FA3);}
.tcp-stat .v{font-family:'JetBrains Mono',monospace;font-size:22px;font-weight:800;margin-top:4px;color:var(--hq-text-1,#fff);}
.tcp-stat .s{font-size:11px;color:var(--hq-text-3,#8B8FA3);margin-top:2px;font-family:'Rubik',sans-serif;}
.tcp-pos{color:var(--hq-success,#22c55e)!important;}
.tcp-neg{color:var(--hq-danger,#ef4444)!important;}
.tcp-warn{color:var(--hq-warning,#f59e0b)!important;}
.tcp-bar{height:8px;border-radius:6px;background:var(--hq-surface-3,#1c1c28);overflow:hidden;margin-top:8px;}
.tcp-bar>div{height:100%;border-radius:6px;transition:width .5s ease;}
.tcp-canvas-wrap{margin-top:14px;background:var(--hq-surface-2,#14141d);border:1px solid var(--hq-border,#1a1a26);border-radius:12px;padding:12px;}
.tcp-canvas-wrap canvas{width:100%;height:170px;display:block;}
.tcp-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:11px;color:var(--hq-text-3,#8B8FA3);font-family:'JetBrains Mono',monospace;margin-bottom:8px;}
.tcp-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px;}
.tcp-empty{padding:18px;text-align:center;color:var(--hq-text-3,#8B8FA3);font-size:13px;font-family:'Rubik',sans-serif;}
.tcp-reasons{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:7px;}
.tcp-reasons li{font-size:13px;font-family:'Rubik',sans-serif;color:var(--hq-text-2,#C9CBD8);display:flex;gap:8px;align-items:flex-start;}
.tcp-reasons li::before{content:'';width:8px;height:8px;border-radius:50%;margin-top:5px;flex:0 0 8px;background:var(--hq-success,#22c55e);}
.tcp-reasons li.warn::before{background:var(--hq-warning,#f59e0b);}
.tcp-reasons li.bad::before{background:var(--hq-danger,#ef4444);}
.tcp-verdict{display:inline-flex;align-items:center;gap:10px;font-family:'Space Grotesk',sans-serif;font-weight:800;font-size:18px;letter-spacing:.1em;padding:10px 20px;border-radius:12px;border:1px solid;}
.tcp-verdict.go{color:var(--hq-success,#22c55e);border-color:var(--hq-success,#22c55e);background:var(--hq-success-soft,rgba(34,197,94,0.12));}
.tcp-verdict.caution{color:var(--hq-warning,#f59e0b);border-color:var(--hq-warning,#f59e0b);background:rgba(245,158,11,0.12);}
.tcp-verdict.nogo{color:var(--hq-danger,#ef4444);border-color:var(--hq-danger,#ef4444);background:var(--hq-danger-soft,rgba(239,68,68,0.12));}
.tcp-acc-head{cursor:pointer;user-select:none;}
.tcp-acc-head:hover .tcp-title{color:var(--hq-accent,#7C5CFC);}
.tcp-chev{display:inline-block;margin-left:10px;transition:transform .3s ease;font-size:13px;color:var(--hq-text-3,#8B8FA3);}
.tcp-acc.open .tcp-chev{transform:rotate(180deg);}
.tcp-acc-body{overflow:hidden;max-height:0;opacity:0;transition:max-height .4s ease,opacity .3s ease;}
.tcp-acc.open .tcp-acc-body{max-height:2200px;opacity:1;}
@media (max-width:700px){.tcp-stats{grid-template-columns:repeat(2,1fr);}}
