/* ================================================================
   星极云控制台 · ACDS 规范重构
   依据：Alibaba Cloud Design System
   色：#007BFF 主蓝 / #28A745 绿 / #DC3545 红
   字体：12 / 14 / 16 / 18 / 20 / 24px
   间距：8px 基准（8/16/24/32/48/64）
   圆角：按钮 4px / 卡片 2px / 弹窗 8px
   图标：线性单色 16/20/24px
   ================================================================ */
:root {
  --prim: #007BFF;
  --prim-hover: #0062CC;
  --prim-light: #E6F2FF;
  --success: #28A745;
  --danger: #DC3545;
  --warn: #FF8F1F;

  --t1: #1A1A1A;   /* 主文字 */
  --t2: #4E5969;   /* 次文字 */
  --t3: #86909C;   /* 辅助 */
  --t4: #C9CDD4;   /* 禁用 */

  --bd: #E5E6EB;   /* 边框 */
  --bd-light: #F2F3F5;
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-hover: #F7F8FA;

  --s1: 8px;  --s2: 16px;  --s3: 24px;  --s4: 32px;  --s5: 48px;

  --r-btn: 4px;
  --r-card: 2px;
  --r-modal: 8px;
}

body {
  background: var(--bg-page) !important;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5715 !important;
  color: var(--t1) !important;
  -webkit-font-smoothing: antialiased !important;
}

/* ==================== 侧边栏 ==================== */
body aside.el-aside {
  width: 208px !important;
  min-width: 208px !important;
  max-width: 208px !important;
  flex: 0 0 208px !important;
  background: #fff !important;
  border-right: 1px solid var(--bd) !important;
}

body aside.el-aside .el-menu {
  background: #fff !important;
  border-right: none !important;
  padding: var(--s1) 0 !important;
}

body aside.el-aside .el-menu-item,
body aside.el-aside .el-submenu__title {
  height: 40px !important;
  line-height: 40px !important;
  font-size: 14px !important;
  color: var(--t2) !important;
  padding-left: 44px !important;
  padding-right: 12px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: background .15s, color .15s !important;
}

body aside.el-aside .el-menu-item:hover,
body aside.el-aside .el-submenu__title:hover {
  background: var(--bg-hover) !important;
  color: var(--t1) !important;
}

/* 选中态：ACDS 标准 —— 浅蓝底 + 左 3px 主色条 */
body aside.el-aside .el-menu-item.is-active {
  background: var(--prim-light) !important;
  color: var(--prim) !important;
  font-weight: 500 !important;
  position: relative !important;
}
body aside.el-aside .el-menu-item.is-active::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 3px !important;
  background: var(--prim) !important;
}

body aside.el-aside .aside-menu-text {
  margin-left: 10px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.4 !important;
}

/* ==================== 顶部栏 ==================== */
body .top-menu,
body .el-header,
body .yfx-header {
  background: #fff !important;
  border-bottom: 1px solid var(--bd) !important;
  box-shadow: none !important;
  height: 56px !important;
}

