/* ========================================================
   全局重置 & 基础样式
   ======================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 使用系统无衬线字体，确保跨平台一致性 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f5f5f7; /* 使用更柔和的背景色 */
  color: #1d1d1f; /* 更深的文本色，提高可读性 */
  font-size: 14px;
  /* 关键：为固定在底部的导航栏留出空间 */
  padding-bottom: 60px;
  line-height: 1.5; /* 优化行高，提升阅读体验 */
}

/* 通用容器，控制页面内容边距 */
.container {
  padding: 0 16px;
}

/* ========================================================
   状态栏 (Status Bar)
   ======================================================== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: #ffffff;
  font-size: 14px;
  color: #1d1d1f;
  border-bottom: 1px solid #e6e6e6;
}

.icons {
  display: flex;
  align-items: center;
  gap: 10px; /* 增加图标间距 */
}

.icons img {
  width: 20px;
  height: 20px;
}

/* 电池图标样式优化 */
.battery {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 14px;
  border: 1.5px solid #86868b;
  border-radius: 3px;
  font-size: 10px;
  color: #1d1d1f;
  position: relative;
}
.battery::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 3px;
  width: 3px;
  height: 8px;
  background-color: #86868b;
  border-radius: 0 1px 1px 0;
}

/* ========================================================
   头部 (Header)
   ======================================================== */
.header {
  padding: 16px;
  color: #1d1d1f;
  background-color: #f5f5f7;
  font-weight: 600;
  font-size: 18px;
}

/* 主页头部特殊样式 */
.home-header {
  background-color: #228b22; /* TD 绿色 */
  color: #ffffff;
  padding-bottom: 20px;
  padding-top: 70px;
}

.greeting {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 4px;
}

.username {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* 操作按钮组 */
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* 屏幕变小时自动换行 */
  margin: -20px auto 0 2.5%;
}

.btn {
  padding: 14px 16px;
  border: none;
  border-radius: 20px;
  background-color: #fff;
  color: #000;
  font-weight: 500;
  font-size:15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn:active {
  background-color: #e0e0e0;
}

/* "更多"页面顶部的特殊按钮 */
.top-buttons .btn.bot-btn {
  color: #228b22;
}
.top-buttons .btn.bot-btn:active {
  background-color: #1e7d1e;
}

/* ========================================================
   通用模块样式
   ======================================================== */
/* 模块卡片 */
.card {
  background-color: #ffffff;
  border-radius: 12px; /* 使用更大的圆角，更现代 */
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 添加轻微阴影，提升层次感 */
}

/* 模块头部 */
.section-header {
  display: flex;
  align-items: center;
  padding: 4px;
}

.section-header h2 {
 display: flex;
 justify-content: left;
 align-items: center;
 padding:0px 16px 0px;
}

.more {
  color: #228b22;
  text-decoration: none;
  font-size: 22px;
  font-weight: 600;
}

/* ========================================================
   主页模块样式
   ======================================================== */

/* 我的账户模块 */
.account-card {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    justify-content: space-between;
    align-items: center;
    display: flex;
    background: #fff;
    border-radius: 8px;
  
}

.account-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.account-section{
  padding: 16px;
 
}

.account-type {
  font-weight: 500;
  color: #1d1d1f;
}

.account-count {
  color: #86868b;
  font-size: 13px;
}

.account-balance {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.1;
}

.account-currency {
  color: #86868b;
  font-size: 13px;
  padding-top: 12px !important;
  margin-bottom: 8px;
}

/* 添加账户按钮 */
.add-account, .add-service {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background-color: #ffffff;
  text-align: left;
  cursor: pointer;
  color: #000;
  font-weight: 500;
  font-size: 15px;
  margin-top: 12px !important;
  margin-bottom: 8px;
   border-radius: 8px;
}

.add-account::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    /* 白色背景 */
    background-color: #ffffff;
    /* 绿色边框（和加号同色） */
    border: 2px solid #228b22;
    /* 绿色加号 */
    color: #228b22;
    margin-right: 10px;
    margin-top: -5px;
    /* 微调字体让加号居中更稳 */
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    /* 可选：消除内边距影响 */
    padding: 0;
    box-sizing: border-box;
}

