/* ===========================================================
   Groww H5 — Watchlist（core-pages-3）+ Portfolio（core-pages-4）
   =========================================================== */

/* ---------- 通用证券行 ---------- */
.gw-ate-list { padding: 0 var(--gw-pad); }
.gw-ate-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  text-decoration: none;
  color: inherit;
}
.gw-ate-row + .gw-ate-row { border-top: 1px solid var(--gw-line-2); }
.gw-ate-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-ate-names {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gw-ate-names strong {
  font-size: 15px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-ate-names em { font-style: normal; font-size: 12px; color: var(--gw-ink-3); }
.gw-ate-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
.gw-ate-right strong { font-size: 16px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-ate-right em { font-style: normal; font-size: 13px; font-weight: var(--gw-fw-semi); }

/* ---------- Watchlist ---------- */
.gw-watch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: var(--gw-pad);
}
.gw-watch-head .gw-page-title { padding-right: 0; }
.gw-watch-actions { display: flex; gap: 16px; }
.gw-listchips {
  display: flex;
  gap: 8px;
  padding: 0 var(--gw-pad) 4px;
  /* 窄屏下 chip 会超出容器，允许横向滑动而不是把页面撑宽 */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gw-listchips::-webkit-scrollbar { display: none; }
.gw-listchips > .gw-chip { flex: 0 0 auto; }
.gw-listchips .gw-chip.is-active {
  background: var(--gw-green-soft);
  color: var(--gw-green);
}

/* ---------- Portfolio ---------- */
.gw-portfolio { padding-bottom: 24px; }

/* 总资产卡：左 Total value，右 Today's returns */
.gw-total {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 var(--gw-pad);
  padding: 16px;
}
.gw-total-col { display: flex; flex-direction: column; gap: 8px; }
.gw-total-col > span { font-size: 13px; color: var(--gw-ink-3); }
.gw-total-col > strong {
  font-size: 26px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.5px;
}
.gw-total-right { align-items: flex-end; text-align: right; }
.gw-total-right > strong { font-size: 20px; letter-spacing: -0.3px; }

/* Allocation 卡：环形图 + 图例 */
.gw-alloc {
  margin: 12px var(--gw-pad) 0;
  padding: 16px;
}
.gw-alloc h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}
.gw-alloc-body {
  display: flex;
  align-items: center;
  gap: 20px;
}
.gw-donut {
  position: relative;
  width: 118px;
  height: 118px;
  flex: 0 0 auto;
}
.gw-donut svg { width: 100%; height: 100%; display: block; }
.gw-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}
.gw-donut-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gw-ink-3);
}

.gw-alloc-legend {
  flex: 1;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gw-alloc-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gw-ink-2);
}
.gw-alloc-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.gw-alloc-legend span { flex: 1; }
.gw-alloc-legend b { font-weight: var(--gw-fw-semi); color: var(--gw-ink); }

.gw-holdings-note { font-size: 12px; color: var(--gw-ink-3); }
