/* StoxGod common layout: header, menu, mobile menu, breadcrumb, footer, sign-in gate.
   Used by EVERY page through layout.js. Edit the look here once and all pages change. */
:root{--sg-h:58px;--sg-bg:#ffffff;--sg-bg2:#ffffff;--sg-tx:#0f172a;--sg-mu:#64748b;--sg-ac:#4f46e5;--sg-ln:#e2e8f0}
body{margin:0}
html.sg-lock,html.sg-lock body{overflow:hidden}

/* ---------- header ---------- */
.sg-hd button,.sg-drawer button,.sg-gate button{font-family:inherit;margin:0;text-transform:none;letter-spacing:normal}
.sg-hd{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid var(--sg-ln);box-shadow:0 1px 8px rgba(15,23,42,.06);padding-top:env(safe-area-inset-top,0);font:14px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--sg-tx);-webkit-text-size-adjust:100%}
.sg-hd *,.sg-drawer *,.sg-ft *,.sg-gate *{box-sizing:border-box}
.sg-hd a,.sg-drawer a,.sg-ft a{text-decoration:none}
.sg-in{max-width:1180px;margin:0 auto;height:var(--sg-h);display:flex;align-items:center;gap:18px;padding:0 16px}
.sg-brand{display:flex;align-items:center;gap:10px;color:#0f172a;flex:none}
.sg-brand svg{width:34px;height:34px;flex:none;display:block}
.sg-bn{font-size:19px;font-weight:800;letter-spacing:-.02em;white-space:nowrap}
.sg-bn em{font-style:normal;color:var(--sg-ac);font-weight:700}
.sg-nav{display:flex;align-items:center;gap:2px;margin-left:auto}
.sg-nav a{position:relative;padding:8px 10px;border-radius:8px;color:#475569;font-weight:600;white-space:nowrap;transition:background .15s,color .15s}
.sg-nav a:hover{background:#f1f5f9;color:#0f172a}
.sg-nav a.on{color:#4338ca;background:#eef2ff}
.sg-nav a.on::after{content:"";position:absolute;left:10px;right:10px;bottom:2px;height:2px;border-radius:2px;background:var(--sg-ac)}
.sg-auth{display:flex;align-items:center;gap:8px;flex:none}
.sg-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;font:inherit;font-weight:700;padding:8px 14px;border-radius:9px;cursor:pointer;white-space:nowrap;line-height:1.2;min-height:36px}
.sg-btn:hover{background:#f1f5f9}
.sg-btn.pri{background:#fff;color:#4338ca;border-color:#c7d2fe}
.sg-btn.pri:hover{background:#eef2ff}
.sg-btn svg{width:16px;height:16px;flex:none}
.sg-user{display:flex;align-items:center;gap:8px;color:#0f172a;font-weight:600;max-width:200px}
.sg-user img{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:none;background:#e2e8f0}
.sg-user span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sg-burger{display:none;flex:none;width:40px;height:40px;border:1px solid #cbd5e1;background:#fff;border-radius:9px;color:#0f172a;cursor:pointer;align-items:center;justify-content:center;padding:0}
.sg-burger svg{width:22px;height:22px}

/* ---------- mobile breadcrumb ---------- */
.sg-crumb{display:none;align-items:center;gap:7px;padding:9px 14px;background:#f1f5f9;border-bottom:1px solid #e2e8f0;font:13px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#475569}
.sg-crumb a{color:#4f46e5;font-weight:700;text-decoration:none}
.sg-crumb i{font-style:normal;color:#94a3b8}
.sg-crumb b{color:#0f172a;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- mobile menu (slides in from the right) ---------- */
.sg-scrim{position:fixed;inset:0;background:rgba(15,23,42,.4);opacity:0;visibility:hidden;transition:opacity .22s,visibility .22s;z-index:1090;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.sg-drawer{position:fixed;top:0;right:0;bottom:0;width:min(320px,86vw);background:#fff;color:var(--sg-tx);z-index:1100;transform:translateX(100%);visibility:hidden;transition:transform .25s cubic-bezier(.4,0,.2,1),visibility .25s;display:flex;flex-direction:column;box-shadow:-10px 0 40px rgba(15,23,42,.2);padding:env(safe-area-inset-top,0) 0 env(safe-area-inset-bottom,0);font:15px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;overflow-y:auto}
html.sg-open .sg-scrim{opacity:1;visibility:visible}
html.sg-open .sg-drawer{transform:none;visibility:visible}
.sg-dh{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--sg-ln)}
.sg-dx{padding:0;width:38px;height:38px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:9px;font-size:20px;line-height:1;cursor:pointer}
.sg-dl{display:flex;flex-direction:column;padding:10px 10px 6px;gap:2px}
.sg-dl a{padding:13px 14px;border-radius:10px;color:#334155;font-weight:600}
.sg-dl a:hover{background:#f1f5f9}
.sg-dl a.on{background:#eef2ff;color:#4338ca;box-shadow:inset 3px 0 0 var(--sg-ac)}
.sg-dsub{padding:10px 24px 4px;color:var(--sg-mu);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.sg-dl.small a{padding:10px 14px;font-weight:500;color:#64748b;font-size:14px}
.sg-da{margin-top:auto;padding:14px;border-top:1px solid var(--sg-ln);display:flex;flex-direction:column;gap:10px}
.sg-da .sg-btn{width:100%}
.sg-da .sg-user{max-width:none}

/* ---------- footer ---------- */
.sg-ft{background:var(--sg-bg);color:var(--sg-mu);margin-top:28px;border-top:1px solid var(--sg-ln);padding:26px 16px calc(22px + env(safe-area-inset-bottom,0));font:13px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;clear:both}
.sg-fi{max-width:1180px;margin:0 auto}
.sg-ft1{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.sg-ft .sg-brand{margin-bottom:6px}
.sg-ft p{margin:0;max-width:460px}
.sg-fl{display:flex;gap:6px 22px;flex-wrap:wrap;align-items:center}
.sg-fl a{color:#334155;font-weight:600}
.sg-fl a:hover{color:#4338ca;text-decoration:underline}
.sg-fn{margin-top:18px;padding-top:14px;border-top:1px solid var(--sg-ln);font-size:12px;color:#64748b}
.sg-fc{margin-top:8px;font-size:12px;color:#64748b}

/* ---------- sign-in gate (algo + auto-trading pages) ---------- */
.sg-gate{position:fixed;inset:0;z-index:1200;background:rgba(2,6,23,.78);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:none;align-items:center;justify-content:center;padding:16px;font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.sg-gate.show{display:flex}
.sg-gbox{max-height:94vh;overflow:auto;background:#fff;color:#0f172a;border-radius:20px;padding:26px 24px 20px;width:100%;max-width:390px;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.45)}
.sg-gbox svg.lg{width:46px;height:46px;display:block;margin:0 auto}
.sg-gbox h2{margin:10px 0 4px;font-size:21px;letter-spacing:-.01em}
.sg-gbox p{margin:0 0 14px;color:#64748b;font-size:14px}
.sg-gbtn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:11px;font:inherit;font-weight:700;cursor:pointer;min-height:46px}
.sg-gbtn:hover{background:#f1f5f9}
.sg-gbtn:disabled{opacity:.6;cursor:wait}
.sg-gbtn svg{width:20px;height:20px}
.sg-gerr{color:#dc2626;font-size:13px;min-height:18px;margin:10px 0 2px;word-break:break-word}
.sg-glnk{text-decoration:none;display:inline-block;margin-top:8px;color:#4f46e5;font-weight:700;font-size:13px;background:none;border:0;cursor:pointer;padding:6px}
.sg-gsec{margin-top:10px;font-size:11px;color:#94a3b8}

/* ---------- toast ---------- */
.sg-toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#0f172a;color:#fff;padding:10px 16px;border-radius:10px;font:14px/1.3 system-ui,-apple-system,Arial,sans-serif;z-index:1300;max-width:92%;box-shadow:0 8px 24px rgba(0,0,0,.35);display:none}

/* ---------- phones and small tablets ---------- */
@media (max-width:1230px){
  .sg-nav{display:none}
  .sg-burger{display:inline-flex}
  .sg-auth{margin-left:auto}
  .sg-in{gap:10px;padding:0 12px}
  .sg-crumb{display:flex}
  .sg-auth .sg-user span,.sg-auth .sg-out{display:none}
}
@media (max-width:380px){.sg-bn{font-size:17px}.sg-brand svg{width:30px;height:30px}.sg-auth .sg-btn{padding:8px 10px}}
@media (prefers-reduced-motion:reduce){.sg-drawer,.sg-scrim{transition:none}}

/* =====================================================================
   RICH THEME: the body of every page (header and logo are not touched)
   Brand: violet #7c3aed > indigo #4f46e5 > blue #2563eb. Depth from soft gradients and layered shadows.
   ===================================================================== */
:root{--rt-grad:linear-gradient(135deg,#7c3aed 0%,#4f46e5 48%,#2563eb 100%);--rt-line:rgba(99,102,241,.16);--rt-shadow:0 1px 2px rgba(15,23,42,.05),0 12px 30px -16px rgba(49,46,129,.28)}
html{background:#f1f4fc}
body{background-color:#f1f4fc;background-image:radial-gradient(1100px 520px at 100% -140px,rgba(124,58,237,.17),transparent 70%),radial-gradient(900px 500px at -10% -80px,rgba(37,99,235,.14),transparent 65%),linear-gradient(180deg,#f8f9ff 0,#f0f3fc 520px,#f1f4fc 100%);background-repeat:no-repeat;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
::selection{background:#c7d2fe;color:#1e1b4b}

/* cards */
.card,.c,.c-card,.address-card,.disclaimer-box,.gst-card{background:#fff;border:1px solid var(--rt-line);border-radius:18px;box-shadow:var(--rt-shadow)}
.card,.c{padding:15px 18px}
.card h2,.c h2{display:flex;align-items:center;gap:9px;font-weight:800;letter-spacing:-.01em}
.card h2::before,.c h2::before{content:"";flex:none;width:5px;height:16px;border-radius:3px;background:linear-gradient(180deg,#7c3aed,#2563eb)}
.wrap{gap:14px;padding-top:16px;padding-bottom:26px}
.w{display:block}
.c{margin-bottom:14px}.g{gap:14px}
main{gap:14px}

/* home status cards */
.card.sc{position:relative;overflow:hidden;padding:16px 18px;background:linear-gradient(180deg,#fff 0%,#fafbff 100%);border:1px solid var(--rt-line);border-left:5px solid var(--c,#c7d2fe);transition:transform .18s ease,box-shadow .18s ease}
.card.sc::after{content:"";position:absolute;right:-36px;top:-36px;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,var(--c,#6366f1) 0,transparent 68%);opacity:.14;pointer-events:none}
a.card.sc.s-nt::after{display:none}
a.card.sc:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(15,23,42,.05),0 18px 36px -16px rgba(49,46,129,.4)}
.sc .p{font-size:32px;font-weight:800;letter-spacing:-.03em;margin:3px 0 8px}
.sc .t{font-size:12px;letter-spacing:.08em}
.sc .badge{border-radius:10px;padding:5px 12px}
.s1{background:linear-gradient(180deg,#ffffff,#f7f8ff);border:1px solid var(--rt-line);border-radius:12px;padding:10px 12px}
.s1 .go{box-shadow:0 8px 18px -8px rgba(15,23,42,.45);font-size:17px;padding:7px 16px}

/* buttons */
.wrap .btn:not(.sec){background-image:var(--rt-grad);border-color:transparent;box-shadow:0 10px 20px -10px rgba(79,70,229,.75);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
.wrap .btn:not(.sec):hover{transform:translateY(-1px);filter:brightness(1.07);box-shadow:0 14px 24px -10px rgba(79,70,229,.85)}
.wrap .btn.sec{background:#fff;color:#4338ca;border:1px solid #c7d2fe;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.wrap .btn.sec:hover{background:#eef2ff;border-color:#a5b4fc}
.w button{background-image:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,0));box-shadow:0 6px 14px -8px rgba(15,23,42,.5);transition:transform .15s ease,filter .15s ease}
.w button:hover{transform:translateY(-1px);filter:brightness(1.06)}
.w button.o{box-shadow:0 1px 2px rgba(15,23,42,.08)}

/* forms */
.f input,.f select,.f textarea,.c input,.c select,.card input:not([type=checkbox]),.card select{border:1px solid #d2d9ec;border-radius:11px;background:#fff;box-shadow:inset 0 1px 2px rgba(15,23,42,.04);transition:border-color .15s,box-shadow .15s}
.f input:focus,.f select:focus,.f textarea:focus,.c input:focus,.c select:focus,.card input:focus,.card select:focus{outline:0;border-color:#6366f1;box-shadow:0 0 0 4px rgba(99,102,241,.16)}

/* tables */
.card table th,.c table th{background:rgba(99,102,241,.07);color:#4b5675}
.card table th:first-child,.c table th:first-child{border-radius:9px 0 0 9px}.card table th:last-child,.c table th:last-child{border-radius:0 9px 9px 0}
.card table tbody tr:nth-child(even) td,.c table tbody tr:nth-child(even) td{background:rgba(99,102,241,.03)}
.card table tbody tr:hover td,.c table tbody tr:hover td{background:rgba(99,102,241,.08)}

/* sticky toolbar tiles on the Nifty / Crude pages */
.tl{border:1px solid var(--rt-line);border-radius:14px;box-shadow:var(--rt-shadow)}

/* numbers, chips, notes */
.k{font-weight:800;letter-spacing:-.02em}
.kv>div{background:linear-gradient(180deg,#f7f8ff,#eef1fe);border:1px solid var(--rt-line);border-radius:12px}
.chip{border-radius:7px}
.note{border-radius:10px}

/* page title strip on the Nifty / Crude pages */
.hd{background:linear-gradient(120deg,#ffffff 0%,#f3f1ff 100%);border-left:5px solid #6d5dfc;border-radius:16px;box-shadow:var(--rt-shadow);padding:14px 18px}
.hd h1{font-size:21px;font-weight:800;letter-spacing:-.02em}
.ph h1{font-weight:800;letter-spacing:-.02em}

/* footer */
.sg-ft{position:relative;background:linear-gradient(180deg,#ffffff 0%,#f4f5ff 100%);border-top:0;margin-top:34px}
.sg-ft::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:var(--rt-grad)}

/* home hero + tool tiles */
.rt-hero{position:relative;overflow:hidden;border-radius:22px;padding:28px;color:#fff;background:linear-gradient(120deg,#7c3aed 0%,#4f46e5 50%,#2563eb 100%);box-shadow:0 22px 44px -22px rgba(79,70,229,.8);display:grid;grid-template-columns:1.35fr 1fr;gap:22px;align-items:center}
.rt-hero::before,.rt-hero::after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.rt-hero::before{width:300px;height:300px;right:-70px;top:-120px;background:rgba(255,255,255,.11)}
.rt-hero::after{width:200px;height:200px;right:170px;bottom:-120px;background:rgba(255,255,255,.07)}
.rt-hero>*{position:relative;z-index:1}
.rt-hero h1{margin:0 0 10px;font-size:34px;line-height:1.1;letter-spacing:-.03em;font-weight:800;color:#fff}
.rt-hero p{margin:0 0 16px;color:#e4e9ff;font-size:15px;line-height:1.55;max-width:540px}
.rt-cta{display:flex;gap:10px;flex-wrap:wrap}
.rt-cta a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 20px;border-radius:12px;font-weight:800;font-size:14px;text-decoration:none;background:#fff;color:#4338ca;box-shadow:0 10px 22px -10px rgba(15,23,42,.6)}
.rt-cta a.g2{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.35);box-shadow:none}
.rt-hs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rt-hs div{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.26);border-radius:14px;padding:12px 13px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.rt-hs b{display:block;font-size:15px;font-weight:800;margin-bottom:2px}.rt-hs span{font-size:12px;color:#e4e9ff;line-height:1.35;display:block}
.rt-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.rt-tiles a{display:flex;gap:12px;align-items:center;padding:14px;background:#fff;border:1px solid var(--rt-line);border-radius:16px;box-shadow:var(--rt-shadow);text-decoration:none;color:#0f172a;transition:transform .15s ease,box-shadow .15s ease}
.rt-tiles button{display:flex;gap:12px;align-items:center;padding:14px;background:#fff;border:1px solid var(--rt-line);border-radius:16px;box-shadow:var(--rt-shadow);color:#0f172a;text-align:left;font:inherit;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.rt-tiles button:disabled{opacity:.6;cursor:wait}
.rt-tiles button:hover,.rt-tiles a:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(15,23,42,.05),0 16px 30px -16px rgba(49,46,129,.4)}
.rt-tiles i{flex:none;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;font-style:normal;font-size:21px;background:linear-gradient(135deg,#ede9fe,#dbeafe)}
.rt-tiles b{display:block;font-size:14px;font-weight:800}.rt-tiles span{display:block;font-size:12px;color:#64748b;line-height:1.3;margin-top:1px}
@media (max-width:900px){.rt-tiles{grid-template-columns:repeat(2,1fr)}}
@media (max-width:760px){.rt-hs{display:none}.rt-hero{grid-template-columns:1fr;padding:22px 18px;gap:16px;border-radius:20px}.rt-hero h1{font-size:26px}.card,.c{padding:13px 14px}.sc .p{font-size:28px}}
@media (max-width:420px){.rt-tiles a,.rt-tiles button{padding:11px;gap:9px}.rt-tiles i{width:36px;height:36px;font-size:18px}}
/* nine menu items: slightly tighter links on laptop widths so everything still fits next to the login chip */
@media (min-width:1231px) and (max-width:1400px){.sg-nav a{padding:8px 7px;font-size:13.5px}.sg-nav a.on::after{left:7px;right:7px}.sg-in{gap:14px}}