body .yfx-header-name {
  color: var(--t1) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* ==================== 内容区 ==================== */
body .home-main {
  background: var(--bg-page) !important;
  padding: var(--s3) !important;
}
body .main-card,
body .main-content,
body .left-box {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  gap: var(--s2) !important;
}

/* ==================== 卡片：2px 圆角 + 1px 边框 ==================== */
body .info-box,
body .money-box,
body .statistics-box,
body .product-list-box {
  background: var(--bg-card) !important;
  border: 1px solid var(--bd) !important;
  border-radius: var(--r-card) !important;
  box-shadow: none !important;
  padding: var(--s3) !important;
}
body .info-box::after,
body .money-box::before { display: none !important; }

/* 用户信息 */
body .name-first {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: var(--prim-light) !important;
  color: var(--prim) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body .name-box .hello {
  color: var(--t1) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
}
body .name-box .name { color: var(--t2) !important; font-size: 14px !important; }
body .name-box .id-text { color: var(--t3) !important; font-size: 12px !important; }
body .level-badge {
  color: var(--prim) !important;
  background: var(--prim-light) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 1px 6px !important;
  border-radius: 2px !important;
}

body .info-box .info-second,
body .info-box .info-three { color: var(--t2) !important; font-size: 14px !important; }
body .info-box .email-box,
body .info-box .phone-number,
body .info-box .company-name,
body .info-box .certify-text,
body .info-box .right-title { color: var(--t1) !important; font-size: 14px !important; }
body .info-box .bule-text { color: var(--prim) !important; font-size: 14px !important; cursor: pointer !important; }
body .info-box .left-type,
body .info-box .right-type { color: var(--t3) !important; font-size: 12px !important; }
body .info-box .divider-box { background: var(--bd-light) !important; }

/* ==================== 余额卡 ==================== */
body .money-box { padding: var(--s3) !important; }
body .credit-money,
body .credit-num {
  color: var(--t1) !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -0.5px !important;
  background: none !important;
  -webkit-text-fill-color: var(--t1) !important;
  font-variant-numeric: tabular-nums !important;
}
body .credit-num .s-24 { font-size: 18px !important; font-weight: 500 !important; }
body .credit-name { color: var(--t3) !important; font-size: 12px !important; }

body .credit-btn {
  background: var(--prim) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--r-btn) !important;
  height: 32px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  transition: background .15s !important;
}
body .credit-btn:hover { background: var(--prim-hover) !important; }

body .notice-btn {
  color: var(--warn) !important;
  background: #FFF7E8 !important;
  border-radius: 2px !important;
  font-size: 12px !important;
  padding: 1px 6px !important;
  white-space: nowrap !important;
}

/* ==================== KPI 三卡 ==================== */
body .order-box { display: flex !important; gap: var(--s2) !important; width: 100% !important; }
body .order-item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 88px !important;
  padding: var(--s2) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
  background: var(--bg-page) !important;
  border: 1px solid var(--bd-light) !important;
  border-radius: var(--r-card) !important;
  box-shadow: none !important;
  overflow: visible !important;
  transition: border-color .15s, background .15s !important;
}
body .order-item:hover {
  background: #fff !important;
  border-color: var(--prim) !important;
  transform: none !important;
  box-shadow: none !important;
}
body .order-item .order-type-img { display: none !important; }
body .order-item .order-title {
  color: var(--t3) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
body .order-item .order-nums {
  color: var(--t1) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 32px !important;
  letter-spacing: -0.5px !important;
  font-variant-numeric: tabular-nums !important;
  margin: 0 !important;
}

/* ==================== 消费双栏 ==================== */
body .statistics-bottom {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: var(--s2) !important;
  margin-top: var(--s2) !important;
  background: transparent !important;
}
body .statistics-bottom .statistics-item {
  width: 100% !important;
  min-width: 0 !important;
  padding: 14px var(--s2) !important;
  background: var(--bg-page) !important;
  border: 1px solid var(--bd-light) !important;
  border-radius: var(--r-card) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
}
body .statistics-bottom .statistics-item-divider { display: none !important; }
body .statistics-bottom .statistics-item .statistics-item-name {
  font-size: 12px !important;
  color: var(--t3) !important;
  line-height: 20px !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
}
body .statistics-bottom .statistics-item .statistics-item-value {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--t1) !important;
  line-height: 28px !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  font-variant-numeric: tabular-nums !important;
}
body .statistics-item .statistics-item-name span.green-text,
body .statistics-item .statistics-item-name span.red-text { display: none !important; }

/* ==================== 表格 ==================== */
body .el-table {
  font-size: 14px !important;
  color: var(--t2) !important;
  border: none !important;
}
body .el-table::before { display: none !important; }
body .el-table th {
  background: var(--bg-page) !important;
  color: var(--t2) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  height: 44px !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--bd) !important;
}
body .el-table td {
  height: 48px !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--bd-light) !important;
}
body .el-table tr:hover > td { background: #FAFCFF !important; }
body .product-list-box .title-text {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--t1) !important;
  line-height: 24px !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  display: block !important;
  margin-bottom: var(--s2) !important;
}

/* ==================== 按钮 ==================== */
body .el-button {
  height: 32px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  border-radius: var(--r-btn) !important;
  border-color: var(--bd) !important;
  color: var(--t2) !important;
  transition: all .15s !important;
}
body .el-button:hover { color: var(--prim) !important; border-color: var(--prim) !important; }
body .el-button--primary {
  background: var(--prim) !important;
  border-color: var(--prim) !important;
  color: #fff !important;
}
body .el-button--primary:hover {
  background: var(--prim-hover) !important;
  border-color: var(--prim-hover) !important;
  color: #fff !important;
}

