:root, [data-theme="dark"] {
  --bg:#0a0e1a; --bg2:#101728; --card:#121a2e; --border:#253050;
  --text:#e8eaf0; --muted:#97a1b5; --gold:#e3c15d; --green:#3ecf8e; --red:#f0616d;
  --input:#0d1424;
}
[data-theme="light"] {
  --bg:#f4f6fb; --bg2:#ffffff; --card:#ffffff; --border:#dde3f0;
  --text:#1a2333; --muted:#5b6679; --gold:#b8912e; --green:#0f9d63; --red:#d33a46;
  --input:#f0f3fa;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Noto Sans Arabic','Segoe UI',Tahoma,sans-serif; background:var(--bg); color:var(--text); min-height:100vh; }
.topbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:12px 18px;
  background:var(--bg2); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:10; }
.brand { font-size:24px; font-weight:800; color:var(--gold); }
.brand-word { font-size:19px; letter-spacing:5px; font-weight:800; background:linear-gradient(120deg,#f2d98c,#e3c15d 45%,#a87f22); -webkit-background-clip:text; background-clip:text; color:transparent; }
.topbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sources-chip { font-size:11px; color:var(--muted); border:1px solid var(--border); border-radius:20px; padding:4px 12px; }
.pro-chip { font-size:11px; color:var(--muted); border:1px dashed var(--border); border-radius:20px; padding:4px 12px; opacity:.65; }
.toggle-btn { background:var(--card); color:var(--gold); border:1px solid var(--border); border-radius:8px;
  padding:6px 12px; cursor:pointer; font-size:13px; font-weight:700; }
.tabs { display:flex; gap:6px; padding:12px 18px 0; }
.tab { background:none; border:none; color:var(--muted); font-size:15px; font-weight:700; padding:8px 18px;
  cursor:pointer; border-bottom:2px solid transparent; font-family:inherit; }
.tab.active { color:var(--gold); border-bottom-color:var(--gold); }
main { padding:16px 18px 60px; max-width:1400px; margin:0 auto; }
.tab-pane { display:none; } .tab-pane.active { display:block; }
.dash-controls { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { background:var(--card); border:1px solid var(--border); color:var(--muted); border-radius:20px;
  padding:6px 16px; cursor:pointer; font-size:13px; font-weight:700; }
.chip.active { color:#0a0e1a; background:var(--gold); border-color:var(--gold); }
.tf-select { background:var(--card); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-family:inherit; }
.dash-grid { display:grid; grid-template-columns:2.4fr 1fr; gap:14px; }
@media (max-width:900px) { .dash-grid { grid-template-columns:1fr; } }
.card { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:16px; }
.card h3 { color:var(--gold); font-size:16px; margin-bottom:12px; }
.ticker-row { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; }
.ticker-price { font-size:26px; font-weight:800; }
.ticker-change { font-size:13px; font-weight:700; }
.ticker-change.up { color:var(--green); } .ticker-change.down { color:var(--red); }
.ticker-symbol { font-size:14px; color:var(--muted); font-weight:700; }
.chart { width:100%; height:420px; }
.data-note { font-size:11px; color:var(--muted); margin-top:8px; }
.base-row { display:flex; gap:8px; align-items:center; margin-bottom:12px; }
.base-row label { font-size:12px; color:var(--muted); white-space:nowrap; }
input, select { background:var(--input); color:var(--text); border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; font-size:13px; font-family:inherit; width:100%; }
.base-row input { width:auto; flex:1; }
.mini-btn { background:var(--card); color:var(--gold); border:1px solid var(--gold); border-radius:8px; padding:8px 12px; cursor:pointer; font-size:12px; font-weight:700; white-space:nowrap; }
.levels-list { display:flex; flex-direction:column; gap:4px; max-height:330px; overflow-y:auto; }
.level-row { display:flex; justify-content:space-between; padding:6px 10px; border-radius:8px; font-size:13px; background:var(--bg2); }
.level-row .ang { color:var(--muted); font-size:11px; }
.level-row.res { border-right:3px solid var(--red); }
.level-row.sup { border-right:3px solid var(--green); }
.level-row.cur { border:1px solid var(--gold); font-weight:800; }
.check-row { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); margin-top:10px; }
.check-row input { width:auto; }
.calc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:14px; }
.calc-body { display:flex; flex-direction:column; gap:8px; }
.calc-body label { font-size:12px; color:var(--muted); }
.go-btn { background:var(--gold); color:#0a0e1a; border:none; border-radius:8px; padding:10px; font-size:14px; font-weight:800; cursor:pointer; font-family:inherit; }
.result { font-size:13px; }
.result table { width:100%; border-collapse:collapse; }
.result td, .result th { padding:5px 8px; border-bottom:1px solid var(--border); text-align:right; font-size:12.5px; }
.result th { color:var(--gold); }
.result .hi { color:var(--gold); font-weight:800; }
.result .up { color:var(--green); } .result .dn { color:var(--red); }
.sq144-grid { display:grid; grid-template-columns:repeat(12,1fr); gap:2px; direction:ltr; }
.sq144-cell { font-size:9px; text-align:center; padding:2px 0; background:var(--bg2); border-radius:3px; color:var(--muted); }
.sq144-cell.hit { background:var(--gold); color:#0a0e1a; font-weight:800; }
.sq144-cell.cardinal { background:#3a2f10; color:var(--gold); }
.statusbar { position:fixed; bottom:0; left:0; right:0; background:var(--bg2); border-top:1px solid var(--border);
  padding:8px 18px; font-size:11px; color:var(--muted); display:flex; gap:18px; flex-wrap:wrap; }
.statusbar b { color:var(--text); font-weight:600; }

@media (max-width:600px){ .pro-chip{ display:none; } .sources-chip{ font-size:10px; } }
html, body { overflow-x:hidden; }

.brief-card { margin-bottom:14px; }
.brief-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; }
.brief-head h3 { margin:0; }
.brief-date { font-size:12px; color:var(--muted); }
.brief-astro { font-size:12px; color:var(--muted); padding:6px 0 10px; border-bottom:1px solid var(--border); }
.brief-astro b { color:var(--gold); font-weight:700; }
.brief-symbols { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; margin-top:12px; }
.brief-sym { background:var(--bg2); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.brief-sym .nm { font-size:12px; color:var(--muted); }
.brief-sym .pr { font-size:16px; font-weight:800; margin:2px 0; }
.brief-sym .gr { font-size:12px; font-weight:800; color:var(--gold); }
.brief-sym .lv { font-size:11px; color:var(--muted); }
.scan-note { font-size:12px; color:var(--muted); margin-bottom:10px; }

.bt-controls { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.bt-controls select { width:auto; }
.bt-controls .go-btn { width:auto; padding:8px 22px; }
.bt-bars { display:flex; flex-direction:column; gap:10px; margin:14px 0; }
.bt-bar-row { display:grid; grid-template-columns:110px 1fr 70px; align-items:center; gap:10px; font-size:13px; }
.bt-bar { height:18px; border-radius:5px; min-width:2px; }
.bt-disclaimer { font-size:11px; color:var(--muted); margin-top:10px; border-top:1px solid var(--border); padding-top:8px; }

/* Welcome / profile modal */
.modal-backdrop { position:fixed; inset:0; background:rgba(4,6,12,.72); display:flex; align-items:center; justify-content:center; z-index:60; padding:16px; }
.modal-card { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:26px 24px; max-width:380px; width:100%; text-align:center; box-shadow:0 14px 44px rgba(0,0,0,.45); }
.modal-card h3 { color:var(--gold); font-size:19px; margin:0 0 8px; }
.modal-card p { color:var(--muted); font-size:13px; margin:0 0 16px; line-height:1.7; }
.modal-card input { width:100%; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text); padding:11px 12px; font-size:15px; font-family:inherit; margin-bottom:14px; text-align:center; box-sizing:border-box; }
.modal-card input:focus { outline:none; border-color:var(--gold); }
.modal-actions { display:flex; gap:10px; justify-content:center; }
.modal-actions .go-btn { min-width:130px; }
.modal-err { color:var(--red); font-size:12px; min-height:16px; margin-bottom:12px; }

/* Support section */
.support-head h3{margin:0 0 6px}
.support-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:14px}
.support-card{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.sup-coin-head{display:flex;align-items:center;gap:10px}
.sup-coin-head h4{margin:0;font-size:17px}
.sup-badge{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700}
.sup-badge.usdt{background:rgba(38,161,123,.15);color:#26a17b}
.sup-badge.btc{background:rgba(247,147,26,.15);color:#f7931a}
.sup-net{font-size:12px;opacity:.7}
.sup-qr{background:#fff;border-radius:12px;padding:10px;width:190px;height:190px;display:flex;align-items:center;justify-content:center;flex:none}
.sup-qr svg{width:170px;height:170px}
.sup-qr-empty{background:rgba(128,128,128,.10);border:1px dashed rgba(128,128,128,.4)}
.sup-soon{opacity:.6;font-size:13px;padding:0 12px}
.sup-addr{font-family:ui-monospace,monospace;font-size:12.5px;word-break:break-all;background:rgba(128,128,128,.15);padding:8px 10px;border-radius:8px;max-width:100%}
.sup-copy[disabled]{opacity:.45;cursor:not-allowed}
