/* ===========================================================
   Groww H5 — Price Alerts / Personal Loan / LAS / Profile
   （参考图 alerts-credit-profile-1/2/3/4）
   =========================================================== */

/* ---------- Price Alerts ---------- */
.gw-alerts { padding-bottom: calc(var(--gw-tabbar-h) + 20px); }
.gw-alert-switch { padding-top: 8px; }

.gw-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px var(--gw-pad) 0;
}
.gw-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
}
.gw-alert-logo { width: 34px; flex: 0 0 auto; }
.gw-alert-logo svg { width: 100%; height: auto; display: block; }
.gw-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.gw-alert-body strong { font-size: 15px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-alert-cond { font-size: 12.5px; color: var(--gw-ink-2); }
.gw-alert-last { font-size: 11.5px; color: var(--gw-ink-3); }
.gw-alert-last b { font-weight: var(--gw-fw-semi); color: var(--gw-ink-2); }
.gw-alert-last em { font-style: normal; font-weight: var(--gw-fw-semi); margin-left: 2px; }

.gw-alert-side { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 0 auto; }

/* 开关：纯 CSS 小胶囊 */
.gw-switch {
  width: 42px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #d6dbe2;
  position: relative;
  transition: background .16s;
}
.gw-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s;
}
.gw-switch.is-on { background: var(--gw-green); }
.gw-switch.is-on i { transform: translateX(18px); }

.gw-alert-more {
  padding: 0;
  border: none;
  background: none;
  font-size: 17px;
  line-height: 1;
  color: var(--gw-ink-3);
}

/* 中间插图 + 文案 */
.gw-alert-hero { padding: 22px var(--gw-pad) 0; text-align: center; }
.gw-alert-art { width: 180px; max-width: 58%; margin: 0 auto 12px; }
.gw-alert-art svg { width: 100%; height: auto; display: block; }
.gw-alert-hero h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}
.gw-alert-hero p { margin: 0 auto; max-width: 300px; font-size: 12.5px; line-height: 1.5; color: var(--gw-ink-3); }

.gw-alert-cta { padding: 18px var(--gw-pad) 0; }
.gw-alert-add {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 9px;
  background: var(--gw-green);
  color: #fff;
  font-size: 15px;
  font-weight: var(--gw-fw-semi);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ---------- Personal Loan ---------- */
.gw-loan { padding-bottom: calc(var(--gw-tabbar-h) + 20px); }
.gw-loan-title { flex: 1; font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); text-align: left; }

.gw-loan-hero {
  margin: 8px var(--gw-pad) 0;
  padding: 16px;
  border-radius: var(--gw-r-lg);
  background: linear-gradient(135deg, #e9f7f1 0%, #eef4fe 100%);
}
.gw-loan-hero-text h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.3px;
}
.gw-loan-hero-text p { margin: 0; font-size: 12.5px; color: var(--gw-ink-2); }
.gw-loan-hero-art { width: 104px; margin: 6px 0 0 auto; }
.gw-loan-hero-art svg { width: 100%; height: auto; display: block; }

.gw-loan-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, .06);
}
.gw-loan-facts > div { display: flex; flex-direction: column; gap: 5px; }
.gw-loan-facts > div + div { border-left: 1px solid rgba(0, 0, 0, .06); padding-left: 12px; }
.gw-loan-facts span { font-size: 11px; color: var(--gw-ink-3); }
.gw-loan-facts b { font-size: 15px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); line-height: 1.25; }

.gw-loan-h2 {
  margin: 20px var(--gw-pad) 0;
  font-size: 16.5px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}

/* 三步流程：图标圆 + 虚线连接 */
.gw-loan-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 14px 0 0;
  padding: 0 var(--gw-pad);
  list-style: none;
}
.gw-loan-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.gw-loan-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 21px;
  left: 64%;
  width: 64%;
  border-top: 1.5px dashed #c9d2dc;
}
.gw-loan-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gw-green-soft);
  color: var(--gw-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-loan-step-icon .gw-icon { width: 21px; height: 21px; }
.gw-loan-steps em {
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--gw-ink-2);
  padding: 0 4px;
}

.gw-loan-calc {
  margin: 18px var(--gw-pad) 0;
  padding: 16px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
}
.gw-loan-calc header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gw-loan-calc h2 { margin: 0; font-size: 15.5px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }

.gw-loan-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.gw-loan-field > span { font-size: 12.5px; color: var(--gw-ink-2); }
.gw-loan-field > b { font-size: 16px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }

.gw-loan-range {
  width: 100%;
  height: 26px;
  margin: 6px 0 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}
.gw-loan-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gw-green) 0, var(--gw-green) var(--gw-fill), #e4e7ec var(--gw-fill), #e4e7ec 100%);
}
.gw-loan-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  border: 3px solid var(--gw-green);
  background: #fff;
}

