
:root{
  --bg:#efeff2;
  --text:#141414;
  --muted:#6b6f7a;

  --card:#ffffff;
  --border:rgba(0,0,0,.08);
  --shadow:0 10px 25px rgba(0,0,0,.10);
  --grid:rgba(0,0,0,.10);

  --sidebar:#cbb9ff;               
  --sidebar-ink:#ffffff;

  --accent:#6c63ff;
  --accent-2:#8c84ff;

  --alert-bg:rgba(108,99,255,.12);
  --alert-border:rgba(108,99,255,.50);
  --alert-ink:#4f49d9;

  --good:#19c37d;
  --bad:#ff4d4d;

  --app-scale: 1;
}

html[data-theme="dark"]{
  --bg:#1b1b1c;
  --text:#f2f2f4;
  --muted:#b2b4bf;

  --card:#2a2a2b;
  --border:rgba(255,255,255,.10);
  --shadow:0 12px 26px rgba(0,0,0,.45);
  --grid:rgba(255,255,255,.08);

  --sidebar:#2d2554;          
  --sidebar-ink:#ffffff;

  --accent:#7b73ff;
  --accent-2:#a59fff;

  --alert-bg:rgba(165,159,255,.18);
  --alert-border:rgba(165,159,255,.50);
  --alert-ink:#d9d6ff;

  --good:#3ee29a;
  --bad:#ff6b6b;
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
  margin:0;
  overflow:hidden;             
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.viewport{
  width:100vw;
  height:100vh;
  display:grid;
  place-items:center;
  background: var(--bg);
}

.app{
  width:1920px;
  height:1080px;
  display:grid;
  grid-template-columns: 300px 1fr;
  overflow:hidden;

  transform: scale(var(--app-scale, 1));
  transform-origin: center;
}


.svg{ width:20px; height:20px; display:block; }

.nav-ico svg,
.search-btn svg,
.icon-btn svg,
.brand-logo svg,
.check-ico svg{
  width:18px !important;
  height:18px !important;
  display:block !important;
}

.brand-logo svg{ width:34px !important; height:34px !important; }

.nav-ico svg *,
.search-btn svg *,
.icon-btn svg *,
.brand-logo svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}


.sidebar{
  background: var(--sidebar);
  padding: 18px 16px;
  display:flex;
  flex-direction:column;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  padding: 10px 10px 18px;
}

.brand-logo{
  width:54px;
  height:54px;
  border-radius:14px;
  background: rgba(255,255,255,0.18);
  display:grid;
  place-items:center;
  color: var(--sidebar-ink);  
}

.brand-text .brand-name,
.brand-text .brand-sub{
  color: var(--sidebar-ink);
  font-weight:900;
  letter-spacing:0.4px;
}
.brand-sub{ font-weight:800; }

.nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 14px 14px;
  border-radius: 16px;
  text-decoration:none;
  font-weight:700;
  background: rgba(255,255,255,0.10);
  color: var(--sidebar-ink);
}

.nav-item:hover{ background: rgba(255,255,255,0.14); }
.nav-item.active{ background: rgba(255,255,255,0.22); }

.nav-ico{
  width:22px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  color: var(--sidebar-ink);
}

.nav-spacer{ flex:1; }


.main{
  padding: 16px 28px 20px;  
  overflow:hidden;
}


.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin: 0 0 10px;       
}

.search{
  flex:1;
  max-width: 1120px;
  display:flex;
  align-items:center;
  border-radius: 18px;
  background: rgba(0,0,0,0.08);
  overflow:hidden;
}
html[data-theme="dark"] .search{ background: rgba(255,255,255,0.08); }

.search input{
  flex:1;
  border:0;
  outline:none;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  font-size:14px;
}

