/* ============================================================
   主播端 H5 样式（mobile-first，独立于 desktop CSS）
   ============================================================ */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.h5-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 14px 16px;
  min-height: 100vh;
}

/* ====== 顶部 Header ====== */
.h5-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 16px;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}
.user-meta { display: flex; flex-direction: column; gap: 4px; }
.user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}
.role-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #ffe4e6;
  color: #e11d48;
  border-radius: 4px;
  font-weight: 500;
}
.user-id {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.bell-btn { padding: 8px; }

/* ====== 通用卡片 ====== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head strong { font-size: 16px; color: #111827; }
.card-head .updated {
  font-size: 12px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.more-link {
  font-size: 13px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ====== 今日数据卡片 ====== */
.today-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.metric-cell {
  text-align: center;
  padding: 4px 2px;
}
.metric-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
  white-space: nowrap;
}
.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.metric-trend {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.trend-label { color: #9ca3af; }
.trend-value {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 600;
}
.trend-value.up { color: #ef4444; }
.trend-value.down { color: #16a34a; }
.trend-value.flat { color: #6b7280; }

/* ====== 我的直播账号 ====== */
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.account-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.platform-icon {
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 10px;
  position: relative;
}
.platform-icon small {
  display: none;
}
.account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}
.account-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.account-meta strong { font-size: 15px; color: #111827; }
.account-meta small { font-size: 12px; color: #6b7280; }
.status-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  margin-top: 2px;
  width: fit-content;
}
.status-tag.bound {
  background: #d1fae5;
  color: #047857;
}
.status-tag.settled {
  background: #d1fae5;
  color: #047857;
}
.status-tag.pending {
  background: #fef3c7;
  color: #b45309;
}
.status-tag.invalid {
  background: #f3f4f6;
  color: #6b7280;
}
.account-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.primary-btn {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
}
.link-btn {
  font-size: 12px;
  color: #1d4ed8;
}

/* ====== 最近直播 tab ====== */
.tab-bar {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 14px;
  gap: 0;
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: #6b7280;
  position: relative;
}
.tab-item.active {
  color: #1d4ed8;
  font-weight: 600;
}
.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: #1d4ed8;
  border-radius: 2px;
}

/* ====== 直播 item ====== */
.live-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.live-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}
.live-item:last-child { border-bottom: none; padding-bottom: 0; }
.live-cover {
  width: 100px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #e5e7eb;
}
.live-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-time {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.live-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.live-title {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.live-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}
.live-meta small {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.live-amount {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
}
.live-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 0 4px;
  border-top: 1px solid #f3f4f6;
}
.lm-cell { display: flex; flex-direction: column; gap: 2px; }
.lm-cell span { font-size: 10px; color: #9ca3af; }
.lm-cell strong { font-size: 13px; color: #1f2937; font-variant-numeric: tabular-nums; }
.live-detail-link {
  font-size: 12px;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  align-self: flex-end;
}

/* ====== 底部 Tab Bar ====== */
.tabbar-placeholder { height: 70px; }
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #6b7280;
  padding: 4px 12px;
}
.tab.active { color: #1d4ed8; }
.tab span { font-size: 11px; }

/* =========================================================================
   主播 H5 v2 - SSR 模板专用 (.h5-* 命名空间)
   ========================================================================= */

:root {
  --h5-brand: #3370ff;
  --h5-brand-soft: rgba(51, 112, 255, 0.1);
  --h5-text: #1f2329;
  --h5-text-muted: #4e5969;
  --h5-text-faint: #86909c;
  --h5-bg: #f5f6f7;
  --h5-bg-card: #ffffff;
  --h5-border: #e5e6eb;
  --h5-border-soft: #f2f3f5;
}

.h5-body {
  background: var(--h5-bg);
  color: var(--h5-text);
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding-top: calc(56px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  margin: 0;
}

.h5-body a { color: inherit; text-decoration: none; }

.h5-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(56px + env(safe-area-inset-top, 0px)); background: #fff;
  display: flex; align-items: center;
  padding: env(safe-area-inset-top, 0px) 12px 0; z-index: 100;
  border-bottom: 1px solid var(--h5-border-soft);
}
.h5-header__back, .h5-header__icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--h5-text); background: transparent;
  border: 0; border-radius: 8px; flex-shrink: 0;
  position: relative;
}
.h5-header__back:active, .h5-header__icon-btn:active { background: var(--h5-border-soft); }
.h5-header__title {
  flex: 1; text-align: center;
  font-size: 17px; font-weight: 600; margin: 0; padding: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h5-header__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.h5-header__logout-form { margin: 0; }
.h5-header__logout-form .h5-header__icon-btn { cursor: pointer; padding: 0; }
.h5-header__badge {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 2px solid #fff;
}

.h5-main { padding: 12px; padding-bottom: 32px; }
.h5-footer { padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.h5-footer__hint {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  color: var(--h5-text-faint); font-size: 11px;
}

.h5-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--h5-border-soft);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}
.h5-bottom-nav__item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: var(--h5-text-faint);
  font-size: 11px;
  font-weight: 500;
}
.h5-bottom-nav__item svg { flex-shrink: 0; }
.h5-bottom-nav__item.is-active {
  color: var(--h5-brand);
  background: var(--h5-brand-soft);
}

.h5-card {
  background: var(--h5-bg-card); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.h5-section { margin-bottom: 16px; }
.h5-section__title {
  display: flex; align-items: center;
  font-weight: 600; font-size: 15px; padding: 4px 4px 10px;
}
.h5-section__bar {
  display: inline-block; width: 4px; height: 14px;
  border-radius: 2px; background: var(--h5-brand); margin-right: 8px;
}
.h5-section-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-right: 4px;
}
.h5-section__link { color: var(--h5-brand); font-size: 13px; }

.h5-profile-link { display: block; }
.h5-profile-card { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.h5-profile-card__main { flex: 1; min-width: 0; }
.h5-profile-card__name {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.h5-profile-card__name strong { font-size: 18px; font-weight: 600; }
.h5-profile-card__sub { font-size: 12px; color: var(--h5-text-faint); }
.h5-profile-card__arrow { color: var(--h5-text-faint); flex-shrink: 0; }

.h5-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #f3f4f6; flex-shrink: 0;
  overflow: hidden; color: #fff; font-weight: 600;
}
.h5-avatar img { width: 100%; height: 100%; object-fit: cover; }
.h5-avatar--xs { width: 32px; height: 32px; font-size: 13px; }
.h5-avatar--sm { width: 40px; height: 40px; font-size: 14px; }
.h5-avatar--md { width: 48px; height: 48px; font-size: 16px; }
.h5-avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.h5-avatar--xl { width: 84px; height: 84px; font-size: 28px; }
.h5-avatar--fallback { background: linear-gradient(135deg, #3370ff, #4e86ff); }

.h5-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500; line-height: 1.5;
  white-space: nowrap;
  background: var(--h5-border-soft); color: var(--h5-text-muted);
}
.h5-chip--brand-soft { background: var(--h5-brand-soft); color: var(--h5-brand); }
.h5-chip--brand-on-dark { background: rgba(255, 255, 255, 0.25); color: #fff; backdrop-filter: blur(4px); }
.h5-chip--success { background: #dcfce7; color: #15803d; }
.h5-chip--success-light { background: #f0fdf4; color: #16a34a; }
.h5-chip--info { background: #dbeafe; color: #1e40af; }
.h5-chip--neutral { background: #f3f4f6; color: #4b5563; }
.h5-chip--warning { background: #fff7ed; color: #c2410c; }
.h5-chip--danger { background: #fef2f2; color: #b91c1c; }

.h5-text-blue { color: var(--h5-brand); }
.h5-text-green { color: #16a34a; }
.h5-text-orange { color: #ea580c; }

.h5-cost-period__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.h5-cost-period__item { display: flex; align-items: center; gap: 10px; }
.h5-cost-period__icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.h5-cost-period__icon--blue { background: var(--h5-brand); }
.h5-cost-period__icon--orange { background: #f97316; }
.h5-cost-period__label { font-size: 11px; color: var(--h5-text-muted); }
.h5-cost-period__value { font-size: 14px; font-weight: 600; }
.h5-cost-period__hint {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--h5-border-soft);
  font-size: 11px; color: var(--h5-text-faint); text-align: center;
}

.h5-rankings__tabs {
  display: flex; gap: 4px; margin-bottom: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.h5-rankings__tab {
  flex-shrink: 0; padding: 6px 14px;
  border-radius: 8px; background: var(--h5-border-soft);
  color: var(--h5-text-muted); font-size: 13px;
}
.h5-rankings__tab.is-active { background: var(--h5-brand); color: #fff; font-weight: 500; }
.h5-rankings__list { list-style: none; margin: 0; padding: 0; }
.h5-rankings__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--h5-border-soft);
}
.h5-rankings__row:last-child { border-bottom: 0; }
.h5-rankings__row.is-self {
  background: var(--h5-brand-soft); margin: 0 -16px; padding: 10px 16px;
}
.h5-rankings__rank {
  width: 24px; height: 24px; border-radius: 50%;
  background: #f3f4f6; color: var(--h5-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.h5-rankings__rank--1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.h5-rankings__rank--2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.h5-rankings__rank--3 { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
.h5-rankings__name {
  flex: 1; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  min-width: 0; overflow: hidden;
}
.h5-rankings__value {
  font-size: 14px; font-weight: 600; color: var(--h5-text); white-space: nowrap;
}
.h5-rankings__row.is-self .h5-rankings__value { color: var(--h5-brand); }

.h5-record-card {
  display: flex; gap: 12px;
  background: var(--h5-bg-card); border-radius: 12px;
  padding: 12px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.h5-record-card.is-load-hidden:not(.is-search-match) { display: none; }
.h5-record-card__thumb {
  width: 100px; flex-shrink: 0;
  background: linear-gradient(135deg, #4a4a4a, #1a1a1a);
  border-radius: 10px; overflow: hidden; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
  align-self: stretch; min-height: 100px;
}
.h5-record-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.h5-record-card__thumb-fallback { padding: 10px; text-align: center; }
.h5-record-card__main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.h5-record-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.h5-record-card__title {
  font-size: 14px; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}
.h5-record-card__head-meta {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.h5-record-card__time {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--h5-text-muted);
}
.h5-record-card__time-sep { color: var(--h5-text-faint); }
.h5-record-card__metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 8px; margin-top: 4px;
}
.h5-record-card__metric { min-width: 0; }
.h5-record-card__metric-label { font-size: 11px; color: var(--h5-text-muted); }
.h5-record-card__metric-value {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h5-record-card__foot-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; flex-wrap: wrap;
}
.h5-record-card__detail-link {
  margin-left: auto; color: var(--h5-brand); font-size: 12px;
  border: 1px solid var(--h5-brand-soft); padding: 4px 10px;
  border-radius: 6px; background: rgba(51, 112, 255, 0.04);
}

.h5-filter-bar {
  display: flex; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; margin-bottom: 12px;
  margin-left: -12px; margin-right: -12px;
  padding-left: 12px; padding-right: 12px;
}
.h5-filter-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 8px;
  background: var(--h5-bg-card); color: var(--h5-text-muted);
  font-size: 13px;
}
.h5-filter-chip.is-active { background: var(--h5-brand); color: #fff; font-weight: 500; }

.h5-records-search { display: none; margin-bottom: 12px; }
.h5-records-search.is-open { display: block; }
.h5-records-search input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--h5-border); border-radius: 10px;
  font-size: 14px; background: #fff;
}
.h5-records-search input:focus { outline: none; border-color: var(--h5-brand); }

.h5-month-banner {
  background: var(--h5-bg-card); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.h5-month-banner__title {
  display: flex; align-items: center; font-size: 14px; font-weight: 600;
}
.h5-month-banner__profit {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--h5-text-muted);
}

.h5-empty {
  text-align: center; padding: 40px 20px;
  background: var(--h5-bg-card); border-radius: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.h5-empty strong { font-size: 14px; font-weight: 600; }
.h5-empty span { font-size: 12px; color: var(--h5-text-muted); }

.h5-load-more {
  width: 100%;
  margin: 10px 0 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--h5-text-muted);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.h5-load-more:active { background: var(--h5-border-soft); color: var(--h5-brand); }

.h5-toasts {
  position: fixed; top: 64px; left: 12px; right: 12px; z-index: 200;
  display: flex; flex-direction: column; gap: 6px;
}
.h5-toast {
  padding: 10px 14px; border-radius: 8px; background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); font-size: 13px;
}
.h5-toast--error { border-left: 3px solid #ef4444; }
.h5-toast--success { border-left: 3px solid #16a34a; }

.h5-detail-banner {
  position: relative; width: calc(100% + 24px); height: 200px;
  margin: -12px -12px 12px; overflow: hidden;
  border-radius: 0 0 16px 16px;
}
.h5-detail-banner__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h5-detail-banner__img--fallback { background: linear-gradient(135deg, #1f2937, #374151); }
.h5-detail-banner__overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  color: #fff;
}
.h5-detail-banner__title {
  display: block; font-size: 20px; font-weight: 600; margin-bottom: 4px;
}
.h5-detail-banner__meta { font-size: 12px; opacity: 0.9; }
.h5-detail-status-row { display: flex; flex-wrap: wrap; gap: 6px; }

.h5-income-card { padding: 14px 16px; }
.h5-income-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0;
}
.h5-income-row + .h5-income-row { border-top: 1px solid var(--h5-border-soft); }
.h5-income-row__icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.h5-income-row__icon--green { background: #dcfce7; color: #16a34a; }
.h5-income-row__icon--orange { background: #fff7ed; color: #ea580c; }
.h5-income-row__body { flex: 1; min-width: 0; }
.h5-income-row__title { font-size: 12px; color: var(--h5-text-muted); }
.h5-income-row__value { font-size: 18px; font-weight: 600; }
.h5-income-row__sub { font-size: 11px; color: var(--h5-text-faint); }

.h5-detail-list { padding: 4px 16px; }
.h5-detail-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--h5-border-soft);
}
.h5-detail-row:last-child { border-bottom: 0; }
.h5-detail-row__icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; flex-shrink: 0;
}
.h5-detail-row__icon--blue { background: var(--h5-brand-soft); color: var(--h5-brand); }
.h5-detail-row__icon--green { background: #dcfce7; color: #16a34a; }
.h5-detail-row__icon--yellow { background: #fef9c3; color: #ca8a04; }
.h5-detail-row__label { flex: 1; font-size: 14px; color: var(--h5-text-muted); }
.h5-detail-row__value { font-size: 14px; font-weight: 600; }

.h5-timeline { position: relative; padding-left: 16px; }
.h5-timeline-item { position: relative; padding: 10px 0; display: flex; gap: 12px; }
.h5-timeline-item::before {
  content: ""; position: absolute; left: 4px; top: 0; bottom: 0;
  width: 1px; background: var(--h5-border-soft);
}
.h5-timeline-item:first-child::before { top: 50%; }
.h5-timeline-item:last-child::before { bottom: 50%; }
.h5-timeline-dot {
  position: absolute; left: 0; top: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--h5-brand); z-index: 1;
}
.h5-timeline-time {
  font-size: 12px; color: var(--h5-text-muted);
  min-width: 80px; font-variant-numeric: tabular-nums;
}
.h5-timeline-text { flex: 1; font-size: 14px; }

.h5-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.h5-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
  cursor: pointer; border: 0; text-align: center;
}
.h5-btn--block { width: 100%; }
.h5-btn--primary { background: var(--h5-brand); color: #fff; }
.h5-btn--ghost { background: #fff; color: var(--h5-brand); border: 1px solid var(--h5-brand-soft); }
.h5-btn--danger-outline { background: #fff; color: #dc2626; border: 1px solid #fecaca; }
.h5-btn:active { opacity: 0.85; }

.h5-access-denied {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 34px 18px;
  text-align: center;
}
.h5-access-denied__icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ebf2ff 0%, #f0fdf4 100%);
  color: var(--h5-brand);
  box-shadow: 0 10px 30px rgba(51, 112, 255, 0.14);
}
.h5-access-denied h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--h5-text);
}
.h5-access-denied p {
  margin: 0;
  max-width: 320px;
  color: var(--h5-text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.h5-access-denied p strong { color: var(--h5-text); }
.h5-access-denied__hint {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412 !important;
}
.h5-access-denied__actions {
  width: 100%;
  max-width: 320px;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.h5-access-denied__actions form { margin: 0; }

.h5-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(51, 112, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #f4f7ff 0%, #f8fafc 58%, #ffffff 100%);
  color: var(--h5-text);
  font-family: var(--h5-font);
}
.h5-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 18px calc(env(safe-area-inset-bottom, 0px) + 28px);
}
.h5-login-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}
.h5-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.h5-login-brand__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3370ff, #6b8cff);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(51, 112, 255, 0.24);
}
.h5-login-brand__eyebrow {
  margin: 0 0 4px;
  color: var(--h5-brand);
  font-size: 12px;
  font-weight: 700;
}
.h5-login-brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.h5-login-desc {
  margin: 16px 0 18px;
  color: var(--h5-text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.h5-login-current {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.7;
}
.h5-login-current form { margin-top: 10px; }
.h5-login-form {
  display: grid;
  gap: 14px;
}
.h5-login-form label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--h5-text);
  font-size: 14px;
  font-weight: 700;
}
.h5-login-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--h5-border);
  border-radius: 14px;
  background: #fff;
  color: var(--h5-text);
  font-size: 16px;
  line-height: 1.3;
  padding: 13px 14px;
  outline: none;
}
.h5-login-form input:focus {
  border-color: var(--h5-brand);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
}
.h5-login-links {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}
.h5-login-links a { color: var(--h5-text-muted); text-decoration: none; }
.h5-login-links a:hover { color: var(--h5-brand); }

.h5-profile-hero {
  position: relative;
  background: linear-gradient(135deg, #3370ff 0%, #07c160 100%);
  border-radius: 14px;
  padding: 20px 16px 0; margin-bottom: 16px;
  color: #fff; overflow: hidden;
}
.h5-profile-hero__qr {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff; border-radius: 18px;
  padding: 6px 12px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.h5-profile-hero__main {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.h5-profile-hero__name {
  display: flex; align-items: center; gap: 8px;
}
.h5-profile-hero__name strong { font-size: 22px; font-weight: 600; }
.h5-profile-hero__sub { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.h5-profile-hero__main > div:nth-child(2) { flex: 1; min-width: 0; }
.h5-profile-hero__stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
  background: #fff; border-radius: 10px;
  padding: 14px 12px; color: var(--h5-text);
  margin: 12px 0 -2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.h5-profile-hero__stat-label { font-size: 11px; color: var(--h5-text-muted); margin-bottom: 4px; }
.h5-profile-hero__stat-value {
  font-size: 22px; font-weight: 600; color: var(--h5-brand);
}
.h5-profile-hero__stat-value span {
  font-size: 12px; font-weight: 400; color: var(--h5-text-muted);
}

.h5-owner-row { display: flex; align-items: center; gap: 12px; }
.h5-owner-row__main { flex: 1; min-width: 0; }
.h5-owner-row__main strong { display: block; font-size: 14px; }
.h5-owner-row__main .muted-small { font-size: 11px; color: var(--h5-text-muted); }
.h5-owner-row__actions { display: flex; align-items: center; gap: 8px; }
.h5-owner-row__arrow { color: var(--h5-text-faint); }
.h5-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f3f4f6;
}
.h5-icon-btn--green { background: #dcfce7; color: #16a34a; }
.h5-icon-btn--blue { background: var(--h5-brand-soft); color: var(--h5-brand); }

.h5-account-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--h5-border-soft);
}
.h5-account-row:last-child { border-bottom: 0; }
.h5-account-row__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.h5-account-row__icon--douyin { background: linear-gradient(135deg, #1a1a1a, #000); }
.h5-account-row__icon--kuaishou { background: linear-gradient(135deg, #ff8a00, #ff6e00); }
.h5-account-row__icon--shipinhao,
.h5-account-row__icon--wechat_video { background: linear-gradient(135deg, #07c160, #00a854); }
.h5-account-row__icon--xiaohongshu { background: linear-gradient(135deg, #fe2c55, #e11d48); }
.h5-account-row__icon--other { background: #6b7280; }
.h5-account-row__main { flex: 1; min-width: 0; }
.h5-account-row__main strong { display: block; font-size: 14px; }
.h5-account-row__main .muted-small {
  font-size: 11px; color: var(--h5-text-muted); display: block; margin-top: 2px;
}
.h5-account-row__arrow { color: var(--h5-text-faint); flex-shrink: 0; }

.h5-settings-list { padding: 0 16px; }
.h5-settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--h5-border-soft);
}
.h5-settings-row:last-child { border-bottom: 0; }
.h5-settings-row__icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.h5-settings-row__icon--orange { background: #fff7ed; color: #ea580c; }
.h5-settings-row__icon--blue { background: var(--h5-brand-soft); color: var(--h5-brand); }
.h5-settings-row__icon--green { background: #dcfce7; color: #16a34a; }
.h5-settings-row__icon--gray { background: #f3f4f6; color: #6b7280; }
.h5-settings-row__label { flex: 1; font-size: 14px; }
.h5-settings-row svg { color: var(--h5-text-faint); }

@media (max-width: 360px) {
  .h5-record-card__metrics { grid-template-columns: 1fr; }
}

/* ===== Anchor H5 design-match v5 overrides ===== */
:root {
  --h5-brand: #1267ff;
  --h5-brand-deep: #0757f2;
  --h5-brand-soft: #eef5ff;
  --h5-green: #10a968;
  --h5-green-soft: #edfdf5;
  --h5-orange: #ff6b00;
  --h5-orange-soft: #fff6ec;
  --h5-blue-soft: #edf5ff;
  --h5-text: #071126;
  --h5-text-muted: #677186;
  --h5-text-faint: #9aa4b5;
  --h5-border: #dfe8f7;
  --h5-border-soft: #edf2fb;
  --h5-bg: #f7fbff;
  --h5-bg-card: rgba(255, 255, 255, 0.96);
  --h5-shadow-card: 0 10px 30px rgba(16, 61, 133, 0.07);
}

html {
  background: #f7fbff;
}

.h5-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0, rgba(18, 103, 255, 0.10), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 42%, #ffffff 100%);
  color: var(--h5-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  padding-top: calc(72px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
}

.h5-main,
.h5-footer {
  width: min(100%, 430px);
  margin: 0 auto;
}

.h5-main {
  padding: 14px 15px 28px;
}

.h5-header,
.h5-bottom-nav {
  width: min(100%, 430px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.h5-header {
  height: calc(70px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 18px 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(223, 232, 247, 0.72);
  backdrop-filter: blur(18px);
}

.h5-header__title {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  color: #061126;
  text-align: center;
}

.h5-header__back,
.h5-header__icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #071126;
}

.h5-header__back:active,
.h5-header__icon-btn:active {
  background: #eef4ff;
}

.h5-header__actions {
  gap: 8px;
}

.h5-header__badge {
  top: 7px;
  right: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  background: #ff4d4f;
}

.h5-card,
.h5-month-banner,
.h5-record-card,
.h5-detail-list,
.h5-profile-link {
  background: var(--h5-bg-card);
  border: 1px solid var(--h5-border);
  border-radius: 18px;
  box-shadow: var(--h5-shadow-card);
}

.h5-section {
  margin-bottom: 14px;
}

.h5-section-row {
  margin: 4px 2px 12px;
}

.h5-section__title {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 800;
  color: #061126;
}

.h5-section__bar {
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1775ff, #0757f2);
  box-shadow: 0 5px 12px rgba(18, 103, 255, 0.22);
}

.h5-section__link {
  color: #667085;
  font-size: 13px;
}

.h5-profile-link {
  display: block;
  padding: 20px 20px;
  margin-bottom: 16px;
}

.h5-profile-card {
  gap: 18px;
  padding: 0;
}

.h5-avatar--lg {
  width: 78px;
  height: 78px;
  border: 3px solid #fff;
  box-shadow: 0 12px 24px rgba(9, 53, 122, 0.12);
}

.h5-profile-card__name strong {
  font-size: 23px;
  font-weight: 850;
}

.h5-profile-card__sub {
  font-size: 14px;
  color: #6c7485;
}

.h5-chip {
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.h5-chip--brand-soft,
.h5-chip--info {
  background: #eef5ff;
  color: var(--h5-brand);
  border: 1px solid rgba(18, 103, 255, 0.24);
}

.h5-chip--success,
.h5-chip--success-light {
  background: #eafaf2;
  color: var(--h5-green);
}

.h5-chip--warning {
  background: #fff4e6;
  color: var(--h5-orange);
}

.h5-cost-period {
  padding: 16px 16px 12px;
}

.h5-cost-period__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--h5-border-soft);
  padding-bottom: 12px;
}

.h5-cost-period__item {
  padding: 0 10px;
  border-right: 1px solid var(--h5-border-soft);
}

.h5-cost-period__item:last-child {
  border-right: 0;
}

.h5-cost-period__label {
  color: #6b7280;
  font-size: 12px;
}

.h5-cost-period__value {
  color: #111827;
  font-size: 15px;
  font-weight: 750;
}

.h5-cost-period__note {
  margin-top: 8px;
  color: #9aa4b5;
  text-align: center;
  font-size: 13px;
}

.h5-rank-tabs,
.h5-status-tabs {
  display: grid;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: #f4f7fb;
  overflow-x: auto;
}

.h5-rank-tabs {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}

.h5-status-tabs {
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  margin-bottom: 14px;
}

.h5-rank-tab,
.h5-status-tab {
  border-radius: 11px;
  padding: 11px 12px;
  color: #596579;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.h5-rank-tab.is-active,
.h5-status-tab.is-active {
  background: linear-gradient(135deg, #1674ff, #0757f2);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 103, 255, 0.24);
}

.h5-ranking-list {
  border: 1px solid var(--h5-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.h5-rank-row {
  padding: 12px 12px;
}

.h5-rank-row.is-self {
  margin: 0;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
  border: 1px solid rgba(18, 103, 255, 0.30);
  border-radius: 13px;
}

.h5-rank-row__value {
  font-weight: 850;
  color: #0a58f4;
}

.h5-record-card {
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  color: inherit;
}

.h5-record-card__thumb {
  width: 96px;
  min-height: 108px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.h5-record-card__main {
  min-width: 0;
}

.h5-record-card__title {
  font-size: 17px;
  font-weight: 850;
  color: #071126;
}

.h5-record-card__time {
  margin-top: 6px;
  color: #647086;
  font-size: 13px;
}

.h5-record-card__metrics {
  margin-top: 12px;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.h5-record-card__metric {
  padding: 0 8px;
  border-right: 1px solid var(--h5-border-soft);
}

.h5-record-card__metric:first-child {
  padding-left: 0;
}

.h5-record-card__metric:last-child {
  border-right: 0;
  padding-right: 0;
}

.h5-record-card__metric-label {
  color: #6b7280;
  font-size: 12px;
}

.h5-record-card__metric-value {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 850;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.h5-record-card__foot-row {
  margin-top: 12px;
}

.h5-record-card__detail-link {
  border: 1px solid var(--h5-brand);
  border-radius: 10px;
  color: var(--h5-brand);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 750;
}

.h5-month-banner {
  padding: 16px 16px 14px;
}

.h5-month-banner__title {
  font-size: 18px;
  font-weight: 850;
}

.h5-month-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.h5-load-more {
  min-height: 48px;
  font-size: 16px;
}

.h5-detail-banner {
  border-radius: 18px;
  min-height: 178px;
  box-shadow: var(--h5-shadow-card);
}

.h5-detail-banner__img {
  border-radius: 18px;
}

.h5-detail-banner__overlay {
  padding: 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.70));
}

.h5-detail-banner__title {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
}

.h5-detail-banner__meta {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.94);
}

.h5-detail-status-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
}

.h5-detail-income {
  border-radius: 18px;
}

.h5-detail-list {
  padding: 14px 16px;
}

.h5-detail-list__row {
  padding: 13px 0;
}

.h5-timeline {
  padding: 4px 2px;
}

.h5-timeline-item {
  min-height: 38px;
}

.h5-detail-actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 110;
  width: min(100%, 430px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 15px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(223, 232, 247, 0.88);
  box-shadow: 0 -12px 30px rgba(17, 41, 88, 0.08);
  backdrop-filter: blur(18px);
}

.h5-page-anchor_h5_record_detail {
  padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}

.h5-page-anchor_h5_record_detail .h5-footer {
  display: none;
}

.h5-page-anchor_h5_record_detail .h5-main {
  padding-bottom: 112px;
}

.h5-btn {
  min-height: 48px;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 850;
}

.h5-btn--primary {
  background: linear-gradient(135deg, #1674ff, #0757f2);
  box-shadow: 0 10px 20px rgba(18, 103, 255, 0.20);
}

.h5-btn--ghost {
  background: #fff;
  border: 1px solid var(--h5-brand);
}

.h5-profile-hero {
  border-radius: 24px;
  padding: 22px 22px 0;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.35), transparent 22%),
    linear-gradient(135deg, #4aa3ff 0%, #2e7cff 45%, #54dfb2 100%);
  box-shadow: 0 14px 30px rgba(18, 103, 255, 0.18);
}

.h5-profile-hero__qr {
  top: 18px;
  right: 18px;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
}

.h5-profile-hero__main {
  gap: 18px;
  padding-top: 42px;
}

.h5-avatar--xl {
  width: 96px;
  height: 96px;
  border: 4px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 28px rgba(6, 17, 38, 0.14);
}

.h5-profile-hero__name strong {
  font-size: 29px;
  font-weight: 900;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-profile-hero__name {
  flex-wrap: wrap;
}

.h5-profile-hero__sub {
  font-size: 15px;
}

.h5-profile-hero__stats {
  border-radius: 18px;
  padding: 20px 12px;
  margin: 18px 0 0;
  box-shadow: 0 14px 28px rgba(6, 17, 38, 0.10);
}

.h5-profile-hero__stat {
  border-right: 1px solid var(--h5-border-soft);
}

.h5-profile-hero__stat:last-child {
  border-right: 0;
}

.h5-profile-hero__stat-label {
  font-size: 13px;
  color: #4b5565;
}

.h5-profile-hero__stat-value {
  font-size: 27px;
  font-weight: 900;
}

.h5-owner-row,
.h5-account-row,
.h5-settings-row {
  padding: 15px 0;
}

.h5-settings-list {
  padding: 0 18px;
}

.h5-bottom-nav {
  height: calc(74px + env(safe-area-inset-bottom, 0px));
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(223, 232, 247, 0.90);
  border-bottom: 0;
}

.h5-bottom-nav__item {
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
}

.h5-bottom-nav__item.is-active {
  color: var(--h5-brand);
  background: linear-gradient(180deg, #eef5ff, #f8fbff);
}

.h5-footer {
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 374px) {
  .h5-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .h5-profile-card {
    gap: 13px;
  }

  .h5-avatar--lg {
    width: 68px;
    height: 68px;
  }

  .h5-record-card {
    gap: 10px;
    padding: 12px;
  }

  .h5-record-card__thumb {
    width: 94px;
    min-height: 100px;
  }

  .h5-record-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 8px;
  }

  .h5-record-card__metric:nth-child(2n) {
    border-right: 0;
  }
}

/* ============================================================
   Anchor H5 compact mobile correction v6
   目标：贴近设计稿的移动端密度，避免图片拉伸、数字省略、资料卡重叠。
   ============================================================ */

.h5-main {
  padding: 12px 14px 28px;
}

.h5-section {
  margin-bottom: 12px;
}

.h5-section__title {
  font-size: 18px;
  line-height: 1.25;
}

.h5-header {
  height: calc(62px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
}

.h5-header__title {
  font-size: 20px;
}

.h5-header__back,
.h5-header__icon-btn {
  width: 38px;
  height: 38px;
}

.h5-profile-card {
  min-height: 92px;
  padding: 14px 16px;
  gap: 14px;
}

.h5-avatar--lg {
  width: 68px;
  height: 68px;
}

.h5-profile-card__name strong {
  font-size: 20px;
  line-height: 1.15;
}

.h5-profile-card__sub {
  font-size: 13px;
}

.h5-cost-period {
  padding: 14px;
}

.h5-cost-period__row {
  gap: 10px;
}

.h5-cost-period__item {
  min-width: 0;
}

.h5-rankings__tabs {
  gap: 4px;
}

.h5-rankings__tab {
  min-width: 0;
  padding: 9px 6px;
  font-size: 13px;
}

.h5-record-card {
  gap: 11px;
  padding: 13px;
  border-radius: 16px;
  align-items: flex-start;
}

.h5-record-card__thumb {
  width: 92px;
  height: 92px;
  min-height: 92px;
  align-self: flex-start;
  border-radius: 14px;
}

.h5-record-card__main {
  gap: 5px;
}

.h5-record-card__title {
  font-size: 16px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.h5-record-card__head-meta {
  max-width: 92px;
}

.h5-record-card__time {
  margin-top: 4px;
  font-size: 12px;
  flex-wrap: wrap;
}

.h5-record-card__metrics {
  margin-top: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.h5-record-card__metric {
  padding: 0 6px;
}

.h5-record-card__metric-label {
  font-size: 11px;
  line-height: 1.2;
}

.h5-record-card__metric-value {
  font-size: clamp(13px, 3.55vw, 15px);
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
}

.h5-record-card__foot-row {
  margin-top: 8px;
  gap: 6px;
}

.h5-record-card__detail-link {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.h5-month-banner {
  padding: 14px;
}

.h5-month-banner__title {
  font-size: 17px;
}

.h5-detail-banner {
  min-height: 164px;
  border-radius: 16px;
}

.h5-detail-banner__img {
  border-radius: 16px;
}

.h5-detail-banner__overlay {
  padding: 18px;
}

.h5-detail-banner__title {
  font-size: 24px;
}

.h5-detail-banner__meta {
  font-size: 15px;
}

.h5-income-card,
.h5-detail-list,
.h5-card {
  border-radius: 16px;
}

.h5-detail-actions {
  width: min(100%, 430px);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}

.h5-btn {
  min-height: 44px;
  font-size: 15px;
}

.h5-profile-hero {
  border-radius: 22px;
  padding: 18px 18px 0;
}

.h5-profile-hero__main {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 6px;
  align-items: center;
  padding-top: 42px;
  margin-bottom: 16px;
}

.h5-profile-hero__info {
  min-width: 0;
}

.h5-avatar--xl {
  width: 86px;
  height: 86px;
  grid-row: 1 / span 2;
}

.h5-profile-hero__name {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.h5-profile-hero__name strong {
  font-size: clamp(22px, 6.4vw, 28px);
  line-height: 1.15;
  max-width: 160px;
}

.h5-profile-hero__sub {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.h5-profile-hero__stats {
  margin-top: 14px;
  padding: 16px 8px;
  border-radius: 16px;
}

.h5-profile-hero__stat-value {
  font-size: clamp(22px, 7vw, 28px);
}

.h5-bottom-nav {
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  padding: 7px 14px calc(7px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
}

.h5-bottom-nav__item {
  font-size: 11px;
}

@media (max-width: 374px) {
  .h5-record-card__thumb {
    width: 84px;
    height: 84px;
    min-height: 84px;
  }

  .h5-record-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .h5-profile-hero__main {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .h5-avatar--xl {
    width: 76px;
    height: 76px;
  }
}

/* =========================================================================
   v3 视觉打磨 (final override) - 按设计图精修
   ========================================================================= */

/* 全局基础调整 */
.h5-body {
  background: #f5f6f7;
}

.h5-main {
  padding: 14px 14px 28px;
}

/* === KPI 卡 - canonical mobile style (按设计图: 2 列 3 行 + 横排) === */
.h5-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.h5-kpi-grid--2col { grid-template-columns: 1fr 1fr; }
.h5-kpi-grid--3col { grid-template-columns: 1fr 1fr 1fr; }

/* KPI 卡: 图标在左 + 文字在右 (横排), 不是竖排 */
.h5-kpi {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(229, 230, 235, 0.6);
}

/* KPI 图标 - 圆形, 44×44 (设计图大小) */
.h5-kpi__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.h5-kpi__icon svg {
  width: 22px;
  height: 22px;
}

/* KPI 浅彩色背景 (按设计图) - 用 ::before 实现淡色背景层 */
.h5-kpi--blue { background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 75%); }
.h5-kpi--green { background: linear-gradient(180deg, #ecfdf3 0%, #ffffff 75%); }
.h5-kpi--orange { background: linear-gradient(180deg, #fff5e8 0%, #ffffff 75%); }

.h5-kpi--blue .h5-kpi__icon { background: #3370ff; color: #fff; }
.h5-kpi--green .h5-kpi__icon { background: #16a34a; color: #fff; }
.h5-kpi--orange .h5-kpi__icon { background: #f97316; color: #fff; }

.h5-kpi__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h5-kpi__title {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 4px;
}

.h5-kpi__value {
  font-size: 22px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h5-kpi__unit {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  margin-left: 2px;
}
.h5-kpi__sub {
  font-size: 11px;
  color: #86909c;
  margin-top: 2px;
}

/* 缩小给"成交额/预估净利润"这种长金额数字 */
.h5-kpi--blue .h5-kpi__value,
.h5-kpi--green .h5-kpi__value {
  font-size: clamp(18px, 5vw, 22px);
}

/* === 区块标题 - 蓝条更精致 === */
.h5-section__title {
  font-size: 16px !important;
  font-weight: 600;
  color: #1f2329;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 10px;
  line-height: 1.3;
}
.h5-section__bar {
  width: 3px !important;
  height: 16px !important;
  border-radius: 2px;
  background: #3370ff;
}

/* === 主播资料卡 (首页顶部) - 干净 === */
.h5-profile-card {
  padding: 16px !important;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 14px;
}
.h5-profile-card__name strong {
  font-size: 18px !important;
  font-weight: 600;
  color: #1f2329;
}
.h5-profile-card__sub {
  color: #86909c;
  font-size: 13px !important;
  margin-top: 2px;
}

/* === 当前成本节点卡 (按图: 大圆角图标) === */
.h5-cost-period {
  padding: 16px !important;
  background: #fff;
  border-radius: 14px;
}
.h5-cost-period__icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}
.h5-cost-period__label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 2px;
}
.h5-cost-period__value {
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
}

/* === 主播排名 - tab + list === */
.h5-rankings__tabs {
  border-bottom: 1px solid #f2f3f5;
  padding-bottom: 0 !important;
  margin-bottom: 6px;
}
.h5-rankings__tab {
  position: relative;
  padding: 10px 14px !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: #6b7280 !important;
  font-size: 13px;
  font-weight: 500;
}
.h5-rankings__tab.is-active {
  color: #3370ff !important;
  background: transparent !important;
  font-weight: 600;
}
.h5-rankings__tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: #3370ff;
}

.h5-rankings__row { padding: 12px 4px !important; gap: 12px; }
.h5-rankings__row.is-self {
  background: linear-gradient(90deg, rgba(51,112,255,0.08) 0%, rgba(51,112,255,0.02) 100%) !important;
  border-radius: 10px !important;
  margin: 0 !important;
  padding: 12px !important;
}
.h5-rankings__rank {
  width: 26px !important;
  height: 26px !important;
  font-size: 13px;
}

/* === 直播记录卡 - 设计图 === */
.h5-record-card {
  padding: 12px !important;
  border-radius: 14px !important;
  gap: 12px !important;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  align-items: stretch !important;
  margin-bottom: 12px;
}
.h5-record-card__thumb {
  width: 96px !important;
  height: 96px !important;
  min-height: 96px !important;
  border-radius: 12px !important;
}
.h5-record-card__title {
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1.3 !important;
  color: #1f2329;
}
.h5-record-card__time {
  font-size: 12px !important;
  color: #6b7280;
}

.h5-record-card__metrics {
  margin-top: 6px !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px 4px !important;
  padding: 8px 0 !important;
  border-top: 1px solid #f2f3f5;
}
.h5-record-card__metric { padding: 0 !important; }
.h5-record-card__metric-label {
  font-size: 11px !important;
  color: #9ca3af !important;
  font-weight: 400;
  margin-bottom: 2px;
}
.h5-record-card__metric-value {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.h5-record-card__foot-row {
  margin-top: 6px !important;
  gap: 6px !important;
  align-items: center;
}
.h5-record-card__foot-row .h5-chip {
  padding: 3px 8px !important;
  font-size: 11px !important;
  background: #f3f4f6 !important;
  color: #6b7280 !important;
}
.h5-record-card__detail-link {
  padding: 6px 12px !important;
  font-size: 12px !important;
  border: 1px solid #dbeafe !important;
  background: #fff !important;
  color: #3370ff !important;
  font-weight: 500;
  border-radius: 8px !important;
}

/* 月份 banner */
.h5-month-banner {
  padding: 12px 14px !important;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.h5-month-banner__title {
  font-size: 14px !important;
  font-weight: 600;
  color: #1f2329;
}
.h5-month-banner__profit {
  margin-top: 2px;
  gap: 8px !important;
  font-size: 12px;
}
.h5-month-banner__profit .h5-chip {
  margin-right: 2px;
}

/* === Profile hero (个人中心顶部渐变卡) === */
.h5-profile-hero {
  background: linear-gradient(135deg, #4e86ff 0%, #5db8ff 50%, #34d399 100%) !important;
  border-radius: 18px !important;
  padding: 18px 16px 0 !important;
}
.h5-profile-hero__name strong {
  font-size: clamp(22px, 6vw, 26px) !important;
}
.h5-profile-hero__stat-value {
  color: #3370ff !important;
  font-weight: 700;
  font-size: clamp(20px, 6vw, 24px) !important;
}
.h5-profile-hero__stat-value span {
  color: #6b7280;
  font-size: 11px !important;
  font-weight: 400;
  margin-left: 2px;
}

/* === 状态条 chip === */
.h5-detail-status-row {
  gap: 8px !important;
}
.h5-detail-status-row .h5-chip {
  padding: 4px 10px !important;
  font-size: 12px !important;
}

/* === KPI 详情页 4 大格 - 大数字 === */
.h5-kpi-grid--2col .h5-kpi {
  min-height: 90px;
  padding: 14px 16px;
}
.h5-kpi-grid--2col .h5-kpi__value {
  font-size: clamp(22px, 6vw, 26px);
}

/* 收入卡数字加大 */
.h5-income-row__value {
  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* 渐变文字增强 */
.h5-text-blue { color: #3370ff !important; }
.h5-text-green { color: #16a34a !important; }
.h5-text-orange { color: #ea580c !important; }
