

/* ---------- theme toggle in the profile menu ---------- */
.menu-theme{justify-content:flex-start;cursor:pointer}
.menu-theme>span:first-of-type{flex:1}
.tsw{position:relative;width:36px;height:22px;border-radius:999px;background:#cfd5e3;flex:none;transition:background-color .2s ease}
.tsw i{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #141a2a40;transition:transform .22s var(--ease)}
.menu-theme[aria-checked="true"] .tsw{background:var(--blue)}
.menu-theme[aria-checked="true"] .tsw i{transform:translateX(14px)}
.menu-theme:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;border-radius:9px}
.pop-menu .menu-theme{margin-bottom:4px;border-bottom:1px solid var(--line-2);border-radius:9px 9px 0 0;padding-bottom:12px}
@media(prefers-reduced-motion:reduce){.tsw,.tsw i{transition:none}}

/* ---------- dark theme: token overrides ---------- */
html[data-theme="dark"]{
  --blue-hover:#3d5efb;--blue-soft:#18214a;--blue-line:#2c3a7c;--blue-on:#dfe5ff;
  --ink:#e8ecf8;--ink-2:#c9d0e4;--muted:#a3acc6;--faint:#8b95b2;
  --ground:#0b1020;--card:#11182b;--line:#222c46;--line-2:#1b2440;
  --neg:#ff7b8b;--neg-soft:#3a1720;--warn:#f1b34c;--warn-soft:#33270f;
  background:#0b1020;scrollbar-color:#2a3554 transparent
}
html[data-theme="dark"] body{background:var(--ground);color:var(--ink)}
html[data-theme="dark"] ::selection{background:#284cf9;color:#fff}
:where(html[data-theme="dark"]) a{color:#9aabff}
html[data-theme="dark"] :focus-visible{outline-color:#7d93ff}

/* panels and cards whose base colour is fixed white */
html[data-theme="dark"] .app-head{background:#0c1121eb;border-bottom-color:var(--line)}
html[data-theme="dark"] .app-foot{background:var(--card);border-color:var(--line)}
html[data-theme="dark"] .pop{background:#141c31;box-shadow:0 0 0 1px #2a3554,0 16px 40px -8px #000a}
html[data-theme="dark"] .tabbar{background:#0c1121f0;border-top-color:var(--line)}
html[data-theme="dark"] .sim-bar{background:#070b17;border-bottom:1px solid var(--line)}
html[data-theme="dark"] .icon-btn{color:var(--ink)}
html[data-theme="dark"] .icon-btn .dot{box-shadow:0 0 0 2px #0c1121}
html[data-theme="dark"] .avatar{background:var(--blue);color:#fff}
html[data-theme="dark"] .app-nav a[aria-current="page"]{background:#1b2440;color:#fff}
html[data-theme="dark"] .skip-link,html[data-theme="dark"] .toast{background:#1f2943;color:#fff}



html[data-theme="dark"] .btn-ghost{color:var(--ink)}

html[data-theme="dark"] .text-btn{color:#9aabff}
@media(hover:hover) and (pointer:fine){
  
  
  html[data-theme="dark"] .btn-ghost:hover,html[data-theme="dark"] .icon-btn:hover{background:#1b2440}
  html[data-theme="dark"] .note-item:hover,html[data-theme="dark"] .menu-item:hover{background:#1b2440}
  
  html[data-theme="dark"] .buy-opt:hover{background:#161f38}
  html[data-theme="dark"] .ptbl tr:hover td{background:#141c33}
}





html[data-theme="dark"] .seg,html[data-theme="dark"] .range,html[data-theme="dark"] .tabs .count{background:#1b2440}
html[data-theme="dark"] .seg [aria-current="true"],html[data-theme="dark"] .seg [aria-selected="true"],html[data-theme="dark"] .range button[aria-pressed="true"]{background:#2a3554;color:#fff;box-shadow:none}








html[data-theme="dark"] .chart .grid line{stroke:#1b2440}



html[data-theme="dark"] .chart .cross{stroke:#e8ecf840}


/* forms */
html[data-theme="dark"] .input,html[data-theme="dark"] .select{background:#0b1020;border-color:#2a3554;color:var(--ink)}
html[data-theme="dark"] .input::placeholder{color:#6b7695}
html[data-theme="dark"] .input[readonly]{background:#141c31}
html[data-theme="dark"] .switch i,html[data-theme="dark"] .tsw{background:#2f3a5a}
html[data-theme="dark"] .menu-theme[aria-checked="true"] .tsw{background:var(--blue)}

html[data-theme="dark"] .codes code{background:#141c31}

/* login */
html[data-theme="dark"] body.auth{background:var(--ground)}
html[data-theme="dark"] .auth-main{background:var(--ground)}
html[data-theme="dark"] .otp-box{background:#0b1020;border-color:#2a3554;color:var(--ink)}
html[data-theme="dark"] .otp-box.is-filled{border-color:#4a5884}
html[data-theme="dark"] .auth-notice{background:#18214a;color:var(--ink)}

/* ---------- trade page in the light theme ---------- */
html:not([data-theme="dark"]) body.trade{
  --t-bg:#f4f6fc;--t-panel:#ffffff;--t-raise:#eef1f9;--t-line:#e2e6f2;--t-line-2:#d5dbea;
  --t-text:#141a2a;--t-muted:#5a6377;--t-faint:#6a7389;--t-link:#284cf9;--t-hover:#f6f8fd;
  --up:#0c8f61;--up-soft:#0c8f611a;--down:#d2364a;--down-soft:#d2364a17;--warn-t:#b26a00;
  --t-on-up:#ffffff;--t-on-down:#ffffff;--t-head:#ffffffeb;--t-tag-bg:#eff2ff;--t-tag-line:#cfd8ff;--t-tag-text:#1f3fd8
}
html:not([data-theme="dark"]):has(body.trade){background:#f4f6fc;scrollbar-color:#c3cbe0 transparent}

/* logo per theme */
.app-brand .logo-dark{display:none}
html[data-theme="dark"] .app-brand .logo-light{display:none}
html[data-theme="dark"] .app-brand .logo-dark{display:block}
