:root {
  --bg: #07090d;
  --panel: #0e131b;
  --panel2: #131a24;
  --line: #1e2733;
  --grid: #141b25;
  --text: #e6ebf2;
  --muted: #8592a3;
  --bull: #22c55e;
  --bull-soft: rgba(34, 197, 94, .12);
  --bear: #ef4444;
  --bear-soft: rgba(239, 68, 68, .12);
  --accent: #f5b942;
  --violet: #a78bfa;
  --blue: #60a5fa;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 "Inter", "Noto Sans Gujarati", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--bull); }
.down { color: var(--bear); }
.muted { color: var(--muted); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 10px 20px; background: rgba(7, 9, 13, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.brand i { width: 12px; height: 12px; background: linear-gradient(135deg, var(--bull) 50%, var(--bear) 50%); transform: rotate(45deg); display: inline-block; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { white-space: nowrap; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.top nav a.on, .top nav a:hover { color: var(--text); background: var(--panel2); }
.search { position: relative; }
.search input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 6px 10px; width: 160px; font: inherit; text-transform: uppercase; }
.search .sugg { position: absolute; top: 34px; left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; max-height: 260px; overflow: auto; display: none; }
.search .sugg a { display: block; padding: 6px 10px; font-family: var(--mono); font-size: 13px; }
.search .sugg a:hover { background: var(--line); }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.pill.live::before, .pill.demo::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pill.live::before { background: var(--bull); box-shadow: 0 0 8px var(--bull); }
.pill.demo::before { background: var(--accent); }

main { max-width: 1320px; margin: 0 auto; padding: 18px 20px 60px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 0; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.notice { padding: 28px; text-align: center; }
.notice .btn { margin-top: 14px; }
.btn { display: inline-block; background: var(--accent); color: #111; font-weight: 600; border: 0; border-radius: 10px;
  padding: 9px 16px; cursor: pointer; font: inherit; font-weight: 600; }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 14px auto 0; max-width: 360px; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* Board */
.summary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.summary .stat { padding: 10px 14px; min-width: 110px; }
.stat b { display: block; font-size: 20px; font-family: var(--mono); }
.stat span { font-size: 12px; color: var(--muted); }
.summary .time { margin-left: auto; color: var(--muted); font-size: 12px; }
.breadth { flex: 1; min-width: 200px; padding: 10px 14px; }
.breadth .track { display: flex; height: 8px; border-radius: 6px; overflow: hidden; margin-top: 6px; background: var(--line); }
.breadth .track i { display: block; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.col-head h2 { display: flex; align-items: center; gap: 8px; }
.col-head h2::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.bull-col .col-head h2::before { background: var(--bull); }
.bear-col .col-head h2::before { background: var(--bear); }
.row { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.row:hover { background: var(--panel2); }
.row:last-child { border-bottom: 0; }
.row .rk { font-family: var(--mono); color: var(--muted); font-size: 12px; padding-top: 2px; }
.row .sym { font-weight: 700; letter-spacing: .2px; }
.row .sec { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.row .right { text-align: right; }
.row .px { font-family: var(--mono); font-size: 13px; }
.row .chg { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.row .lv { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.row .lv > span { white-space: nowrap; }
.row .lv b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.row .lv .ob b { color: var(--accent); }
.score { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.score .meter { width: 54px; height: 5px; background: var(--line); border-radius: 4px; overflow: hidden; }
.score .meter i { display: block; height: 100%; }
.tag { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.tag.lb { color: var(--bull); border-color: rgba(34,197,94,.35); }
.tag.sc { color: #86efac; }
.tag.sb { color: var(--bear); border-color: rgba(239,68,68,.35); }
.tag.lu { color: #fca5a5; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.sectors { margin-top: 14px; padding: 12px 14px; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.sec-cell { border-radius: 10px; padding: 8px 10px; border: 1px solid var(--line); }
.sec-cell .n { font-size: 12px; color: var(--muted); }
.sec-cell b { font-family: var(--mono); }

/* Stock page */
.stock-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; margin-bottom: 12px; }
.stock-head .big { font-size: 28px; font-family: var(--mono); font-weight: 600; }
.stock-head .tfs { margin-left: auto; display: flex; gap: 4px; }
.tfs button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 12px; cursor: pointer; font: inherit; }
.tfs button.on { color: var(--text); border-color: var(--accent); }
.chart-wrap { position: relative; height: 520px; padding: 6px; }
#chart { position: absolute; inset: 6px; }
#overlay { position: absolute; inset: 6px; pointer-events: none; overflow: hidden; }
.obbox { position: absolute; border: 1px dashed; border-radius: 3px; }
.obbox.bull { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.5); }
.obbox.bear { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.5); }
.obbox.active { border-style: solid; }
.obbox.bull.active { background: rgba(34,197,94,.22); }
.obbox.bear.active { background: rgba(239,68,68,.22); }
.obbox span { position: absolute; left: 6px; top: 1px; font-size: 10px; color: var(--text); opacity: .8; }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.level { padding: 10px 12px; }
.level span { font-size: 12px; color: var(--muted); display: block; }
.level b { font-family: var(--mono); font-size: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 3px; margin-right: 5px; vertical-align: 3px; }

/* X-Ray */
.xray-svg { width: 100%; height: auto; display: block; }
.xray-svg circle { cursor: pointer; }
.xray-svg text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.secbars { padding: 12px 14px; }
.secbar { display: grid; grid-template-columns: 140px 1fr 60px; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.secbar .trk { position: relative; height: 10px; }
.secbar .trk::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line); }
.secbar .trk i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }

/* Journal */
.jgrid { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
form.jform { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
form.jform label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
form.jform .full { grid-column: 1 / 3; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 9px; font: inherit; }
textarea { min-height: 60px; resize: vertical; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--grid); text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.n { font-family: var(--mono); text-align: right; }
.xbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; }
.xbtn:hover { color: var(--bear); }
.tablewrap { overflow-x: auto; }

/* Learn */
.learn { max-width: 820px; }
.learn section { padding: 18px 20px; margin-bottom: 12px; }
.learn h2 { font-size: 17px; margin-bottom: 8px; color: var(--accent); }
.learn p, .learn li { color: #c9d2de; }
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 24px; text-align: center; }

@media (max-width: 860px) {
  .cols, .jgrid { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .top nav { order: 3; width: 100%; overflow-x: auto; }
  main { padding: 14px 14px 50px; }
  .chart-wrap { height: 420px; }
  .search input { width: 120px; }
  .secbar { grid-template-columns: 100px 1fr 54px; }
}
form.jform input, form.jform select, form.jform textarea { width: 100%; min-width: 0; }

/* Signals */
.sig { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.sig.TRIGGER { background: var(--accent); color: #111; border-color: var(--accent); animation: pulse 1.6s infinite; }
.sig.ACTIVE { color: var(--accent); border-color: rgba(245,185,66,.5); }
.sig.IN_ZONE { color: #93c5fd; border-color: rgba(96,165,250,.5); }
.sig.NEAR { color: #cbd5e1; }
.sig.WATCH { color: var(--muted); }
.sig.TARGET { color: var(--bull); border-color: rgba(34,197,94,.5); }
.sig.SL { color: var(--bear); border-color: rgba(239,68,68,.5); }
.sig.TIME, .sig.LOW_RR, .sig.BLOCKED, .sig.CLOSED, .sig.NONE { color: var(--muted); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,185,66,.5); } 50% { box-shadow: 0 0 0 5px rgba(245,185,66,0); } }
.sig-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px; }
.sig-strip a.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 10px; background: var(--panel2); font-size: 13px; }
.sig-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.sig-card { padding: 12px 14px; display: block; }
.sig-card:hover { border-color: var(--muted); }
.sig-card .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.sig-card .plan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.sig-card .plan b { display: block; font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
.side { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.side.BUY { background: var(--bull-soft); color: var(--bull); }
.side.SELL { background: var(--bear-soft); color: var(--bear); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 5px 0; display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--grid); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ic { width: 18px; text-align: center; font-weight: 700; }
.checklist .ok .ic { color: var(--bull); }
.checklist .no .ic { color: var(--bear); }
.checklist .soft { color: var(--muted); }
.sigbox { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.sigbox .card { padding: 12px 14px; }
.bell { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 13px; white-space: nowrap; }
.bell.on { color: var(--accent); border-color: rgba(245,185,66,.5); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--panel2); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px; min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast b { font-size: 15px; }
@media (max-width: 860px) { .sigbox { grid-template-columns: 1fr; } }

/* Index cards */
.idx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.idx-card { padding: 14px 16px; display: block; }
.idx-card:hover { border-color: var(--muted); }
.idx-card .top2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.idx-card .px { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.idx-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.idx-card .meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.opt { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(245,185,66,.1); color: var(--accent); border: 1px solid rgba(245,185,66,.3); }
.tg { padding: 14px 16px; margin-top: 14px; }
.tg ol { margin: 8px 0; padding-left: 20px; color: #c9d2de; font-size: 13px; }
.tg code { font-family: var(--mono); background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 860px) { .idx-row { grid-template-columns: 1fr; } }

.sig.BE { color: var(--muted); }
.sig.LIMIT { color: #fca5a5; border-color: rgba(239,68,68,.35); }
.size { font-size: 12px; margin-top: 6px; color: var(--muted); }
.size b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.guard { background: var(--bear-soft); border: 1px solid rgba(239,68,68,.35); color: #fca5a5; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--grid); cursor: pointer; }
.toggle:last-child { border-bottom: 0; }
.toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.toggle b { display: block; font-size: 14px; }
.toggle span { font-size: 12px; color: var(--muted); }
