/* 会员首页沿用原生数据块、权限和事件，只调整卡片排版。 */
.tly-member-home {
  --tly-home-ink: #17233d;
  --tly-home-blue: #3478f6;
  --tly-home-muted: #68758f;
  --tly-home-line: #e8ecf3;
  --tly-home-page: #f4f6fb;
  --tly-home-gap: 18px;
  min-width: 0;
  padding: 18px 20px 38px !important;
  background: var(--tly-home-page);
  color: var(--tly-home-ink);
}

html[data-tly-member] .tly-member-home > .main-card,
.tly-member-home > .main-card {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tly-member-home .main-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "account finance spending" "products products reminders";
  gap: var(--tly-home-gap);
  min-width: 0;
  padding-bottom: 0;
  background: transparent;
}

.tly-member-home .left-box { display: contents; }
.tly-member-home .info-box { grid-area: account; }
.tly-member-home .statistics-box { grid-area: finance; }
.tly-member-home .statistics-bottom { grid-area: spending; }
.tly-member-home .product-list-box { grid-area: products; }
.tly-member-home .right-box { grid-area: reminders; }

.tly-member-home :is(.info-box, .statistics-box, .statistics-bottom, .product-list-box, .right-box),
.tly-home-shortcuts > section {
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--tly-home-line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(31 45 78 / 3%);
}

.tly-home-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 100%;
  gap: 10px;
  min-width: 0;
  min-height: 26px;
  margin: 0 0 14px;
}

.tly-home-heading h2,
.tly-member-home .product-list-box > .title-text {
  min-width: 0;
  margin: 0;
  border-inline-start: 3px solid var(--tly-home-blue);
  padding-inline-start: 10px;
  color: var(--tly-home-muted);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.tly-home-heading a {
  color: var(--tly-home-blue);
  font-size: 13px;
  text-align: end;
}

.tly-member-home .info-box {
  align-content: start;
  align-items: start;
  flex-flow: column nowrap;
  justify-content: flex-start;
  gap: 10px;
}
.tly-member-home .info-box .tly-home-heading { width: 100%; flex-basis: auto; margin-bottom: 0; }
.tly-member-home .info-box :is(.info-first, .info-second, .info-three) { max-width: 100%; min-width: 0; }
.tly-member-home .info-box .divider-box { display: none; }
.tly-member-home .info-box .info-second { gap: 6px; }
.tly-member-home .name-first { border-radius: 8px; }
.tly-member-home .hello { color: var(--tly-home-ink); font-weight: 600; }
.tly-member-home :is(.phone-number, .company-name, .certify-id) { overflow-wrap: anywhere; }

.tly-member-home .statistics-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  min-width: 0;
}
.tly-member-home .money-box { width: auto; min-width: 0; margin: 0; }
.tly-member-home .money-top { gap: 8px; flex-wrap: wrap; }
.tly-member-home .money-top .money-credit {
  min-width: min(100%, 120px);
  border: 1px solid #e3ecfc;
  border-radius: 4px;
  background: #f2f7ff;
}
.tly-member-home .money-top .money-credit .credit-title { flex-wrap: wrap; gap: 4px; }
.tly-member-home .order-box { display: flex; flex-wrap: wrap; gap: 7px; width: auto; min-width: 0; }
.tly-member-home .order-box .order-item {
  flex: 1 1 27%;
  min-width: 0;
  margin: 0;
  border-radius: 4px;
}
.tly-member-home .order-box .order-title { white-space: normal; overflow-wrap: anywhere; }

.tly-member-home .statistics-bottom {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}
.tly-member-home .statistics-bottom .tly-home-heading { flex-basis: auto; margin-bottom: 0; }
.tly-member-home .statistics-bottom .statistics-item {
  width: auto;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e9effa;
  border-radius: 4px;
  background: #f7faff;
}
.tly-member-home .statistics-bottom .statistics-item-divider { display: none; }
.tly-member-home .statistics-item-name { flex-wrap: wrap; gap: 4px 8px; }

.tly-member-home .product-list-box > .title-text { margin-bottom: 15px; }
.tly-member-home .product-list-box .product-name { overflow-wrap: anywhere; }
.tly-member-home .no-product {
  border: 1px dashed var(--tly-home-line);
  border-radius: 4px;
  background: #f8faff;
}

.tly-home-reminders { margin-bottom: 14px; }
.tly-home-reminder {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 41px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid #ebeff7;
  border-radius: 4px;
  background: #fff;
  color: var(--tly-home-ink);
  cursor: pointer;
  text-align: start;
  font: inherit;
}
.tly-home-reminder:hover { background: #f3f7ff; }
.tly-home-reminder span { flex: 1; overflow-wrap: anywhere; }
.tly-home-reminder i:first-child,
.tly-home-shortcuts nav i {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #edf4ff;
  color: var(--tly-home-blue);
  font-size: 15px;
}
.tly-home-reminder:first-of-type i:first-child { background: #fff2e8; color: #ca6526; }

.tly-home-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tly-home-gap);
  margin-top: var(--tly-home-gap);
}
.tly-home-shortcuts nav { display: grid; gap: 7px; }
.tly-home-shortcuts nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tly-home-ink);
}
.tly-home-shortcuts nav a:hover { color: var(--tly-home-blue); }
.tly-home-tabbar { display: none; }

@media (max-width: 1190px) {
  .tly-member-home .main-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "account finance" "spending reminders" "products products";
  }
}

@media (max-width: 760px) {
  .tly-member-home {
    --tly-home-gap: 12px;
    padding: 12px 10px calc(70px + env(safe-area-inset-bottom)) !important;
  }
  .tly-member-home .main-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "account" "finance" "spending" "products" "reminders";
  }
  .tly-member-home :is(.info-box, .statistics-box, .statistics-bottom, .product-list-box, .right-box),
  .tly-home-shortcuts > section { padding: 14px; }
  .tly-home-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .tly-home-tabbar {
    position: fixed;
    z-index: 25;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--tly-home-line);
    background: #fff;
    box-shadow: 0 -4px 14px rgb(31 45 78 / 4%);
  }
  .tly-home-tabbar a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-height: 46px;
    padding: 0 3px;
    color: var(--tly-home-muted);
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .tly-home-tabbar i { font-size: 18px; }
  .tly-home-tabbar a[aria-current="page"] { color: var(--tly-home-blue); }
}
