:root{--bg:#0b0f17;--panel:#0f1626;--border:#1b2740;--ink:#e9eefb;}
body{font-family:Arial,sans-serif;background:var(--bg);color:var(--ink);margin:0;}
.top{display:flex;gap:12px;padding:14px;align-items:center;border-bottom:1px solid var(--border);}
.spacer{flex:1;}
select,button,input{background:#121a2b;color:var(--ink);border:1px solid #2a3a61;padding:10px;border-radius:10px;}
button{cursor:pointer;}
.grid{display:grid;grid-template-columns:1.5fr 1fr;gap:12px;padding:14px;}
.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;}
#chart{height:420px;}
#rsiChart{height:160px;margin-top:10px;}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.row.header{justify-content:space-between;}
.kv{display:grid;grid-template-columns:120px 1fr;gap:8px;margin:8px 0;}
.pill{display:inline-block;padding:6px 10px;border-radius:999px;border:1px solid #2a3a61;background:#121a2b;}
.warn{border:1px solid #7a2b2b;background:#241010;}
.ok{border:1px solid #2a6b3a;background:#0f2216;}
.big{font-size:18px;font-weight:700;}
.small{font-size:12px;opacity:.85;}
.muted{opacity:.8;}
.mt8{margin-top:8px;}
.mt10{margin-top:10px;}
.mt12{margin-top:12px;}
.sep{border:0;border-top:1px solid var(--border);margin:14px 0;}

.ts-control{background:#121a2b !important;border:1px solid #2a3a61 !important;color:var(--ink) !important;border-radius:10px !important;min-width:240px;}
.ts-dropdown{background:var(--panel) !important;border:1px solid #2a3a61 !important;}
.ts-dropdown .option{color:var(--ink) !important;}
.ts-dropdown .active{background:var(--border) !important;}
.ts-control input{color:var(--ink) !important;}

.modal.hidden{display:none;}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;padding:20px;}
.modalCard{width:min(720px,95vw);background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;}
/* MODAL FIX */
.modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(0,0,0,.65) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

.modal.hidden{
  display: none !important;
}

.modalCard{
  position: relative !important;
  z-index: 1000000 !important;
  width: min(720px, 95vw) !important;
  max-height: 85vh !important;
  overflow: auto !important;
  background: #0f1626 !important;
  border: 1px solid #1b2740 !important;
  border-radius: 14px !important;
  padding: 14px !important;
  box-shadow: 0 20px 80px rgba(0,0,0,.6) !important;
	
	scrollbar-width: none;
}
/* LOADING OVERLAY */
.loading{
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.loading.hidden{ display:none; }

.loadingBox{
  width: min(420px, 92vw);
  background: #0f1626;
  border: 1px solid #1b2740;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
}

.spinner{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(233,238,251,.15);
  border-top-color: rgba(233,238,251,.85);
  margin: 0 auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin{ to { transform: rotate(360deg); } }