/* ============================================
   时垒财富 - 客户H5移动端样式
   ============================================ */

/* 移动端容器 */
.mobile-page {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  padding-bottom: 70px;
  overflow-x: hidden;
}

/* 如果在PC上预览，加一个手机壳效果 */
@media (min-width: 500px) {
  body {
    background: #e2e8f0;
    padding: 20px;
  }
  .mobile-page {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    min-height: calc(100vh - 40px);
    border: 8px solid #1e293b;
    overflow: hidden;
  }
}

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* 页面头部 */
.m-header {
  background: linear-gradient(135deg, #1a2b5f 0%, #2d4a8c 100%);
  padding: 0 20px 24px;
  color: #fff;
  position: relative;
}
.m-header-white {
  background: var(--bg-card);
  padding: 0 16px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.m-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.m-header-greeting {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.m-header-sub {
  font-size: 13px;
  opacity: 0.7;
}
.m-header-advisor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}
.m-header-advisor .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
  border: 2px solid rgba(255,255,255,0.3);
}
.m-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}
.m-icon-btn-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.m-icon-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
  padding: 0 4px;
}

/* 资产卡片 */
.m-asset-card {
  margin: -12px 16px 0;
  background: linear-gradient(135deg, #0f1d3f 0%, #1a2b5f 100%);
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(26,43,95,0.3);
}
.m-asset-label {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 4px;
}
.m-asset-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
}
.m-asset-row {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.m-asset-item {
  flex: 1;
}
.m-asset-item-label {
  font-size: 11px;
  opacity: 0.5;
  margin-bottom: 2px;
}
.m-asset-item-value {
  font-size: 16px;
  font-weight: 600;
}
.m-eye-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
  opacity: 0.6;
}

/* 内容区域 */
.m-content {
  padding: 20px 16px;
}
.m-section {
  margin-bottom: 20px;
}
.m-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.m-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.m-section-more {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 卡片 */
.m-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.m-card-body {
  padding: 16px;
}

/* 快捷入口 */
.m-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.m-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 12px;
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 12px;
  transition: background 0.2s;
}
.m-quick-item:active {
  background: var(--bg-hover);
}
.m-quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* 资产分布 - 简化环形图 */
.m-dist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-dist-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.m-dist-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.m-dist-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.m-dist-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 8px;
}
.m-dist-pct {
  font-size: 13px;
  color: var(--text-secondary);
  width: 40px;
  text-align: right;
}
.m-dist-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin-top: 4px;
}
.m-dist-bar-fill {
  height: 100%;
  border-radius: 2px;
}

/* 建议卡片 */
.m-suggest-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.m-suggest-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.m-suggest-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.m-suggest-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.m-suggest-type {
  font-size: 12px;
}
.m-suggest-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.m-suggest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 持仓产品卡片 */
.m-holding-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.m-holding-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.m-holding-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.m-holding-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.m-holding-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
}
.m-holding-stat-value {
  font-size: 15px;
  font-weight: 600;
}

/* 筛选标签 */
.m-filter-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.m-filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.m-filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 钻石卡片 */
.m-diamond-card {
  margin: -12px 16px 0;
  background: linear-gradient(135deg, #2d1b69 0%, #1a2b5f 50%, #0f1d3f 100%);
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(45,27,105,0.3);
  overflow: hidden;
}
.m-diamond-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(212,168,83,0.1);
}
.m-diamond-main {
  text-align: center;
  padding: 10px 0 16px;
}
.m-diamond-icon {
  font-size: 40px;
  margin-bottom: 4px;
}
.m-diamond-count {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-light);
}
.m-diamond-label {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 2px;
}
.m-diamond-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.m-diamond-stat {
  text-align: center;
}
.m-diamond-stat-value {
  font-size: 16px;
  font-weight: 600;
}
.m-diamond-stat-label {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 2px;
}

/* 权益预告 */
.m-benefit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.m-benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef9ee, #fef3c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.m-benefit-info {
  flex: 1;
}
.m-benefit-name {
  font-size: 14px;
  font-weight: 500;
}
.m-benefit-diamonds {
  font-size: 12px;
  color: var(--accent);
  margin-top: 2px;
}

/* 我的页面 */
.m-profile-header {
  background: linear-gradient(135deg, #1a2b5f 0%, #2d4a8c 100%);
  padding: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.m-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  border: 3px solid rgba(255,255,255,0.3);
}
.m-profile-name {
  font-size: 20px;
  font-weight: 600;
}
.m-profile-id {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 2px;
}
.m-menu-list {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.m-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
}
.m-menu-item:last-child {
  border-bottom: none;
}
.m-menu-item:active {
  background: var(--bg-hover);
}
.m-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.m-menu-arrow {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* 底部导航 */
.m-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.m-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  text-decoration: none;
  color: var(--text-tertiary);
  font-size: 10px;
  transition: color 0.2s;
}
.m-tab-item.active {
  color: var(--primary);
}
.m-tab-icon {
  font-size: 22px;
  line-height: 1;
}
.m-tab-label {
  font-weight: 500;
}

/* 交易记录 */
.m-tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.m-tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.m-tx-info {
  flex: 1;
  min-width: 0;
}
.m-tx-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-tx-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.m-tx-amount {
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

/* 页面标题 */
.m-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 16px 16px 0;
}
.m-page-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 4px 16px 12px;
}

/* 详情页标签 */
.m-detail-tabs {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.m-detail-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}
.m-detail-tab.active {
  color: var(--primary);
}
.m-detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* 概览数据网格 */
.m-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.m-overview-item {
  padding: 12px;
  background: var(--bg-hover);
  border-radius: 10px;
}
.m-overview-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.m-overview-value {
  font-size: 16px;
  font-weight: 600;
}

/* 消息列表 */
.m-msg-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}
.m-msg-item.unread {
  background: #f8fafc;
}
.m-msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}
.m-msg-content {
  flex: 1;
}
.m-msg-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.m-msg-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.m-msg-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