.add-service {
  color: #1d1d1f;
}
.add-service::before {
  content: "+";
  color: #228b22;
  background-color: transparent;
  font-size: 22px;
  margin-right: 8px;
}

/* TD MySpend 模块 */
.spend-summary {
  padding: 16px;
  background: #fff;
}

.thumb-icon{
 width: 40px;
}


.current-spend {
  background-color: #f0fdf4; /* 淡绿色背景 */
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.amount {
    font-size: 36px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.1;
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.spend-tip {
  color: #34d399; /* 提示文字颜色 */
  font-size: 14px;
  font-weight: 500;
}

.spend-comparison {
  display: flex;
  gap: 12px;
}

.item {
  flex: 1;
  background-color: #f5f5f7;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.value {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
}

.label {
  color: #86868b;
  font-size: 12px;
}
.offer-section{
}

/* 优惠和分析视图 */
.offer-card {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  
}

.offer-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover; /* 确保图片正确填充 */
  margin-right: 14px;
}

.offer-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.offer-text p {
  color: #86868b;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.learn-more {
  color: #228b22;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.close-offer {
  position: absolute;
  right: 16px;
  top: 0%;
  transform: translateY(-50%); /* 垂直居中 */
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #86868b;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-offer:active {
  background-color: #f0f0f0;
  border-radius: 50%;
}

.edit-home {
  display: block;
  width: calc(100% - 32px); /* 减去左右边距 */
  padding: 14px;
  border: 2px solid #228b22;
  background-color: #ffffff;
  color: #228b22;
  font-weight: 600;
  cursor: pointer;
  margin: 16px auto; /* 水平居中 */
  font-size: 15px;
  transition: background-color 0.2s ease;
}
.edit-home:active {
  background-color: #f0fdf4;
}

/* 帮助模块 */
.help-section {
  text-align: center;
  padding: 20px 16px;
}

.help-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 20px;
}

.help-buttons {
  display: flex;
  justify-content: space-around; /* 均匀分布 */
  gap: 10px;
}

.help-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  background: none;
  cursor: pointer;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 13px;
  padding: 10px 5px;
  border-radius: 8px;
}
.help-btn:active {
  background-color: #f0f0f0;
}

.help-btn img {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

/* ========================================================
   底部导航 (Bottom Navigation)
   ======================================================== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  background-color: #f5f5f5;
  align-items: center;
  padding: 8px 0 6px; /* 调整上下内边距 */
  border-top: 1px solid #e6e6e6;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* 确保在最上层 */
  padding-bottom:30px
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #86868b;
  font-size: 11px;
  font-weight: 500;
  flex-grow: 1; /* 让每个项平分空间 */
  height: 100%;
  justify-content: center;
}

.nav-item.active {
  color: #000;
}

.nav-item img {
  height: 26px;
  margin-bottom: 4px;
}


/* ========================================================
   更多页面 (more.php)
   ======================================================== */
.top-buttons {
  display: flex;
  gap: 12px;
  padding: 16px;
}
.top-buttons .btn {
  flex: 1; /* 两个按钮平分宽度 */
}

.section {
  background-color: #ffffff;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.section h3 {
  font-size: 15px;
  font-weight: 600;
  color: #86868b;
  padding: 16px 16px 12px;
}

.info-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 15px;
}
.info-btn:active {
  background-color: #f0f0f0;
}

.info-btn img {
  width: 24px;
  height: 24px;
  margin-right: 14px;
  flex-shrink: 0;
}

.info-btn .arrow {
  margin-left: auto;
  color: #c7c7cc;
  font-size: 20px;
  font-weight: 300;
}

.version {
  text-align: center;
  padding: 20px 16px;
  color: #86868b;
  font-size: 12px;
}