
*{scrollbar-width:thin;scrollbar-color:#273447 transparent}
html,body{margin:0;min-height:100%;background:#070b12;transition:background-color .3s ease,color .3s ease}
body{overflow-x:hidden}
.glass{background:rgba(13,19,29,.9);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.grid-bg{background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:32px 32px}
.ticker-scroll{animation:ticker 35s linear infinite}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.pulse-dot{box-shadow:0 0 0 0 rgba(32,201,151,.65);animation:pulse 2s infinite}
@keyframes pulse{70%{box-shadow:0 0 0 7px rgba(32,201,151,0)}100%{box-shadow:0 0 0 0 rgba(32,201,151,0)}}
.number{font-variant-numeric:tabular-nums}
button,select,input{-webkit-tap-highlight-color:transparent}
#chart{height:430px;min-height:300px}
@media(max-width:900px){#chart{height:360px}}
@media(max-width:640px){#chart{height:300px}}
.safe-bottom{padding-bottom:env(safe-area-inset-bottom)}
html:not(.dark) body{background:#f8fafc;color:#0f172a}
html:not(.dark) .glass{background:rgba(255,255,255,.9)}
html:not(.dark) .bg-panel{background:#fff;border-color:#e2e8f0}
html:not(.dark) .bg-panel2{background:#f1f5f9;border-color:#e2e8f0}
html:not(.dark) .border-line{border-color:#e2e8f0}
html:not(.dark) .text-slate-100{color:#0f172a}
html:not(.dark) .text-slate-300{color:#334155}
html:not(.dark) .text-slate-400{color:#475569}
html:not(.dark) .text-slate-500{color:#64748b}
[v-cloak]{display:none!important}
.auth-loading{position:fixed;inset:0;z-index:999;background:#070b12;display:flex;align-items:center;justify-content:center}
.auth-loading.hidden{display:none}
.login-modal{background:rgba(13,19,29,.98);border:1px solid #202b3a;box-shadow:0 30px 100px rgba(0,0,0,.6)}
.login-input{background:#090e16;border:1px solid #202b3a;color:#e2e8f0}
.login-input:focus{border-color:rgba(214,168,79,.7);outline:none;box-shadow:0 0 0 3px rgba(214,168,79,.08)}
.auth-locked .protected-action{opacity:.55}
.chart-shell {
  position:relative;
  background:#090e16;
  border:1px solid rgba(148,163,184,.13);
  border-radius:14px;
  overflow:hidden;
}
.chart-shell-top {
  height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 10px;
  border-bottom:1px solid rgba(148,163,184,.12);
  background:linear-gradient(180deg,rgba(17,25,37,.98),rgba(9,14,22,.98));
}
.chart-shell-left,.chart-shell-right {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.chart-ui-pill {
  height:27px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 9px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:7px;
  background:rgba(255,255,255,.025);
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
}
.chart-ui-pill.active {
  color:#d6a84f;
  border-color:rgba(214,168,79,.30);
  background:rgba(214,168,79,.08);
}
.chart-ui-dot {
  width:6px;height:6px;border-radius:50%;background:#20c997;
  box-shadow:0 0 8px rgba(32,201,151,.45);
}
.chart-price-strip {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.chart-mini-price {
  font-size:12px;
  font-weight:900;
  color:#e5e7eb;
  font-variant-numeric:tabular-nums;
}
.chart-mini-change {
  font-size:9px;
  font-weight:900;
  padding:3px 6px;
  border-radius:5px;
  color:#20c997;
  background:rgba(32,201,151,.09);
}
.chart-mini-actions {
  display:flex;
  align-items:center;
  gap:5px;
}
.chart-mini-action {
  width:28px;height:27px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(148,163,184,.13);
  border-radius:7px;
  color:#7f8da3;
  background:rgba(255,255,255,.02);
}
.chart-mini-action svg { width:13px;height:13px; }
.chart-shell-toolbar{height:48px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border-bottom:1px solid rgba(148,163,184,.12);background:#0b1018}
.chart-tool-group{display:flex;align-items:center;gap:4px;min-width:0}
.chart-tool-btn{height:38px;min-width:38px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:0;border-radius:8px;color:#a9b4c4;background:transparent;font-size:10px;font-weight:800;white-space:nowrap;cursor:pointer;transition:background .15s ease,color .15s ease}
.chart-tool-btn:hover{background:rgba(148,163,184,.10);color:#f1f5f9}.chart-tool-btn.active{color:#d6a84f;background:rgba(214,168,79,.08)}.chart-tool-btn svg{width:21px;height:21px;flex:0 0 auto}.chart-tool-divider{width:1px;height:30px;background:rgba(148,163,184,.13);margin:0 4px}.chart-tool-btn:hover svg{transform:scale(1.04)}.chart-fullscreen-btn.is-active{color:#20c997;background:rgba(32,201,151,.08)}
.chart-shell:fullscreen,.chart-shell:-webkit-full-screen{width:100vw!important;height:100vh!important;margin:0!important;border-radius:0!important;border:0!important;background:#090e16!important;z-index:999999!important}
.chart-shell:fullscreen .chart-stage,.chart-shell:-webkit-full-screen .chart-stage{min-height:calc(100vh - 112px)!important;height:calc(100vh - 112px)!important}
.chart-shell:fullscreen .chart-stage #chart,.chart-shell:-webkit-full-screen .chart-stage #chart{height:100%!important;min-height:100%!important}
.chart-shell:fullscreen .chart-shell-top,.chart-shell:-webkit-full-screen .chart-shell-top{height:43px}
.chart-shell.saifx-manual-fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:999999!important;border-radius:0!important;border:0!important}.chart-shell.saifx-manual-fullscreen .chart-stage{min-height:calc(100vh - 112px)!important;height:calc(100vh - 112px)!important}.chart-shell.saifx-manual-fullscreen .chart-stage #chart{height:100%!important;min-height:100%!important}body.saifx-manual-fullscreen-body{overflow:hidden!important}
@media (max-width:700px){.chart-tool-label{display:none}.chart-tool-btn{min-width:36px;height:36px;padding:0 7px}}
.chart-stage {
  position:relative;
  min-height:430px;
  background:
    radial-gradient(circle at 72% 25%,rgba(214,168,79,.035),transparent 34%),
    #090e16;
}
.chart-stage #chart {
  position:relative;
  width:100%;
  height:430px;
  border-radius:0;
  overflow:hidden;
}
.chart-bottom-strip {
  min-height:31px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 10px;
  border-top:1px solid rgba(148,163,184,.10);
  background:#090e16;
  color:#64748b;
  font-size:8px;
  font-weight:700;
  letter-spacing:.03em;
}
.chart-bottom-strip .live {
  color:#20c997;
}
.chart-bottom-strip .source {
  color:#64748b;
}
.chart-shell .saifx-drawing-toolbar {
  left:8px !important;
  top:9px !important;
  right:auto !important;
  transform:none !important;
  width:46px !important;
  max-width:46px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:4px !important;
  padding:5px !important;
  border-radius:10px !important;
  background:rgba(13,19,29,.90) !important;
  border:1px solid rgba(148,163,184,.16) !important;
  box-shadow:0 8px 26px rgba(0,0,0,.28) !important;
}
.chart-shell .saifx-drawing-tool {
  width:36px !important;
  min-width:36px !important;
  height:36px !important;
  padding:0 !important;
  border-radius:8px !important;
}
.chart-shell .saifx-drawing-divider {
  width:28px !important;
  height:1px !important;
  margin:3px auto !important;
}
.chart-shell .saifx-drawing-tool svg { width:21px !important; height:21px !important; }
.chart-shell .saifx-drawing-hint {
  left:60px !important;
  top:10px !important;
}
.chart-shell .saifx-drawing-toolbar {
  max-height:calc(100% - 16px) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  -webkit-overflow-scrolling:touch !important;
  scrollbar-width:none !important;
  touch-action:pan-y !important;
}
.chart-shell .saifx-drawing-toolbar::-webkit-scrollbar { display:none !important; width:0 !important; height:0 !important; }


@media (max-width:900px) {
  .chart-shell-top { height:42px; padding:0 8px; }
  .chart-ui-pill.hide-mobile { display:none; }
  .chart-stage,#chart { min-height:360px !important; height:360px !important; }
  .chart-mini-action { width:25px;height:25px; }
}
@media (max-width:640px) {
  .chart-shell-top { gap:6px; }
  .chart-shell-left { overflow:hidden; }
  .chart-price-strip .chart-ui-pill { display:none; }
  .chart-mini-price { font-size:11px; }
  .chart-stage,#chart { min-height:310px !important; height:310px !important; }
  .chart-bottom-strip { font-size:7px; }
  .chart-shell .saifx-drawing-toolbar {
    left:5px !important;
    top:7px !important;
    bottom:7px !important;
    max-height:none !important;
    height:auto !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding:5px !important;
    gap:4px !important;
    touch-action:pan-y !important;
  }
  .chart-shell .saifx-drawing-tool {
    flex:0 0 36px !important;
  }
}



.chart-tool-btn{min-width:40px;height:40px!important;border-radius:9px!important;gap:6px!important}
.chart-tool-btn svg{width:22px!important;height:22px!important;stroke-width:1.9!important}
.chart-tool-label{font-size:10px!important;font-weight:800!important;letter-spacing:.02em}
.chart-shell-toolbar{min-height:50px!important;padding:5px 7px!important}
.chart-tool-group{gap:3px!important}
.chart-tool-divider{height:28px!important;margin:0 5px!important}
@media(max-width:640px){
  /* Keep the upper chart functions usable on narrow phones. The toolbar becomes
     a horizontal touch-scroll rail instead of hiding/cutting off controls. */
  .chart-shell-toolbar{
    width:100%!important;
    min-width:0!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    touch-action:pan-x!important;
    scrollbar-width:none!important;
  }
  .chart-shell-toolbar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
  .chart-shell-toolbar .chart-tool-group{
    flex:0 0 auto!important;
    min-width:max-content!important;
    width:max-content!important;
  }
  .chart-shell-toolbar .chart-tool-btn{
    flex:0 0 auto!important;
  }
  /* The instrument/header controls above the function toolbar can also be
     swiped horizontally when the phone is too narrow. */
  .chart-shell-top{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    touch-action:pan-x!important;
  }
  .chart-shell-top::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
  .chart-shell-top .chart-shell-left,
  .chart-shell-top .chart-shell-right,
  .chart-shell-top .chart-price-strip,
  .chart-shell-top .chart-mini-actions{
    flex:0 0 auto!important;
    min-width:max-content!important;
  }
}