.search-btn{
  border:0;
  background: transparent;
  padding: 0 14px;
  cursor:pointer;
  color: var(--muted);
  display:grid;
  place-items:center;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.icon-btn{
  width:40px;
  height:40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor:pointer;
  display:grid;
  place-items:center;
  color: var(--accent);
}

.logout{
  color: var(--accent);
  text-decoration:none;
  font-weight:800;
}

.mode-toggle{
  border: 1px solid rgba(108,99,255,.55);
  background: rgba(108,99,255,.15);
  border-radius: 18px;
  padding: 10px 14px;
  cursor:pointer;
  color: var(--accent);
  font-weight:900;
}

.title-row{
  display:flex;
  align-items:center;
  gap:16px;
  margin: 6px 0 14px; 
}

.page-title{
  margin:0;
  font-size: 44px;
  font-weight: 900;
}

.inline-alert{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  color: var(--alert-ink);
  min-width: 560px;
  justify-content:center;
}

.check-ico{
  width:22px;
  height:22px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background: rgba(108,99,255,.20);
  color: var(--accent);
}


.grid{
  display:grid;
  grid-template-columns: 1.35fr 0.65fr;
  grid-template-areas:
    "topcards topcards"
    "big      watch"
    "holdings invest";
  gap: 18px;
  align-content:start;
}


.top-cards{
  grid-area: topcards;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.top-cards .card{ height: 110px; }


.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}


.big{ grid-area: big; }
.watch{ grid-area: watch; }
.holdings{ grid-area: holdings; align-self:start; }
.invest{ grid-area: invest; align-self:start; }

.label{ font-size: 13px; color: var(--muted); font-weight: 800; }
.value{ font-size: 40px; font-weight: 900; margin: 8px 0 2px; }
.muted{ color: var(--muted); font-size: 13px; }
.gain{ color: var(--good); font-weight: 900; font-size: 13px; }
.loss{ color: var(--bad); font-weight: 900; font-size: 13px; }

.mini-rows{ margin-top: 12px; display:grid; gap: 10px; }
.mini-row{ display:flex; justify-content:space-between; align-items:center; font-size: 14px; }


.big-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
}

.big-title{ font-size: 18px; font-weight: 900; margin-bottom: 6px; }

.big-value{
  font-size: 56px;
  font-weight: 900;
  display:flex;
  align-items:center;
  gap: 10px;
}

.small-pill{
  font-size: 13px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.05);
}
html[data-theme="dark"] .small-pill{ background: rgba(255,255,255,0.06); }

.big-metrics{ display:flex; gap: 18px; }
.metric{ text-align:right; }
.metric-label{ font-size: 13px; color: var(--muted); font-weight: 800; }
.metric-value{ font-size: 18px; font-weight: 900; }

.chart-wrap{
  margin-top: 10px;
  height: 340px;
}


.watch-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 10px;
}

.link-btn{
  border:0;
  background:transparent;
  color: var(--muted);
  font-weight: 900;
  cursor:pointer;
}

.watchlist{
  list-style:none;
  padding:0;
  margin:0;
  max-height: 420px;
  overflow-y:auto;
  overflow-x:hidden;
}