.gw-loan-select {
  padding: 6px 10px;
  border: 1px solid var(--gw-line);
  border-radius: 8px;
}
.gw-loan-select select { border: none; background: none; font-size: 13px; color: var(--gw-ink); appearance: none; }

.gw-loan-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--gw-r-md);
  background: #f5f7f9;
}
.gw-loan-result > div { display: flex; flex-direction: column; gap: 5px; }
.gw-loan-result > div + div { border-left: 1px solid #e2e7ec; padding-left: 14px; }
.gw-loan-result span { font-size: 11px; color: var(--gw-ink-3); }
.gw-loan-result b { font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }

.gw-loan-cta { padding: 16px var(--gw-pad) 0; }
.gw-loan-check {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 9px;
  background: var(--gw-green);
  color: #fff;
  font-size: 15px;
  font-weight: var(--gw-fw-semi);
}

/* ---------- LAS ---------- */
.gw-las { padding-bottom: calc(var(--gw-tabbar-h) + 20px); }
.gw-las-title { flex: 1; font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); text-align: left; }

.gw-las-hero {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px var(--gw-pad) 0;
  padding: 16px;
  border-radius: var(--gw-r-lg);
  background: linear-gradient(135deg, #e9f7f1 0%, #eef4fe 100%);
}
.gw-las-hero-text { flex: 1; min-width: 0; }
.gw-las-hero-text h1 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  line-height: 1.25;
  letter-spacing: -0.3px;
}
.gw-las-hero-text p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--gw-ink-2); }
.gw-las-hero-art { width: 108px; flex: 0 0 auto; margin-top: 4px; }
.gw-las-hero-art svg { width: 100%; height: auto; display: block; }

.gw-las-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 12px var(--gw-pad) 0;
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
}
.gw-las-facts > div { display: flex; flex-direction: column; gap: 6px; }
.gw-las-facts > div + div { border-left: 1px solid var(--gw-line); padding-left: 14px; }
.gw-las-facts span { font-size: 11.5px; color: var(--gw-ink-3); }
.gw-las-facts b { font-size: 19px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); letter-spacing: -0.3px; }

.gw-las-h2 {
  margin: 18px var(--gw-pad) 0;
  font-size: 16px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}

.gw-las-opts { display: flex; flex-direction: column; gap: 10px; padding: 10px var(--gw-pad) 0; }
.gw-las-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  background: #fff;
  text-align: left;
}
.gw-las-opt.is-on { border-color: var(--gw-green); }
.gw-las-radio {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.8px solid #c9d2dc;
  position: relative;
}
.gw-las-opt.is-on .gw-las-radio { border-color: var(--gw-green); }
.gw-las-opt.is-on .gw-las-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gw-green);
}
.gw-las-opt-icon { color: var(--gw-blue); display: flex; }
.gw-las-opt-icon .gw-icon { width: 22px; height: 22px; }
.gw-las-opt-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw-las-opt-text strong { font-size: 14px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-las-opt-text em { font-style: normal; font-size: 11.5px; color: var(--gw-ink-3); }

.gw-las-benefits {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 var(--gw-pad);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gw-las-benefits li { display: flex; align-items: center; gap: 12px; }
.gw-las-benefit-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gw-green-soft);
  color: var(--gw-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-las-benefit-icon .gw-icon { width: 17px; height: 17px; }
.gw-las-benefit-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw-las-benefit-text strong { font-size: 13.5px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-las-benefit-text em { font-style: normal; font-size: 11.5px; color: var(--gw-ink-3); }

.gw-las-cta { padding: 20px var(--gw-pad) 0; }
.gw-las-continue {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 9px;
  background: var(--gw-green);
  color: #fff;
  font-size: 15px;
  font-weight: var(--gw-fw-semi);
}

/* ---------- Profile ---------- */
.gw-profile { padding-bottom: calc(var(--gw-tabbar-h) + 20px); }

.gw-prof-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin: 10px var(--gw-pad) 0;
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  text-decoration: none;
  color: inherit;
}
.gw-prof-avatar { width: 52px; flex: 0 0 auto; }
.gw-prof-avatar svg { width: 100%; height: auto; display: block; border-radius: 50%; }
.gw-prof-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gw-prof-user-text strong { font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-prof-user-text em { font-style: normal; font-size: 12.5px; color: var(--gw-ink-3); overflow: hidden; text-overflow: ellipsis; }

/* <nav> 在旧外壳里被设成 position:fixed; bottom:0; left:50%; translateX(-215px)，
   这里必须显式复位，否则整组会跑到视口底部叠成一条。 */
.gw-prof-group {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  max-width: none;
  display: flex;
  flex-direction: column;
  /* 旧外壳给 nav 固定了 72px 高度，这里连同 flex 一起复位，
     否则 7 行会被裁成一条 */
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  margin: 12px var(--gw-pad) 0;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
}
.gw-prof-group.gw-prof-single { margin-top: 10px; }

/* button/a 会被旧外壳的全局规则收成小尺寸，这里统一复位成整行 */
.gw-prof-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 1 0 auto;
  height: auto;
  padding: 13px 14px;
  border: none;
  border-bottom: 1px solid var(--gw-line-2);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  justify-content: flex-start;
  margin: 0;
}
.gw-prof-group > .gw-prof-row:last-child { border-bottom: none; }

.gw-prof-icon { color: var(--gw-ink-2); display: flex; flex: 0 0 auto; }
.gw-prof-icon .gw-icon { width: 21px; height: 21px; }
.gw-prof-icon-red { color: #e0453b; }

.gw-prof-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gw-prof-text strong { font-size: 14px; font-weight: var(--gw-fw-semi); color: var(--gw-ink); }
.gw-prof-text em { font-style: normal; font-size: 11px; line-height: 1.4; color: var(--gw-ink-3); }

.gw-prof-logout .gw-prof-text strong { color: #e0453b; }
/* Logout 行没有副标题，箭头要留在同一行居中，不能换行掉下去 */
.gw-prof-logout { flex-wrap: nowrap; }
.gw-prof-logout .gw-prof-text { flex: 1 1 auto; }
.gw-prof-row .gw-news-chevron { flex: 0 0 auto; }

/* ---------- Account balance ---------- */
.gw-wallet { padding-bottom: calc(var(--gw-tabbar-h) + 24px); }
.gw-wallet-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
  border-bottom: 1px solid var(--gw-line);
}
.gw-wallet-head > strong {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  color: var(--gw-ink);
}
.gw-wallet-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px var(--gw-pad) 12px;
}
.gw-wallet-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--gw-blue);
  background: var(--gw-blue-soft);
}
.gw-wallet-avatar .gw-icon { width: 24px; height: 24px; }
.gw-wallet-identity h1 {
  margin: 0;
  font-size: 19px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}