/* ==================== 标签 ==================== */
body .el-tag {
  height: 22px !important;
  line-height: 22px !important;
  padding: 0 8px !important;
  border-radius: 2px !important;
  font-size: 12px !important;
  border: none !important;
}
body .el-tag--success { background: #E8F7ED !important; color: #1A7F37 !important; }
body .el-tag--danger, body .el-tag--error { background: #FDECEA !important; color: var(--danger) !important; }
body .el-tag--warning { background: #FFF7E8 !important; color: #B45309 !important; }
body .el-tag--info, body .el-tag { background: var(--bd-light) !important; color: var(--t2) !important; }

/* ==================== 右栏卡片 ==================== */
body .right-box > div,
body .index-right-box > div,
body .right-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--bd) !important;
  border-radius: var(--r-card) !important;
  box-shadow: none !important;
  padding: var(--s3) !important;
}
body .right-box img,
body .index-right-box img { opacity: .55 !important; filter: saturate(.4) !important; }

/* ==================== 滚动条 ==================== */
body ::-webkit-scrollbar { width: 8px; height: 8px; }
body ::-webkit-scrollbar-thumb { background: #D5DCE8; border-radius: 4px; }
body ::-webkit-scrollbar-thumb:hover { background: #C0C8D6; }
body ::-webkit-scrollbar-track { background: transparent; }

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
  body aside.el-aside { width: 192px !important; min-width: 192px !important; flex: 0 0 192px !important; }
  body .home-main { padding: var(--s2) !important; }
}
@media (max-width: 820px) {
  body .order-box { flex-direction: column !important; }
  body .statistics-bottom { grid-template-columns: 1fr !important; }
  body .credit-num { font-size: 24px !important; }
}

/* ===== 栅格对齐修正 ===== */
/* 统一所有主区卡片的内边距与外边距 */
body .statistics-box,
body .product-list-box,
body .info-box,
body .money-box {
  padding: 24px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body .order-box {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body .statistics-content,
body .statistics-bottom {
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
/* 消费双栏铺满 */
body .statistics-bottom {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
}
/* 移除 order-box 可能的额外缩进 */
body .order-box > .order-item:first-child { margin-left: 0 !important; }
body .statistics-box > div { padding-left: 0 !important; padding-right: 0 !important; }

/* ===== 待处理标签：绿→橙 ===== */
body .el-tag--success[class*="待"],
body .tag-pending,
body .el-tag:contains("待") {
  background: #FFF7E8 !important;
  color: #B45309 !important;
}


/* ===== 终极栅格对齐：让 statistics-bottom 受同样 padding 约束 ===== */
body .statistics-box { position: relative !important; }
body .statistics-bottom {
  position: static !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
/* 把 KPI 与消费栏放进同一个 padding 容器 */
body .statistics-content { padding: 0 !important; }
/* 消费栏改为与 KPI 同宽同起点 */
body .statistics-bottom {
  padding-left: 0 !important;
  padding-right: 0 !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
}


/* ===== 最终对齐：statistics-bottom 补同样 padding ===== */
body .left-box > .statistics-bottom {
  padding: 24px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--bd) !important;
  border-radius: var(--r-card) !important;
}
/* 让消费双栏在这个容器内铺满 */
body .left-box > .statistics-bottom .statistics-item {
  width: 100% !important;
}


/* 消费栏左内缩 24px，与 KPI 区对齐 */
body .statistics-bottom {
  padding-left: 24px !important;
  padding-right: 24px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid var(--bd) !important;
  border-radius: var(--r-card) !important;
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}
body .statistics-bottom .statistics-item {
  width: 100% !important;
  min-width: 0 !important;
}


/* ===== 修复右上角购物车容器高度溢出 ===== */
body .yfx-header .right-item,
body .header-right .right-item {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}
body .yfx-header-shop {
  height: 32px !important;
  width: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  background: transparent !important;
  border: none !important;
}
body .yfx-header-shop:hover { background: var(--bg-page) !important; }
/* 顶栏容器不溢出 */
body .top-menu, body .yfx-header { overflow: visible !important; height: 56px !important; }


/* ===== 清除 right-item 的 24px padding ===== */
body .yfx-header .right-item,
body .header-right .right-item,
body .el-badge.item {
  padding: 0 !important;
  margin: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  box-sizing: border-box !important;
}
body .el-badge.item { display: flex !important; align-items: center !important; }