.watch-item{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ticker{ font-weight: 900; font-size: 14px; }
.name{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.right{ text-align:right; }
.price{ font-weight: 900; }


.holdings{ min-height: 190px; }
.invest{ min-height: 190px; }


.holdings-row{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.holding{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(0,0,0,0.03);
}
html[data-theme="dark"] .holding{ background: rgba(255,255,255,0.04); }

.split{
  display:flex;
  justify-content:space-between;
  font-size: 13px;
  margin-top: 10px;
  color: var(--muted);
}
.split span:last-child{ color: var(--text); font-weight: 900; }


.bar-labels{
  display:flex;
  gap: 12px;
  margin: 12px 0 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap:wrap;
}

.stack{
  height: 28px;
  border-radius: 999px;
  overflow:hidden;
  border: 1px solid var(--border);
  display:flex;
}

.seg{ height:100%; }
.mm{ background: var(--accent); }
.st{ background: rgba(108,99,255,.75); }
.bd{ background: rgba(108,99,255,.45); }
.ot{ background: rgba(108,99,255,.25); }

.stack-foot{
  display:flex;
  justify-content:space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}


.watchlist::-webkit-scrollbar{ width:10px; }
.watchlist::-webkit-scrollbar-thumb{
  background: rgba(108,99,255,.35);
  border-radius: 999px;
}


.pgrid{
  display:grid;
  grid-template-columns: 1.35fr 0.65fr;
  grid-template-areas:
    "perf rightcol"
    "tx   tx";
  gap: 18px;
  align-content: start;
}

.perf{ grid-area: perf; }
.rightcol{ grid-area: rightcol; display:grid; gap:18px; align-content:start; }
.tx{ grid-area: tx; }


.perf-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:12px;
}

.perf-metrics{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

.perf-chart{
  height: 320px;
  margin-top: 4px;
}

.perf-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top: 12px;
}

.range-pills{
  display:flex;
  gap:10px;
}

.pill{
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.05);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 900;
  cursor:pointer;
}
html[data-theme="dark"] .pill{ background: rgba(255,255,255,0.06); }

.pill.active{
  background: rgba(108,99,255,.18);
  border-color: rgba(108,99,255,.55);
  color: var(--accent);
}

.account-btn{
  width:100%;
  margin-top:10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 900;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
}
.account-caret{ opacity: .9; }


.alloc-row{
  display:flex;
  gap:16px;
  align-items:center;
  margin-top:12px;
}

.donut{
  width:120px;
  height:120px;
}

.alloc-legend{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
  color: var(--muted);
  font-weight: 800;
}

.dot{
  width:10px;height:10px;border-radius:999px;
  display:inline-block;margin-right:10px;
  background: var(--accent);
}
.dot.goog{ background: rgba(108,99,255,.85); }
.dot.amzn{ background: rgba(108,99,255,.65); }
.dot.meta{ background: rgba(108,99,255,.45); }
.dot.msft{ background: rgba(108,99,255,.25); }


.tx-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.tx-table-wrap{
  max-height: 200px;
  overflow:auto;
  border-radius: 12px;
}

.tx-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.tx-table th,
.tx-table td{
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align:left;
  color: var(--text);
}

.tx-table th{
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  font-weight: 900;
  color: var(--muted);
}

.tx-table-wrap::-webkit-scrollbar{ width:10px; height:10px; }
.tx-table-wrap::-webkit-scrollbar-thumb{
  background: rgba(108,99,255,.35);
  border-radius: 999px;
}


.sgrid{
  display:grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  grid-template-areas:
    "company quotes news"
    "chart   chart  chart";
  gap:18px;
  align-content:start;
}

.s-company{ grid-area: company; }
.s-quotes{ grid-area: quotes; }
.s-news{ grid-area: news; }
.s-chart{ grid-area: chart; }

.s-company-top{ display:flex; gap:14px; align-items:flex-start; }
.s-logo{
  width:58px; height:58px; border-radius:18px;
  background: rgba(0,0,0,.06);
  display:grid; place-items:center;
  color: var(--text);
}
html[data-theme="dark"] .s-logo{ background: rgba(255,255,255,.06); }

.s-name{ font-size:26px; font-weight:900; margin-top:2px; }
.s-sub{ font-weight:900; letter-spacing:.3px; }
.s-sub2{ margin-top:6px; color: var(--muted); font-size:13px; font-weight:800; }
.s-after{ margin-top:2px; font-weight:900; }

.s-quotes .s-quote-row{ display:flex; align-items:baseline; gap:10px; }
.s-price{ font-size:30px; font-weight:900; }
.s-arrow{ font-weight:900; margin-left:auto; }
.s-note{ margin-top:6px; }
.s-divider{ height:1px; background: var(--border); margin:14px 0; }

.s-news-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.s-news-tabs{ display:flex; gap:14px; font-weight:900; }
.s-tab{ color: var(--muted); font-size:14px; }
.s-tab-active{ color: var(--text); }
.s-news-search{ border:0; background:transparent; color: var(--muted); cursor:pointer; }

.s-news-list{ margin-top:12px; display:grid; gap:12px; max-height:160px; overflow:auto; }
.s-article{ display:flex; gap:12px; align-items:center; }
.s-thumb{
  width:64px; height:46px; border-radius:10px;
  background: rgba(0,0,0,.10);
}
html[data-theme="dark"] .s-thumb{ background: rgba(255,255,255,.10); }
.s-a-title{ font-weight:900; font-size:13px; line-height:1.15; }
.s-a-src{ font-size:12px; margin-top:4px; }

.s-chart-top{ display:flex; justify-content:flex-start; align-items:center; margin-bottom:10px; }
.s-timeframe{ display:flex; align-items:center; gap:16px; }
.s-tf-label{ font-weight:900; color: var(--muted); }
.s-tf-pills{ display:flex; gap:10px; }

.s-chart-body{ display:grid; grid-template-columns: 1fr 360px; gap:18px; align-items:stretch; }
.s-chart-canvas{ height:420px; }
.s-chart-canvas canvas{ width:100% !important; height:100% !important; }

.s-stats{ display:flex; flex-direction:column; gap:12px; }
.s-stat{ display:flex; justify-content:space-between; font-weight:900; }
.s-stat-range{ display:block; }
.s-range-top{ display:flex; justify-content:space-between; font-weight:900; margin-bottom:8px; }
.s-range-bar{
  height:8px; border-radius:999px;
  background: rgba(108,99,255,.25);
  border: 1px solid var(--border);
}
html[data-theme="dark"] .s-range-bar{ background: rgba(165,159,255,.22); }

.s-updated{ margin-top:6px; }

.s-actions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
.btn{
  border:1px solid rgba(108,99,255,.55);
  background: rgba(108,99,255,.15);
  color: var(--accent);
  border-radius:12px;
  padding:12px 14px;
  font-weight:900;
  cursor:pointer;
}
.btn.buy{ background: rgba(108,99,255,.85); border-color: rgba(108,99,255,.85); color:#fff; }
.btn.sell{ background: rgba(108,99,255,.20); }

button svg,
.icon-btn svg,
.search-btn svg,
.s-news-search svg{
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

button svg *{
  vector-effect: non-scaling-stroke;
}


.sgrid{
  gap: 18px !important;
}


.s-company,
.s-quotes,
.s-news{
  min-height: 190px;         
  align-self: start;         
}

.s-news-list{
  max-height: 140px !important;
  overflow: auto !important;
}


.s-chart{
  margin-top: 0 !important;
}

.stock-alert-row{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin: 0 0 12px;    
}



.alerts-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin: 6px 0 18px;
}

.last-updated{
  font-size:13px;
  color: var(--muted);
  font-weight:800;
}

.alerts-card{
  padding: 22px 24px;
  height: 520px;
  display:flex;
  flex-direction:column;
}

.alerts-header{
  margin-bottom: 12px;
}

.alerts-table-wrap{
  flex:1;
  overflow:auto;
  border-radius:12px;
}

.alerts-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.alerts-table th,
.alerts-table td{
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  text-align:left;
}

.alerts-table th{
  font-weight:900;
  color: var(--muted);
  position: sticky;
  top:0;
  background: var(--card);
  z-index:2;
}

.alerts-table tbody tr:hover{
  background: rgba(108,99,255,.08);
}

.alerts-table input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color: var(--accent);
}


.settings-title{
  margin: 6px 0 14px;
}

.set-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-areas:
    "profile security"
    "notify  notify";
  gap: 18px;
  align-content:start;
}