.gw-wallet-identity p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--gw-ink-3);
}
.gw-wallet-balance-card,
.gw-wallet-breakdown {
  margin: 10px var(--gw-pad) 0;
  padding: 18px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  background: var(--gw-white);
}
.gw-wallet-balance-card > span {
  display: block;
  color: var(--gw-ink-3);
  font-size: 12px;
}
.gw-wallet-balance-card > strong {
  display: block;
  margin-top: 8px;
  color: var(--gw-ink);
  font-size: 28px;
  font-weight: var(--gw-fw-bold);
  font-variant-numeric: tabular-nums;
}
.gw-wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.gw-wallet-actions a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gw-green);
  border-radius: 8px;
  color: var(--gw-green);
  text-decoration: none;
  font-size: 13px;
  font-weight: var(--gw-fw-semi);
}
.gw-wallet-actions a:first-child { color: #fff; background: var(--gw-green); }
.gw-wallet-breakdown h2 {
  margin: 0 0 16px;
  color: var(--gw-ink);
  font-size: 16px;
}
.gw-wallet-breakdown dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 20px;
  margin: 0;
}
.gw-wallet-metric { min-width: 0; }
.gw-wallet-metric dt {
  overflow: hidden;
  color: var(--gw-ink-3);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-wallet-metric dd {
  margin: 6px 0 0;
  color: var(--gw-ink);
  font-size: 14px;
  font-weight: var(--gw-fw-semi);
  font-variant-numeric: tabular-nums;
}
.gw-wallet-metric.is-positive dd { color: var(--gw-green); }
.gw-wallet-metric.is-negative dd { color: var(--gw-red); }
.gw-wallet-links {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  max-width: none;
  height: auto;
  display: flex;
  flex-direction: column;
  margin: 12px var(--gw-pad) 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  background: var(--gw-white);
}
.gw-wallet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--gw-line-2);
  color: inherit;
  text-decoration: none;
}
.gw-wallet-link:last-child { border-bottom: 0; }
.gw-wallet-link-icon { display: flex; color: var(--gw-ink-2); }
.gw-wallet-link-icon .gw-icon { width: 20px; height: 20px; }
.gw-wallet-link > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gw-wallet-link strong { color: var(--gw-ink); font-size: 13.5px; }
.gw-wallet-link em {
  overflow: hidden;
  color: var(--gw-ink-3);
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-wallet-logout,
.gw-wallet-login {
  width: calc(100% - 2 * var(--gw-pad));
  min-height: 44px;
  margin: 12px var(--gw-pad) 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  background: #fff;
  color: #df453b;
  text-decoration: none;
  font-size: 13px;
  font-weight: var(--gw-fw-semi);
}
.gw-wallet-login { color: var(--gw-green); }
