:root{
--bg:#0c1420;--panel:#111d2b;--panel2:#0d1723;--line:#25354a;--line2:#1c293a;
--text:#e7edf6;--muted:#9aa9bc;--accent:#5aa7ff;--accent2:#2f7fd6;
--good:#53d3a2;--bad:#ff7a8a;--warn:#f1c96b;--shadow:0 14px 36px rgba(0,0,0,.22)
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif;line-height:1.45}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 28px;background:#0b1522;border-bottom:1px solid var(--line2)}
.brand-title{font-size:28px;font-weight:800;letter-spacing:.2px}
.brand-title span{font-size:12px;color:var(--accent);vertical-align:top;margin-left:4px}
.brand-sub{color:var(--muted);font-size:13px;margin-top:4px}
.status{padding:9px 13px;border:1px solid var(--line);border-radius:999px;background:#101b29;color:#c8d4e3;font-size:13px;white-space:nowrap}
.tabs{display:flex;gap:10px;padding:14px 28px;background:#0b1522;border-bottom:1px solid var(--line2);position:sticky;top:0;z-index:4;overflow:auto}
button{font:inherit;background:#142337;color:var(--text);border:1px solid var(--line);padding:10px 15px;border-radius:10px;cursor:pointer;transition:.18s ease}
button:hover{transform:translateY(-1px);border-color:#3e5a78;background:#182b43}
.tab.active{background:#183a61;border-color:var(--accent)}
.primary{background:var(--accent2);border-color:#68aeff;font-weight:700}
.secondary{background:#16263a}
main{max-width:1500px;margin:auto;padding:24px}
.page{display:none}.page.active{display:block}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:18px;box-shadow:var(--shadow)}
.section-title{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.section-title h2,.card h2{margin:0 0 4px;font-size:22px}.section-title p{margin:0;color:var(--muted);font-size:13px}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin:18px 0}
label{display:block;color:#b8c5d5;font-size:12px;font-weight:600;letter-spacing:.2px}
input,select{width:100%;margin-top:7px;padding:12px 13px;border-radius:11px;border:1px solid var(--line);background:#0b1521;color:var(--text);outline:none}
input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(90,167,255,.12)}
.action-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.hidden{display:none}
.error{color:var(--bad);margin-top:12px;font-weight:600}
.diag{color:var(--muted);margin-top:12px;font-size:13px}
.signal-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.eyebrow{font-size:11px;letter-spacing:1.4px;color:var(--muted);margin-bottom:6px}
.signal{font-size:34px;font-weight:900;letter-spacing:.5px}
.buy{color:var(--good)}.sell{color:var(--bad)}.wait{color:var(--warn)}
.scorebox{min-width:150px;background:var(--panel2);border:1px solid var(--line);border-radius:14px;padding:14px;text-align:center}
.scorebox span{display:block;color:var(--muted);font-size:12px}.scorebox b{font-size:28px}
.metricgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:20px 0}
.metric{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:14px;color:var(--muted);font-size:12px}
.metric b{display:block;color:var(--text);font-size:19px;margin-top:5px}
.twocol{display:grid;grid-template-columns:1fr 1fr;gap:16px}.subcard{background:var(--panel2);border:1px solid var(--line);border-radius:14px;padding:16px}
.subcard h3{margin-top:0}.subcard ul{padding-left:20px;margin-bottom:0}.subcard li{margin:7px 0}
.chart{min-height:460px}
.warningbox{border-left:4px solid var(--warn);background:#2a2416;padding:12px 14px;border-radius:8px;margin:14px 0}
.news{padding:10px 0;border-bottom:1px solid var(--line2)}
.muted{color:var(--muted)}
.tablewrap{overflow:auto;max-height:560px;border:1px solid var(--line);border-radius:12px;margin-top:14px}
table{width:100%;border-collapse:collapse;font-size:12px;background:#0d1723}
th,td{padding:10px 11px;border-bottom:1px solid var(--line2);text-align:left;white-space:nowrap}
th{position:sticky;top:0;background:#132033;color:#b9d5f3;z-index:1}
tr:hover td{background:#111f30}
@media(max-width:760px){
 .topbar{padding:16px;align-items:flex-start}.brand-title{font-size:24px}.status{font-size:11px}
 .tabs{padding:10px 14px}.tabs button{white-space:nowrap}
 main{padding:12px}.card{padding:16px;border-radius:13px}
 .twocol{grid-template-columns:1fr}.signal-head{flex-direction:column}.scorebox{width:100%}
 .form-grid{grid-template-columns:1fr}
}
@media(min-width:900px){
  .form-grid{grid-template-columns:1fr 1.25fr .9fr .9fr}
  #backtest .form-grid{grid-template-columns:repeat(4,minmax(170px,1fr))}
}

#structureBox,#mtfBox{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:14px}
#structureBox .subcard,#mtfBox .subcard{margin:0}
.mini-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.mini-grid>div{background:#0b1521;border:1px solid var(--line);border-radius:10px;padding:11px}
.mini-grid span,.mini-grid small{display:block;color:var(--muted);font-size:11px}
.mini-grid b{display:block;margin:4px 0;color:var(--text);font-size:15px}

#mtfButton{position:relative;z-index:10;pointer-events:auto}
.action-row{position:relative;z-index:5}

#mtfButton{
  position:relative!important;
  z-index:9999!important;
  pointer-events:auto!important;
  cursor:pointer!important;
  user-select:none;
  min-width:150px;
}
#mtfButton:hover{box-shadow:0 0 0 3px rgba(90,167,255,.12)}

#mtfCard{border-color:#36536f}
#mtfCard.hidden{display:none}
#mtfBox{min-height:70px}

.mtf-verdict{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-bottom:14px;
}
.mtf-verdict>div{
  background:#0b1521;
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
}
.mtf-verdict span{display:block;color:var(--muted);font-size:11px}
.mtf-verdict b{display:block;margin-top:5px;font-size:18px}
.analytics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:16px 0 22px;
}
.analytics-grid .full{grid-column:1/-1}
@media(max-width:900px){
  .analytics-grid{grid-template-columns:1fr}
}

.helper-note{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  background:#0b1521;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
}

.progress-note{
  margin-top:12px;
  color:#b9c8da;
  font-size:13px;
}
#btRunBtn:disabled{
  opacity:.65;
  cursor:wait;
}

#validation .tablewrap{max-height:650px}
#vlBest{border-color:#3e6f5b}

#vlAuditCard .tablewrap{max-height:700px}
#vlAuditSummary{margin:12px 0}

.audit-row{cursor:pointer}
.audit-row:hover td{background:#17304a!important}
#tradeChartCard{margin-top:16px}

.inline-check{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}
.inline-check input{width:auto;margin:0}
.universe-search{margin:14px 0}
.universe-search input{max-width:420px}
#liveStatus{margin:8px 0 12px}

.delta-contract-row{cursor:pointer}
.delta-contract-row:hover td{background:#173a55!important}
.wait-confirm{border-color:#8b6b2a!important;background:#18170f!important}
.universe-search input{max-width:520px}

.entry-logic-box{
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0b1521;
  color:#c8d4e3;
  font-size:12px;
  line-height:1.5;
  white-space:normal;
  overflow-wrap:anywhere;
}
#vsaBox{margin-top:14px}

.weekly-row{cursor:pointer}
.weekly-row:hover td{background:#17304a!important}
.weekly-check{padding:9px 0;border-bottom:1px solid var(--line2);font-size:12px}
#wsSignalCard .metricgrid{margin-top:18px}

.performance-legend{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 16px}
.performance-legend span{padding:7px 10px;border-radius:999px;font-size:11px;border:1px solid var(--line)}
.perf-good{background:#10291f;color:#7ae1ae}
.perf-watch{background:#2a2414;color:#f1c96b}
.perf-poor{background:#321821;color:#ff8b9a}
.perf-good-row td{background:rgba(45,150,100,.12)}
.perf-watch-row td{background:rgba(200,150,40,.07)}
.perf-poor-row td{background:rgba(210,70,90,.10)}
.symbol-link{background:transparent;border:0;padding:0;color:#72b6ff;text-decoration:underline;cursor:pointer;font-weight:700}
.symbol-link:hover{transform:none;background:transparent;color:#a8d2ff}

#wsBtTradesCard .tablewrap{max-height:700px}

.weekly-history-card{border-color:#355a74}
#wsBtModelsCard .perf-good-row td{font-weight:600}

.page-export{display:flex;justify-content:flex-end;margin-bottom:8px}
#wrChart,#wsHistTradeChart{min-height:520px}

.entry-model-link{background:transparent;border:0;color:#86c8ff;text-decoration:underline;cursor:pointer;font-weight:700;padding:0}
.entry-model-link:hover{background:transparent;color:#c2e6ff;transform:none}
.mini-btn{padding:6px 9px;font-size:11px}
#wrModelDrillCard .tablewrap{max-height:520px}

#wsScanChart,#wrChart,#wsHistTradeChart{min-height:560px}
#wsScanChartCard{border-color:#3d5d78}
.swing-hold{align-self:end;padding-bottom:12px}
.tablewrap th{white-space:nowrap}

.status-link{background:transparent;border:0;padding:0;cursor:pointer;font-weight:800;text-decoration:underline}
.status-link.buy{color:#54d99f}
.status-link.wait{color:#f0c36b}
.status-link.sell{color:#ff8292}
.status-link:hover{background:transparent;transform:none;filter:brightness(1.2)}
#smChart{min-height:620px}
#smTable .tablewrap{max-height:540px}

#wsPrimaryChart{min-height:640px}
#wsPrimaryChartCard{max-width:1240px;margin-left:auto;margin-right:auto;border-color:#3d5d78}
.tech-ribbon{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}
.tech-pill{min-width:120px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:#0b1521}
.tech-pill.wide{min-width:260px;flex:1}
.tech-pill span{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.tech-pill b{font-size:11px;line-height:1.35}

.pw-anchor-option{align-self:end;padding-bottom:10px;min-width:250px}

#clTable .tablewrap{max-height:680px}

.combo-progress{height:12px;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:#0a1422;margin-top:10px}.combo-progress-bar{height:100%;width:0;transition:width .25s ease;background:linear-gradient(90deg,#2d7fd1,#64b5f6)}.exchange-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px;margin:10px 0 14px}.exchange-card{border:1px solid var(--line);border-radius:10px;background:#0b1521;padding:10px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}.exchange-card b{font-size:13px}.exchange-card span{font-size:10px;color:var(--muted)}.exchange-filter-row label{min-width:220px}@media(max-width:900px){.exchange-summary-grid{grid-template-columns:1fr}}

.exchange-performance-card{border-width:1px;border-color:#334b61}
.exchange-performance-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.exchange-performance-header h2{margin:0 0 4px}
.exchange-performance-header p{margin:0;color:var(--muted)}
.exchange-badge{display:inline-flex;align-items:center;justify-content:center;min-width:90px;padding:8px 12px;border:1px solid #42617d;border-radius:999px;background:#0b1624;font-weight:800;letter-spacing:.04em}
.exchange-overview .tablewrap{max-height:none}
.wide-subcard{grid-column:span 2}
@media(max-width:900px){.wide-subcard{grid-column:span 1}}

/* v40 Fakeout Scanner */
.fakeout-market-grid{display:grid;grid-template-columns:1fr;gap:14px}
.fakeout-market-card .tablewrap{max-height:520px}
.fakeout-badge{font-weight:800;white-space:nowrap}
.fakeout-badge.bull{color:#55d99e}
.fakeout-badge.bear{color:#ff8292}
#foChart{min-height:620px}
#foChartCard{max-width:1260px;margin-left:auto;margin-right:auto;border-color:#3d5d78}
@media(min-width:1500px){.fakeout-market-grid{grid-template-columns:1fr 1fr}.fakeout-market-card:last-child{grid-column:1 / -1}}

.fakeout-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.mini-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}
.disabled-filter{opacity:.45}
@media(max-width:900px){.fakeout-filter-grid,.mini-form-grid{grid-template-columns:1fr}}

.fakeout-filter-grid .mini-note{margin:8px 0 12px;line-height:1.45}
.fakeout-rule-note{margin:10px 0 16px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#0b1521;font-size:12px;line-height:1.5}
.bullish-filter-card,.bearish-filter-card{min-height:210px}


/* v45 eye-comfort refinements */
:root{
  --bg:#eef2f5;
  --panel:#ffffff;
  --panel-2:#f7f9fb;
  --text:#17212b;
  --muted:#66737f;
  --line:#cfd8df;
  --accent:#2f79bd;
}
body{background:var(--bg)!important;color:var(--text)!important}
.card,.subcard{background:var(--panel)!important;border-color:var(--line)!important;box-shadow:0 1px 4px rgba(20,30,40,.05)}
input,select{background:#fff!important;color:#17212b!important;border-color:#bcc8d2!important}
table{background:#fff!important}
thead th{background:#e9eef3!important;color:#1f2d3a!important}
tbody td{color:#1f2d3a!important;border-color:#d7e0e7!important}
tbody tr:nth-child(even){background:#f8fafc!important}
.muted,.progress-note{color:#697785!important}
h1,h2,h3,h4{color:#17212b!important}
.tab{background:#e8eef4!important;color:#22313f!important;border-color:#c7d2dc!important}
.tab.active{background:#2f79bd!important;color:#fff!important}
.primary{background:#2f79bd!important;color:#fff!important}
.secondary{background:#edf2f6!important;color:#23313e!important;border-color:#c8d3dc!important}
.symbol-link,.entry-model-link{color:#1668a9!important}
.ema21-badge{font-weight:800}
.ema21-badge.bull{color:#14864b}
.ema21-badge.bear{color:#222}
#e21Chart{min-height:620px}
#e21Nse .tablewrap,#e21Delta .tablewrap,#e21Coin .tablewrap{max-height:520px}

/* v47 eye-comfort polish */
header,.topbar,.app-header,.nav-wrap{
  background:#dbe6ef!important;
  color:#1f3446!important;
}
header h1,.topbar h1,.app-header h1,
header .muted,.topbar .muted,.app-header .muted{
  color:#27445b!important;
}

.tab{
  font-weight:800!important;
  letter-spacing:.01em;
  background:#e7eef4!important;
  color:#20384b!important;
  border-color:#b9c8d4!important;
}
.tab:hover{
  background:#d5e3ee!important;
  color:#173247!important;
}
.tab.active{
  background:#3d7faa!important;
  color:#fff!important;
  border-color:#326d93!important;
}

/* Never turn a result row black on hover. */
tbody tr:hover,
.weekly-row:hover,
.perf-good-row:hover,
.perf-watch-row:hover,
.perf-poor-row:hover{
  background:#eaf3f8!important;
  color:#17212b!important;
}
tbody tr:hover td,
tbody tr:hover button,
tbody tr:hover a{
  color:inherit;
}
.symbol-link{
  font-weight:800!important;
  text-decoration:underline;
}

/* EMA internal chart opens as a visible modal overlay. */
.chart-modal-lock{overflow:hidden}
.chart-overlay-card.chart-overlay-visible{
  position:fixed!important;
  z-index:10000!important;
  top:4vh!important;
  left:4vw!important;
  width:92vw!important;
  height:92vh!important;
  max-width:none!important;
  overflow:auto!important;
  margin:0!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
  border:1px solid #aebdca!important;
  background:#f8fafc!important;
}
.chart-overlay-card .section-title{
  position:sticky;
  top:0;
  z-index:5;
  background:#f8fafc!important;
  padding-bottom:8px;
}
.chart-close-btn{
  font-weight:800!important;
  min-width:90px;
}

/* Softer candle/chart context. */
#e21Chart{
  border:1px solid #cbd7e0;
  border-radius:12px;
  overflow:hidden;
}

/* v49 polished eye-comfort theme */
:root{
  --ui-bg:#edf3f7;
  --ui-card:#ffffff;
  --ui-card-soft:#f6f9fb;
  --ui-ink:#20313f;
  --ui-muted:#637584;
  --ui-border:#c8d5de;
  --ui-blue:#397ea8;
  --ui-blue-soft:#dbeaf3;
  --ui-green:#158b57;
  --ui-red:#c95454;
  --ui-amber:#b57919;
}

body{
  background:linear-gradient(180deg,#eef4f8 0%,#e9f0f4 100%)!important;
  color:var(--ui-ink)!important;
  font-family:Inter,Segoe UI,Arial,sans-serif!important;
  letter-spacing:0!important;
}
.topbar{
  background:#d9e6ee!important;
  border-bottom:1px solid #b9cbd7!important;
  padding:16px 24px!important;
}
.brand-title{color:#18384f!important;font-weight:900!important}
.brand-sub{color:#587083!important;font-weight:600!important}
.status{background:#f8fbfd!important;color:#37556b!important;border-color:#b9cbd7!important;font-weight:700!important}

.tabs{
  background:#e4edf3!important;
  border-bottom:1px solid #bacbd7!important;
  gap:8px!important;
  padding:10px 18px!important;
}
.tab{
  min-width:92px!important;
  min-height:52px!important;
  padding:10px 13px!important;
  border-radius:11px!important;
  font-weight:850!important;
  line-height:1.15!important;
  font-size:13px!important;
  background:#f8fbfd!important;
  color:#254154!important;
  border:1px solid #bfd0dc!important;
  box-shadow:0 1px 2px rgba(45,70,90,.06)!important;
}
.tab:hover{background:#eaf3f8!important;color:#17384f!important}
.tab.active{background:#397ea8!important;color:#fff!important;border-color:#397ea8!important}

main{padding:18px!important}
.card{
  background:#fff!important;
  border:1px solid #c9d6df!important;
  border-radius:16px!important;
  box-shadow:0 3px 14px rgba(45,65,80,.06)!important;
  color:#20313f!important;
}
.subcard{
  background:#f8fafc!important;
  border-color:#d0dce4!important;
  color:#20313f!important;
}
.card h2,.card h3,.subcard h3{color:#20313f!important;font-weight:850!important}
.card p,.subcard p,.muted,.progress-note{color:#617483!important}

.metric{
  background:#f4f8fb!important;
  color:#617483!important;
  border:1px solid #cbd9e2!important;
  min-height:72px;
}
.metric b{color:#1e3547!important;font-weight:850!important}

table{background:#fff!important;color:#20313f!important}
th{
  background:#e8f0f5!important;
  color:#29485d!important;
  font-weight:850!important;
  border-bottom:1px solid #bccbd6!important;
}
td{color:#263b4a!important;border-bottom:1px solid #dce5eb!important}
tbody tr:nth-child(even){background:#f8fafc!important}
tbody tr:hover,tbody tr:hover td{
  background:#dfeef6!important;
  color:#20313f!important;
}
.symbol-link{color:#246b98!important;font-weight:850!important}
button.primary{background:#397ea8!important;color:#fff!important;border-color:#397ea8!important}
button.secondary{background:#edf3f7!important;color:#29475c!important;border-color:#c1d0da!important}

.fakeout-rule-note,.warningbox{
  background:#eef5f9!important;
  color:#385469!important;
  border-color:#c2d5e1!important;
}
.fakeout-rule-note b,.warningbox b{color:#244257!important}

.setup-status{
  display:inline-block;
  padding:5px 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}
.setup-status.ready{background:#dff4e9;color:#117346;border:1px solid #a9dcc1}
.setup-status.forming{background:#fff2d7;color:#925f0b;border:1px solid #e8cf96}

.universal-chart-close{
  position:absolute!important;
  right:18px;
  top:16px;
  z-index:20;
  font-weight:850!important;
}

/* v51 chart close controls */
.universal-chart-close{
  position:sticky!important;
  float:right!important;
  top:12px!important;
  right:14px!important;
  z-index:999!important;
  margin:10px 12px -48px 0!important;
  padding:8px 13px!important;
  border-radius:9px!important;
  font-weight:900!important;
  background:#eef3f7!important;
  color:#243d50!important;
  border:1px solid #b8c9d5!important;
  box-shadow:0 2px 8px rgba(30,50,65,.12)!important;
}
.universal-chart-close:hover{
  background:#dbeaf3!important;
  color:#15364d!important;
}

/* v52 chart/modal and optional-level improvements */
#foChartCard.chart-overlay-visible{
  position:fixed!important;
  z-index:10000!important;
  top:4vh!important;
  left:4vw!important;
  width:92vw!important;
  height:92vh!important;
  max-width:none!important;
  overflow:auto!important;
  margin:0!important;
  background:#f8fafc!important;
  border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#foChart{min-height:520px;border:1px solid #cbd7e0;border-radius:12px;overflow:hidden}
.chart-modal-header{
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  background:#f8fafc!important;
  padding:10px 6px 12px!important;
}
.chart-close-btn{
  position:sticky!important;
  top:8px!important;
  align-self:flex-start!important;
  z-index:100!important;
  font-weight:900!important;
  background:#e7eef4!important;
  color:#244257!important;
  border:1px solid #b7c8d4!important;
}
.universal-chart-close{
  position:absolute!important;
  float:none!important;
  top:12px!important;
  right:14px!important;
  z-index:999!important;
  margin:0!important;
  padding:8px 13px!important;
}
.ema-level-controls{margin:14px 0!important}
.ema-level-controls .compact{margin-bottom:8px}
.level-option-row{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.level-option-row label{font-weight:750;color:#2c485b}
.level-option-row input:disabled+span{opacity:.65}

/* v53 Drive Pattern */
#dpChartCard.chart-overlay-visible{
  position:fixed!important;
  z-index:10000!important;
  top:4vh!important;
  left:4vw!important;
  width:92vw!important;
  height:92vh!important;
  max-width:none!important;
  overflow:auto!important;
  margin:0!important;
  background:#f8fafc!important;
  border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#dpChart{min-height:520px;border:1px solid #cbd7e0;border-radius:12px;overflow:hidden}
.drive-level-card{margin:14px 0!important}

/* v55 Drive Pattern chart workspace only */
#dpChartCard.chart-overlay-visible.dp-maximized{
  top:0!important;
  left:0!important;
  width:100vw!important;
  height:100vh!important;
  border-radius:0!important;
  border:none!important;
  padding:10px 14px 14px!important;
  margin:0!important;
  overflow:auto!important;
  background:#f8fafc!important;
}

#dpChartCard.dp-maximized .chart-modal-header{
  min-height:64px!important;
  padding:8px 10px!important;
  border-bottom:1px solid #cbd7e0!important;
}

#dpChartCard.dp-maximized #dpChartMetrics{
  margin:8px 0 10px!important;
}

#dpChartCard.dp-maximized #dpChart{
  height:82vh!important;
  min-height:680px!important;
  width:100%!important;
}

.dp-chart-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  position:sticky;
  top:8px;
  z-index:120;
}

#dpChartCard .dp-chart-actions .chart-close-btn{
  position:static!important;
  top:auto!important;
  margin:0!important;
  white-space:nowrap;
}

/* Restore view still remains large, but leaves a visible page margin. */
#dpChartCard.chart-overlay-visible:not(.dp-maximized){
  top:3vh!important;
  left:3vw!important;
  width:94vw!important;
  height:94vh!important;
}

@media (max-width:900px){
  #dpChartCard.chart-overlay-visible.dp-maximized{
    padding:6px!important;
  }
  #dpChartCard.dp-maximized #dpChart{
    height:78vh!important;
    min-height:560px!important;
  }
  .dp-chart-actions{
    gap:5px;
  }
}

/* v56 Drive Pattern horizontal chart navigation */
.dp-scroll-toolbar{
  position:sticky;
  top:68px;
  z-index:110;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  margin:8px 0 4px;
  background:rgba(248,250,252,.97);
  border:1px solid #cbd7e0;
  border-radius:10px;
  box-shadow:0 2px 8px rgba(40,60,75,.06);
}
.dp-scroll-group{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.dp-nav-btn{
  min-height:34px;
  padding:7px 11px!important;
  font-weight:800!important;
  white-space:nowrap;
}
.dp-scroll-info{
  color:#4d6576;
  font-size:12px;
  font-weight:750;
  padding:4px 8px;
  white-space:nowrap;
}
.dp-scroll-range-wrap{
  position:sticky;
  top:118px;
  z-index:105;
  background:#f8fafc;
  padding:6px 10px 10px;
  border-left:1px solid #cbd7e0;
  border-right:1px solid #cbd7e0;
}
.dp-scroll-range{
  width:100%;
  accent-color:#3d7faa;
  cursor:ew-resize;
}
#dpChartCard.dp-maximized #dpChart{
  height:78vh!important;
  min-height:640px!important;
}

.drive-fakeout-note{
  margin:14px 0!important;
  line-height:1.55!important;
}

.drive-filter-card{margin:14px 0!important}
.drive-filter-card .filter-inline-title{font-weight:900;color:#2d4a5e;margin-right:4px}
.drive-filter-card .compact-filter-grid{margin:10px 0!important}
.dp-location-levels{margin-top:10px!important;padding-top:10px;border-top:1px solid #d4dfe6}

#rsiChartCard.chart-overlay-visible{
  position:fixed!important;z-index:10000!important;top:3vh!important;left:3vw!important;width:94vw!important;height:94vh!important;
  overflow:auto!important;margin:0!important;background:#f8fafc!important;border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#rsiChart{border:1px solid #cbd7e0;border-radius:12px;overflow:hidden}

.rsi-sequence-card{
  border-left:4px solid #4b86aa!important;
}
.rsi-sequence-card b{color:#24485f}

.rsi-integrity-card{
  border-left:4px solid #b07a32!important;
  background:#fffaf2!important;
}
.rsi-integrity-card b{color:#684717}

button.danger{
  background:#c93f4b!important;
  color:#fff!important;
  border:1px solid #a92f3a!important;
  font-weight:800!important;
}
button.danger:hover{filter:brightness(.96)}
.card-lite{margin-top:14px}
#positionManager .metricgrid{margin-top:10px}

#cacheStats{margin-top:12px}

/* v65 streamlined navigation — functionality/pages remain preserved internally */
.tabs{
  justify-content:flex-start;
}

.rsi-chart-level-card{
  border-left:4px solid #668aa1!important;
}
.rsi-chart-level-options{
  gap:12px 18px!important;
}

.multi-ema-input-card{border-left:4px solid #5e8299!important}
.me-ema-field span{display:flex;align-items:center;gap:8px;font-weight:850;color:#29495d}
.me-chart-level-card{border-left:4px solid #668aa1!important}
#meChartCard.chart-overlay-visible{
  position:fixed!important;z-index:10000!important;top:3vh!important;left:3vw!important;width:94vw!important;height:94vh!important;
  overflow:auto!important;margin:0!important;background:#f8fafc!important;border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#meChart{border:1px solid #cbd7e0;border-radius:12px;overflow:hidden}

.rsi-combo-note{margin:12px 0!important;border-left:4px solid #5f88a1!important}

select[id$="LiqMode"]{font-weight:800}
.multi-ema-rule-card{border-left:4px solid #507f9b!important}

.fakeout-live-card{
  margin:14px 0!important;
  border-left:4px solid #5b87a3!important;
}
.fakeout-stage-flow{
  margin-top:10px;padding:9px 12px;border:1px solid #cbd9e2;border-radius:9px;
  background:#f7fafc;font-weight:850;letter-spacing:.1px;color:#304e62;
}
.fakeout-stage-flow span{padding:0 8px;color:#718696}
.fakeout-status{
  display:inline-block;padding:4px 8px;border-radius:999px;font-weight:900;font-size:11px;white-space:nowrap;
  border:1px solid #a9b8c2;background:#f5f7f9;color:#334955;
}
.fakeout-status.swept{background:#fff5de;border-color:#d6a64f;color:#724f13}
.fakeout-status.reclaim{background:#eaf3fb;border-color:#6e9fc1;color:#28526d}
.fakeout-status.confirmed{background:#e9f5ed;border-color:#6fa184;color:#28593c}
.fakeout-status.wait{background:#f3f5f6;border-color:#abb7bf;color:#53636d}

.fakeout-third-candle-card{
  margin:14px 0!important;
  border-left:4px solid #8c6c42!important;
  background:#fffaf3!important;
}

.fakeout-liquidity-chart-card{margin:14px 0!important;border-left:4px solid #75614a!important;background:#fbfaf7!important;}

.custom-pattern-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;margin-top:10px}
.custom-pattern-grid .inline-check{align-items:flex-start;padding:12px;border:1px solid #d9e2e8;border-radius:10px;background:#fbfcfd}
.custom-chart-stack{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:1350px){.custom-chart-stack{grid-template-columns:1fr 1fr}}




/* v80 readability fix across ALL tabs/themes */
label,
.form-grid label,
.mini-form-grid label,
.inline-check,
.subcard label{
  font-weight:800!important;
  color:var(--text)!important;
  font-size:13px!important;
  opacity:1!important;
}

label small,
.mini-note,
.helper-note,
.section-title p,
.muted{
  color:var(--muted)!important;
  font-weight:650!important;
  opacity:1!important;
}

/* Keep disabled filter labels readable; only the controls themselves look disabled */
.disabled-filter{
  opacity:1!important;
}
.disabled-filter label{
  color:var(--text)!important;
  opacity:1!important;
}
.disabled-filter input:disabled,
.disabled-filter select:disabled{
  opacity:.68!important;
}
input:disabled,select:disabled{
  opacity:.72;
}

.subcard h3,.section-title h2,.card h2{
  font-weight:850!important;
}

.custom-ltf-links-card{margin-top:16px}
#cfExtraTfLinks button{font-weight:800}


/* v82 large chart workspaces */
#cfChartCard.chart-overlay-visible.cf-maximized,
#rsiChartCard.chart-overlay-visible.rsi-maximized{
  position:fixed!important;
  z-index:10000!important;
  top:1vh!important;
  left:1vw!important;
  width:98vw!important;
  height:98vh!important;
  max-width:none!important;
  margin:0!important;
  overflow:auto!important;
  background:#f8fafc!important;
  border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#cfChartCard.cf-maximized #cfParentChart,
#cfChartCard.cf-maximized #cfLtfChart,
#cfChartCard.cf-maximized #cfExtraChart{
  height:80vh!important;
  min-height:680px!important;
}
#rsiChartCard.rsi-maximized #rsiChart{
  height:82vh!important;
  min-height:720px!important;
}
.rsi-current-leg-card{margin:14px 0!important;border-left:4px solid #557f9a!important}


/* v84 Consolidation large chart workspace */
#csChartCard.chart-overlay-visible.cs-maximized{
  position:fixed!important;
  z-index:10000!important;
  top:1vh!important;
  left:1vw!important;
  width:98vw!important;
  height:98vh!important;
  max-width:none!important;
  margin:0!important;
  overflow:auto!important;
  background:#f8fafc!important;
  border:1px solid #aebdca!important;
  box-shadow:0 20px 60px rgba(45,65,80,.25)!important;
}
#csChartCard.cs-maximized #csParentChart,
#csChartCard.cs-maximized #csChildChart,
#csChartCard.cs-maximized #csExtraChart{
  height:80vh!important;
  min-height:680px!important;
}

/* v87: explicit consolidation type in output table */
.consolidation-type-badge{
  display:inline-block;
  min-width:82px;
  padding:5px 9px;
  border-radius:7px;
  font-weight:800;
  letter-spacing:.35px;
  text-align:center;
  border:1px solid #8093a2;
  background:#f8fafc;
}
.consolidation-type-badge.standard{background:#edf4f8;border-color:#7f9eb2;}
.consolidation-type-badge.tight{background:#fff5df;border-color:#c49a51;}