.set-profile{ grid-area: profile; }
.set-security{ grid-area: security; }
.set-notify{ grid-area: notify; }

.profile-form{
  margin-top: 10px;
}

.form-row{
  display:grid;
  grid-template-columns: 130px 1fr;
  align-items:center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.form-row label{
  font-weight: 900;
  color: var(--text);
}

.profile-form input,
.profile-form textarea{
  width: 100%;
  border: 1px solid rgba(108,99,255,.45);
  background: rgba(108,99,255,.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  outline:none;
  font-weight: 700;
}

html[data-theme="dark"] .profile-form input,
html[data-theme="dark"] .profile-form textarea{
  background: rgba(165,159,255,.10);
  border-color: rgba(165,159,255,.45);
}

.form-actions{
  display:flex;
  justify-content:flex-end;
  margin-top: 14px;
}

.btn-primary{
  border: 0;
  background: rgba(108,99,255,.90);
  color: #fff;
  font-weight: 900;
  padding: 12px 16px;
  border-radius: 10px;
  cursor:pointer;
  min-width: 140px;
  box-shadow: var(--shadow);
}

.btn-secondary{
  border: 0;
  background: rgba(108,99,255,.90);
  color:#fff;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 10px;
  cursor:pointer;
  min-width: 110px;
  box-shadow: var(--shadow);
}


.sec-list{
  margin-top: 14px;
  display:grid;
  gap: 14px;
}

.sec-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.sec-label{
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.set-notify{
  padding: 24px;
}

.notify-item{
  padding: 12px 0;
}

.checkline{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
}

.checktitle{
  color: var(--text);
}

.set-notify input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color: var(--accent);
}


