/* ==========================================================================
   cst-2027 布局层
   第 2 版：导航铺满 + 首页放宽
   第 3 版：首页视觉美化（只动样式，不动任何文案与结构）
   加载顺序：最后一个
   ========================================================================== */

/* ---------- 1. 导航铺满 ---------- */
body .cst-topbar .container,
body .cst-masthead .container,
body .cst-searchbar .container{
  max-width:1600px;
  padding-left:40px;
  padding-right:40px;
}
.cst-nav{justify-content:flex-start;}
.cst-nav > ul{margin-left:14px;}
.cst-masthead,.cst-topbar{width:100%;}

/* ---------- 2. 首页放宽 ---------- */
body.cst-home .container{
  max-width:1600px;
  padding-left:40px;
  padding-right:40px;
}
body.cst-home .cst-wrap{
  max-width:100%;
  padding-left:0;
  padding-right:0;
}

/* ==========================================================================
   3. 首页美化
   ========================================================================== */

/* 3.1 区块节奏：统一留白、标题层级 */
body.cst-home .cst-section{padding:76px 0;}
body.cst-home .cst-eyebrow{
  display:inline-block;
  font-size:11.5px;
  letter-spacing:2.6px;
  color:#93a1b5;
  text-transform:uppercase;
  margin-bottom:12px;
}
body.cst-home .cst-h2{
  font-size:32px;
  font-weight:500;
  letter-spacing:-.6px;
  line-height:1.32;
}
body.cst-home .cst-sub{
  font-size:13.5px;
  line-height:1.75;
  color:#7b8a9e;
  max-width:620px;
}

/* 3.2 hero：只强化卡片质感，背景保持原样 */
body.cst-home .cst-hero__card{
  border-radius:10px;
  border-color:#e3ecf9;
  box-shadow:0 26px 56px -28px rgba(12,32,64,.38);
}

/* 3.3 数据条：浅底通栏，数字抬高一个量级 */
body.cst-home .cst-stats{
  background:#f7faff;
  border-top:1px solid #eaf1fb;
  border-bottom:1px solid #eaf1fb;
}
body.cst-home .cst-stat{padding:32px 18px;border-right-color:#e4edf9;}
body.cst-home .cst-stat__num{
  font-size:40px;
  font-weight:500;
  letter-spacing:-1.2px;
  line-height:1.1;
  color:#0e1b2e;
}
body.cst-home .cst-stat__num span{font-size:19px;color:var(--cst-brand);}
body.cst-home .cst-stat__label{font-size:12.5px;color:#8595aa;margin-top:8px;}

/* 3.4 产品卡：左对齐 + 图标色区分 + 悬停线条 */
body.cst-home .cst-home-products .card{
  position:relative;
  overflow:hidden;
  background:#fff;
  border:1px solid #e8eef7;
  border-radius:10px;
  transition:border-color .25s,box-shadow .25s,transform .25s;
}
body.cst-home .cst-home-products .card::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:2px;
  background:var(--cst-brand);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .3s ease;
}
body.cst-home .cst-home-products .card:hover{
  border-color:#cfdcf3;
  box-shadow:0 18px 38px -20px rgba(12,32,64,.3);
  transform:translateY(-3px);
}
body.cst-home .cst-home-products .card:hover::before{transform:scaleX(1);}
body.cst-home .cst-home-products .card-body{
  text-align:left !important;
  padding:24px 24px 22px !important;
}
body.cst-home .cst-home-products .ico-container{
  width:42px;height:42px;
  border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:#eef4ff;
  color:var(--cst-brand);
  font-size:16px;
  margin:0 0 18px;
}
body.cst-home .cst-home-products .card-title{
  font-size:15.5px;
  font-weight:500;
  line-height:1.5;
  letter-spacing:-.2px;
  margin:0 0 10px;
  color:#0e1b2e;
}
body.cst-home .cst-home-products .card-body p{
  font-size:12.8px;
  line-height:1.8;
  color:#6b7a90;
  margin:0 0 20px;
}
body.cst-home .cst-home-products .btn{
  display:flex;
  align-items:center;
  justify-content:center;
  height:38px;
  padding:0;
  border-radius:6px;
  font-size:13.5px;
  font-weight:500;
  border:1px solid #d7e2f4;
  color:var(--cst-brand);
  background:#fff;
  transition:all .2s;
}
body.cst-home .cst-home-products .btn:hover{
  background:var(--cst-brand);
  border-color:var(--cst-brand);
  color:#fff;
}
/* 图标底色循环 4 色，打破“11 个同款图标”的单调 */
body.cst-home .cst-home-products > div:nth-child(4n+2) .ico-container{background:#e8f8f1;color:#00a86b;}
body.cst-home .cst-home-products > div:nth-child(4n+3) .ico-container{background:#fff2e8;color:#e8701a;}
body.cst-home .cst-home-products > div:nth-child(4n+4) .ico-container{background:#f1f0ff;color:#5b5bd6;}

/* 3.5 机房卡片 */
body.cst-home .cst-loc{
  border-radius:10px;
  border-color:#e8eef7;
  padding:20px 20px 18px;
  transition:border-color .25s,box-shadow .25s,transform .25s;
}
body.cst-home .cst-loc:hover{
  border-color:#cfdcf3;
  box-shadow:0 14px 30px -20px rgba(12,32,64,.28);
  transform:translateY(-2px);
}
body.cst-home .cst-loc__code{
  border-radius:4px;
  background:#eef4ff;
  color:var(--cst-brand);
  font-weight:500;
  letter-spacing:.5px;
}
body.cst-home .cst-loc__name{font-size:14.5px;}

/* 3.6 场景卡 / 步骤卡 */
body.cst-home .cst-scene,
body.cst-home .cst-step{
  border-radius:10px;
  border-color:#e8eef7;
  transition:border-color .25s,box-shadow .25s,transform .25s;
}
body.cst-home .cst-scene:hover,
body.cst-home .cst-step:hover{
  border-color:#cfdcf3;
  box-shadow:0 16px 34px -22px rgba(12,32,64,.28);
  transform:translateY(-2px);
}
body.cst-home .cst-scene i.cst-scene__big{border-radius:10px;}

/* 3.7 FAQ：卡片化条目 */
body.cst-home .cst-faq{border-top:0;margin-top:30px;}
body.cst-home .cst-faq__item{
  border:1px solid #e8eef7;
  border-radius:8px;
  background:#fff;
  margin-bottom:10px;
  padding:0 20px;
  transition:border-color .2s,box-shadow .2s;
}
body.cst-home .cst-faq__item:hover{border-color:#cfdcf3;box-shadow:0 10px 24px -18px rgba(12,32,64,.25);}
body.cst-home .cst-faq__q{padding:18px 40px 18px 0;position:relative;}
/* 模板里的问答按钮没有图标元素，用伪元素补一个展开指示（不依赖图标字体） */
body.cst-home .cst-faq__q::after{
  content:"+";
  position:absolute;
  right:4px;
  top:50%;
  transform:translateY(-50%);
  font-size:20px;
  font-weight:300;
  line-height:1;
  color:#a7b4c6;
  transition:color .2s;
}
body.cst-home .cst-faq__item.is-open .cst-faq__q::after{content:"−";color:var(--cst-brand);}

/* 3.9 客户中心快捷入口 / 域名搜索 */
body.cst-home .cst-quick a{
  border-radius:10px;
  border-color:#e8eef7;
  transition:border-color .25s,box-shadow .25s,transform .25s,color .2s;
}
body.cst-home .cst-quick a:hover{
  border-color:#cfdcf3;
  box-shadow:0 14px 30px -20px rgba(12,32,64,.28);
}
body.cst-home .cst-domain{border-radius:10px;border-color:#e8eef7;}

/* 3.8 CTA 块 */
body.cst-home .cst-cta{
  border-radius:12px;
  box-shadow:0 26px 56px -30px rgba(10,40,110,.55);
}
body.cst-home .cst-cta__btns .cst-btn{border-radius:6px;}

/* ---------- 4. 宽度变化后的视觉平衡 ---------- */
@media(min-width:1200px){
  body.cst-home .cst-hero{padding-top:52px;}
  body.cst-home .cst-hero h1{font-size:44px;max-width:840px;}
  body.cst-home .cst-hero__lead{max-width:640px;font-size:15.5px;}
  body.cst-home .cst-hero__card{max-width:480px;}
}

/* ---------- 5. 中小屏收边 ---------- */
@media(max-width:1199.98px){
  body .cst-topbar .container,
  body .cst-masthead .container,
  body .cst-searchbar .container,
  body.cst-home .container{
    padding-left:24px;
    padding-right:24px;
  }
  .cst-nav > ul{margin-left:0;}
  body.cst-home .cst-section{padding:56px 0;}
}
@media(max-width:767.98px){
  body .cst-topbar .container,
  body .cst-masthead .container,
  body .cst-searchbar .container,
  body.cst-home .container{
    padding-left:16px;
    padding-right:16px;
  }
  body.cst-home .cst-h2{font-size:24px;}
  body.cst-home .cst-stat__num{font-size:30px;}
  /* 手机：顶部信息条横排会溢出，收到汉堡菜单里，不在首屏占位 */
  .cst-topbar{display:none;}
}

/* ==========================================================================
   6. 顶部导航 mega 面板：仿腾讯云通栏大盘（沿用旧模板四大分类）
   仅桌面端生效，移动端继续走 cst-mega.css 的静态堆叠
   ========================================================================== */
@media (min-width: 992px) {

  /* 6.1 面板拉出容器，铺满视口
     ⚠ 不能用 100vw：100vw 包含竖向滚动条宽度（Windows 经典滚动条约 15px），
     会把页面撑出横向滚动条。改用「以 .cst-masthead 为定位容器 + left/right:0」。 */
  .cst-masthead__inner{
    position: static !important;
  }
  .cst-mega-panel{
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding-top: 0;
  }
  .cst-mega-body{
    background: #fff;
    border: 0;
    border-top: 1px solid #e9f0fa;
    border-bottom: 1px solid #e6edf7;
    border-radius: 0;
    box-shadow: 0 26px 44px -30px rgba(15,47,92,.30);
  }

  /* 6.2 内层与导航同宽同边距 */
  .cst-mega-panel__inner{
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    min-height: 0;
    align-items: stretch;
  }

  /* 6.3 左侧分类列 */
  .cst-mega-tabs{
    flex: 0 0 216px;
    background: #fff;
    border-right: 1px solid #eef3fa;
    padding: 24px 24px 24px 0;
    gap: 0;
  }
  .cst-mega-tab{
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14.5px;
    color: #33415c;
  }
  .cst-mega-tab.is-active{
    background: #eef4ff;
    color: var(--cst-brand);
    box-shadow: none;
  }
  /* 点击后浏览器默认的黑框要去掉，换成自己控制的聚焦态 */
  .cst-mega-tab:focus{outline: none;}
  .cst-mega-tab:focus-visible{
    outline: 2px solid rgba(0,82,217,.35);
    outline-offset: 2px;
  }

  /* 6.4 右侧产品区：三列网格（腾讯云用的就是三列） */
  .cst-mega-panes{
    padding: 26px 0 24px 34px;
  }
  .cst-mega-pane.is-active{
    grid-template-columns: repeat(3, 1fr);
    column-gap: 34px;
  }
  .cst-mega-pane__title{
    font-size: 12px;
    letter-spacing: .08em;
    color: #98a6ba;
    margin: 2px 0 12px;
  }
  .cst-mega-link{
    margin: 0 -10px;
    padding: 11px 30px 11px 10px;
    border-radius: 6px;
  }
  .cst-mega-link__name{
    display: block;
    font-size: 14.5px;
    font-weight: 500;
    color: #0d1526;
    line-height: 1.5;
  }
  .cst-mega-link__desc{
    display: block;
    font-size: 12.5px;
    line-height: 1.65;
    color: #8b98ad;
    margin-top: 4px;
  }
  .cst-mega-link:hover .cst-mega-link__name{color: var(--cst-brand);}

  /* 6.5 底部条：铺满，文字与内容区对齐（用百分比，不用 100vw） */
  .cst-mega-panel__foot{
    background: #f7faff;
    border-top: 1px solid #eef3fa;
    padding: 12px max(40px, calc((100% - 1600px) / 2 + 40px));
    font-size: 12px;
    color: #6b7c96;
  }
}

/* ==========================================================================
   7. 首屏热销卡 + 数据条：纯 CSS 动效
   ========================================================================== */

/* ---------- 7.1 热销卡：渐变描边 + 入场 + 悬停抬升 ---------- */
body.cst-home .cst-hero__card{
  position: relative;
  border: 1px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(140deg, rgba(0,82,217,.30), rgba(0,82,217,.05) 42%, rgba(0,82,217,.24)) border-box;
  box-shadow: 0 20px 46px -26px rgba(12,32,64,.35);
  transition: transform .4s cubic-bezier(.21,.68,.32,1), box-shadow .4s ease;
  animation: cstCardIn .7s cubic-bezier(.21,.68,.32,1) both;
}
body.cst-home .cst-hero__card:hover{
  transform: translateY(-6px);
  box-shadow: 0 34px 64px -30px rgba(12,32,64,.5);
}
@keyframes cstCardIn{
  from{opacity:0;transform:translateY(16px);}
  to{opacity:1;transform:none;}
}

/* ---------- 7.2 「热销产品」徽章：微光扫过 ---------- */
body.cst-home .cst-hero__card-tag{
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #0052d9 0%, #1f7bff 100%);
}
body.cst-home .cst-hero__card-tag::after{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-150%) skewX(-18deg);
  animation: cstShine 4.2s ease-in-out infinite;
}
@keyframes cstShine{
  0%, 60%   { transform: translateX(-150%) skewX(-18deg); }
  88%, 100% { transform: translateX(330%) skewX(-18deg); }
}

/* ---------- 7.3 标题下渐变短线 ---------- */
body.cst-home .cst-hero__card-title{
  position: relative;
  display: block;
  width: fit-content;
  padding-bottom: 8px;
}
body.cst-home .cst-hero__card-title::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #0052d9 0%, rgba(0,82,217,0) 92%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.21,.68,.32,1);
}
body.cst-home .cst-hero__card:hover .cst-hero__card-title::after{ transform: scaleX(1); }

/* ---------- 7.4 卖点列表：圆形勾选 + 依次入场 ---------- */
body.cst-home .cst-hero__card-list li{
  animation: cstItemIn .5s ease both;
}
body.cst-home .cst-hero__card-list li:nth-child(1){ animation-delay: .16s; }
body.cst-home .cst-hero__card-list li:nth-child(2){ animation-delay: .24s; }
body.cst-home .cst-hero__card-list li:nth-child(3){ animation-delay: .32s; }
body.cst-home .cst-hero__card-list li:nth-child(4){ animation-delay: .40s; }
@keyframes cstItemIn{
  from{opacity:0;transform:translateX(-8px);}
  to{opacity:1;transform:none;}
}
body.cst-home .cst-hero__card-list li > i{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #e6f7ee;
  color: #12a05c !important;
  font-size: 8px;
  margin-right: 8px;
  flex: 0 0 auto;
  transition: transform .3s ease, background-color .3s ease;
}
body.cst-home .cst-hero__card-list li:hover > i{
  background: #d4f0e2;
  transform: scale(1.16) rotate(-8deg);
}

/* ---------- 7.5 卡片底部：主按钮压感 + 箭头位移 ---------- */
body.cst-home .cst-hero__card-foot .cst-btn--primary{
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .3s ease, filter .2s ease;
}
body.cst-home .cst-hero__card-foot .cst-btn--primary:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 24px -12px rgba(0,82,217,.8);
}
body.cst-home .cst-hero__card-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
body.cst-home .cst-hero__card-link > i{ transition: transform .25s ease; }
body.cst-home .cst-hero__card-link:hover > i{ transform: translateX(4px); }

/* ---------- 7.6 数据条：渐变数字 + 悬停高亮 + 顶部光条 ---------- */
body.cst-home .cst-stat{
  position: relative;
  overflow: hidden;
  transition: background-color .35s ease;
}
body.cst-home .cst-stat::before{
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 72px; height: 2px;
  margin-left: -36px;
  background: linear-gradient(90deg, transparent, #0052d9, transparent);
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .35s ease, transform .35s ease;
}
body.cst-home .cst-stat:hover{ background: #fff; }
body.cst-home .cst-stat:hover::before{
  opacity: 1;
  transform: scaleX(1);
}
body.cst-home .cst-stat__num{
  color: #0e1b2e;
  line-height: 1.15;
  transition: transform .35s cubic-bezier(.21,.68,.32,1), color .3s ease;
}
body.cst-home .cst-stat__num span{
  color: var(--cst-brand);
}
body.cst-home .cst-stat:hover .cst-stat__num{
  transform: translateY(-3px) scale(1.03);
  color: var(--cst-brand);
}
body.cst-home .cst-stat{ animation: cstStatIn .6s ease both; }
body.cst-home .cst-stat:nth-child(1){ animation-delay: .05s; }
body.cst-home .cst-stat:nth-child(2){ animation-delay: .13s; }
body.cst-home .cst-stat:nth-child(3){ animation-delay: .21s; }
body.cst-home .cst-stat:nth-child(4){ animation-delay: .29s; }
@keyframes cstStatIn{
  from{opacity:0;transform:translateY(10px);}
  to{opacity:1;transform:none;}
}

/* ---------- 7.7 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce){
  body.cst-home .cst-hero__card,
  body.cst-home .cst-hero__card-list li,
  body.cst-home .cst-stat,
  body.cst-home .cst-hero__card-tag::after{
    animation: none !important;
  }
  body.cst-home .cst-hero__card:hover,
  body.cst-home .cst-stat:hover .cst-stat__num{
    transform: none;
  }
}

/* ==========================================================================
   8. 登录页 / 注册页（全用 :has() 限定页面，不影响其它页面）
   ========================================================================== */

/* ---------- 8.1 两页公共背景 ---------- */
body:has(.login-form),
body:has(#registration){
  background: #eef4fd;
}
body:has(.login-form)::before,
body:has(#registration)::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 420px at 78% -6%, rgba(0,82,217,.10), transparent 62%),
    radial-gradient(640px 380px at 10% 8%, rgba(0,176,216,.08), transparent 60%),
    linear-gradient(180deg,#f8fbff 0%,#ffffff 60%);
  pointer-events: none;
}

/* ---------- 8.2 登录卡片 ---------- */
.login-form{
  margin: 64px auto 48px;
  max-width: 464px;
}
.login-form .card.mw-540{
  max-width: none;
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(140deg, rgba(0,82,217,.26), rgba(0,82,217,.04) 46%, rgba(0,82,217,.20)) border-box;
  box-shadow: 0 30px 66px -34px rgba(12,32,64,.42);
}
.login-form .card-body{
  padding: 40px 42px 34px !important;
}
.login-form .card-body > .mb-4:first-child h6.h3{
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.login-form .card-body > .mb-4:first-child p{
  font-size: 13.5px;
  color: #8595aa !important;
}
.login-form .form-control-label{
  font-size: 13px;
  font-weight: 500;
  color: #33415c;
  margin-bottom: 6px;
}
.login-form .input-group-merge{
  border: 1px solid #e3eaf6;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.login-form .input-group-merge:focus-within{
  border-color: #9dc0ff;
  box-shadow: 0 0 0 3px rgba(0,82,217,.12);
}
.login-form .input-group-prepend .input-group-text,
.login-form .input-group-append .btn{
  height: 46px;
  border: 0 !important;
  background: #f5f8ff !important;
  color: #8ea2bf !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}
.login-form .input-group-prepend .input-group-text{
  border-right: 1px solid #edf2fa !important;
}
.login-form .input-group-merge .form-control{
  height: 46px;
  border: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  font-size: 14.5px;
  padding-left: 14px;
}
.login-form .btn-primary{
  min-width: 168px;
  height: 46px;
  border: 0;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(90deg,#0052d9 0%,#2f7bff 100%);
  box-shadow: 0 14px 28px -16px rgba(0,82,217,.9);
  transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
}
.login-form .btn-primary:hover{
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: 0 18px 34px -16px rgba(0,82,217,.95);
}
.login-form .card-footer{
  background: #f8faff;
  border-top: 1px solid #eef3fa;
  padding: 16px 42px;
  font-size: 13px;
  color: #7b8a9e;
}
.login-form .card-footer a{
  font-weight: 500;
  margin-left: 4px;
}
.login-form .card-footer a:hover{ text-decoration: none; }

/* ---------- 8.3 注册页 ---------- */
body:has(#registration){ margin-top: 8px; }
body:has(#registration) .card{
  border: 1px solid #e8eef7;
  border-radius: 14px;
  box-shadow: 0 14px 34px -28px rgba(12,32,64,.30);
  margin-bottom: 18px !important;
  /* 不能用 overflow:hidden，否则会把手机的区号下拉列表裁掉 */
  overflow: visible;
}
body:has(#registration) .card-body{ padding: 26px 30px 22px !important; }
body:has(#registration) .card-title{
  position: relative;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.2px;
  color: #0e1b2e;
  padding-left: 14px;
  margin-bottom: 20px !important;
}
body:has(#registration) .card-title::before{
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 16px;
  margin-top: -8px;
  border-radius: 2px;
  background: linear-gradient(180deg,#0052d9,#3f8cff);
}
body:has(#registration) .form-group:not(.prepend-icon) input.field,
body:has(#registration) .form-group:not(.prepend-icon) input.form-control,
body:has(#registration) .form-group:not(.prepend-icon) input[type="password"],
body:has(#registration) .form-group:not(.prepend-icon) input[type="text"],
body:has(#registration) .form-group > select{
  width: 100% !important;
  height: 44px;
  border: 1px solid #e3eaf6;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #0e1b2e;
  padding: 0 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
body:has(#registration) .form-group:not(.prepend-icon) input.field:focus,
body:has(#registration) .form-group:not(.prepend-icon) input.form-control:focus,
body:has(#registration) .form-group:not(.prepend-icon) input[type="password"]:focus,
body:has(#registration) .form-group > select:focus{
  border-color: #9dc0ff;
  box-shadow: 0 0 0 3px rgba(0,82,217,.12);
  outline: none;
}
/* 密码框与手机框：它们是 .prepend-icon > input.field（没有 form-control），
   主题默认只给 width:auto，所以上半截像小方框，这里补全尺寸与圆角 */
body:has(#registration) .form-group.prepend-icon input.field{
  width: 100% !important;
  height: 44px;
  border: 1px solid #e3eaf6 !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 14px;
  color: #0e1b2e;
  padding: 0 14px 0 40px !important;
  box-shadow: none !important;
}
body:has(#registration) .form-group.prepend-icon input.field:focus{
  border-color: #9dc0ff !important;
  box-shadow: 0 0 0 3px rgba(0,82,217,.12) !important;
  outline: none;
}
/* 图标盒：锁定为「输入框左上角 44×44 居中」，不管有没有 label 都能对齐 */
body:has(#registration) .form-group.prepend-icon{
  position: relative;
}
body:has(#registration) .form-group.prepend-icon .field-icon{
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  color: #8ea2bf;
  font-size: 13px;
  pointer-events: none;
}
/* 手机号有旗子与国码，模板自带的小电话图标会与插件重叠，直接隐藏 */
body:has(#registration) .form-group.prepend-icon:has(.intl-tel-input) .field-icon{
  display: none !important;
}
/* 用 ID 锁定内边距：普通字段 44px（让开图标盒），手机号 90px（让开国旗与国码） */
body:has(#registration) #inputFirstName,
body:has(#registration) #inputLastName,
body:has(#registration) #inputEmail,
body:has(#registration) #inputNewPassword1,
body:has(#registration) #inputNewPassword2,
body:has(#registration) #inputCompanyName,
body:has(#registration) #inputAddress1,
body:has(#registration) #inputAddress2,
body:has(#registration) #inputCity,
body:has(#registration) #inputPostcode,
body:has(#registration) #inputTaxId{
  padding-left: 44px !important;
}
body:has(#registration) #inputPhone{
  padding-left: 90px !important;
  background: #fff !important;
  border-color: #e3eaf6 !important;
}
/* 手机号那块的灰底统一成白底 */
body:has(#registration) .input-group{
  background: #fff !important;
  border-radius: 8px;
}
body:has(#registration) .form-group.prepend-icon{
  background: transparent !important;
}
/* 手机号实际是被 intl-tel-input 插件包住的，灰底来自插件容器 */
body:has(#registration) .intl-tel-input{
  width: 100% !important;
  background: #fff !important;
  border: 1px solid #e3eaf6 !important;
  border-radius: 8px !important;
  /* 不能裁切：下拉列表是绝对定位在它里面的 */
  overflow: visible !important;
}
body:has(#registration) .intl-tel-input .flag-container{
  border-radius: 8px 0 0 8px !important;
  cursor: pointer !important;
  z-index: 3 !important;
}
body:has(#registration) .intl-tel-input .country-list{
  z-index: 1200 !important;
  margin-top: 6px !important;
  max-height: 240px !important;
  background: #fff !important;
  border: 1px solid #e3eaf6 !important;
  border-radius: 10px !important;
  box-shadow: 0 18px 40px -20px rgba(12,32,64,.4) !important;
}
body:has(#registration) .intl-tel-input input,
body:has(#registration) .intl-tel-input input.form-control{
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 42px !important;
  font-size: 14px !important;
  color: #0e1b2e !important;
}
body:has(#registration) .intl-tel-input .selected-dial-code{
  background: #fff !important;
  color: #33415c !important;
  font-size: 13px !important;
}
body:has(#registration) .intl-tel-input .flag-container{
  background: #fff !important;
  border-right: 1px solid #eef2f8 !important;
}
body:has(#registration) .intl-tel-input .country-list{
  border-radius: 8px;
  box-shadow: 0 18px 36px -20px rgba(12,32,64,.35);
}
/* 验证码输入框（id 是 inputCaptcha，name 是 code） */
body:has(#registration) #inputCaptcha{
  width: 200px !important;
  height: 44px !important;
  border: 1px solid #e3eaf6 !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 0 14px !important;
  font-size: 16px !important;
  letter-spacing: 2px;
  box-shadow: none !important;
}
body:has(#registration) #inputCaptcha:focus{
  border-color: #9dc0ff !important;
  box-shadow: 0 0 0 3px rgba(0,82,217,.12) !important;
  outline: none;
}
body:has(#registration) #inputCaptchaImage{
  border-radius: 8px;
  border: 1px solid #e3eaf6;
}
/* 协议勾选框 */
body:has(#registration) .form-check-input{
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0052d9;
  vertical-align: -2px;
}
/* 密码强度条与提示 */
body:has(#registration) .password-strength-meter,
body:has(#registration) #passwordStrengthText{
  font-size: 12.5px;
}
body:has(#registration) .input-group .form-control,
body:has(#registration) .input-group-text{
  background: #fff !important;
  border-color: #e3eaf6 !important;
}
/* 占位文字别太淡 */
body:has(#registration) input::placeholder{
  color: #98a6ba;
  opacity: 1;
}
/* 生成密码按钮 */
body:has(#registration) .generate-password{
  height: 38px;
  padding: 0 16px;
  border: 1px solid #d7e2f4;
  border-radius: 8px;
  background: #fff;
  color: #2f6bd8;
  font-size: 13.5px;
  transition: all .2s ease;
}
body:has(#registration) .generate-password:hover{
  background: #eef4ff;
  border-color: #9dc0ff;
}
body:has(#registration) .form-group label:not(.field-icon){
  font-size: 13px;
  font-weight: 500;
  color: #33415c;
}
body:has(#registration) .password-strength-meter,
body:has(#registration) .progress{
  border-radius: 4px;
  overflow: hidden;
  background: #eef3fa;
}
body:has(#registration) .btn-primary{
  min-width: 180px;
  height: 46px;
  border: 0;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(90deg,#0052d9 0%,#2f7bff 100%);
  box-shadow: 0 14px 28px -16px rgba(0,82,217,.9);
  transition: transform .2s ease, filter .2s ease;
}
body:has(#registration) .btn-primary:hover{
  transform: translateY(-1px);
  filter: brightness(1.07);
}

/* 订阅邮件开关：插件把内联宽度算死（handle 11px / label 27px），
   不去纠正它的内部布局，直接在 .bootstrap-switch 容器上重画一颗胶囊 */
body:has(#registration) .bootstrap-switch{
  position: relative !important;
  display: inline-block !important;
  width: 48px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #dfe7f2 !important;
  box-shadow: inset 0 0 0 1px rgba(12,32,64,.07) !important;
  overflow: hidden !important;
  cursor: pointer;
  vertical-align: middle;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-on{
  background: linear-gradient(90deg,#0052d9 0%,#2f7bff 100%) !important;
}
body:has(#registration) .bootstrap-switch::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(12,32,64,.35);
  transition: left .22s cubic-bezier(.21,.68,.32,1);
  pointer-events: none;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-on::after{
  left: 23px;
}
/* 插件内部变成一层透明的可点击热区，保留 input 以维持状态与提交 */
body:has(#registration) .bootstrap-switch .bootstrap-switch-container{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  opacity: 0 !important;
}
body:has(#registration) .bootstrap-switch .bootstrap-switch-container input{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  cursor: pointer;
}

/* ---------- 8.4 中小屏 ---------- */
@media (max-width: 767.98px){
  .login-form{ margin: 28px auto 24px; padding: 0 16px; }
  .login-form .card-body{ padding: 28px 22px 24px !important; }
  .login-form .card-footer{ padding: 14px 22px; }
  .login-form .card-body > .mb-4:first-child h6.h3{ font-size: 26px; }
  body:has(#registration) .card-body{ padding: 20px 18px !important; }
}

/* ==========================================================================
   9. 压过 custom.css 里的旧 !important 规则
   custom.css 里有 div#registration .bootstrap-switch... 的宽度 !important
   （44 / 46 / 100px）与 label 41px，带 ID 的权重高于普通类选择器。
   必须同样带 ID，再叠一个属性选择器，才能稳定赢它。
   ========================================================================== */
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper[class]{
  position: relative !important;
  display: inline-block !important;
  width: 48px !important;
  min-width: 0 !important;
  max-width: 48px !important;
  height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #dfe7f2 !important;
  box-shadow: inset 0 0 0 1px rgba(12,32,64,.07) !important;
  overflow: hidden !important;
  vertical-align: middle;
  cursor: pointer;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper.bootstrap-switch-on[class]{
  background: linear-gradient(90deg,#0052d9 0%,#2f7bff 100%) !important;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper[class]::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(12,32,64,.35);
  transition: left .22s cubic-bezier(.21,.68,.32,1);
  pointer-events: none;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper.bootstrap-switch-on[class]::after{
  left: 23px !important;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper[class] .bootstrap-switch-container{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  opacity: 0 !important;
}
body:has(#registration) .bootstrap-switch.bootstrap-switch-small.bootstrap-switch-wrapper[class] .bootstrap-switch-container input{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  cursor: pointer;
}

/* ==========================================================================
   10. 客户区：顶部导航 + 左侧导航 + 内容
   靠 body:has(#main-body .sidebar) 识别「带侧栏的客户区页面」，
   购物车等无侧栏页面不受影响。
   ========================================================================== */
@media (min-width: 768px){

  /* 10.1 拆掉容器，让左栏贴到视口左边 */
  body:has(#main-body .sidebar) #main-body > .container{
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body:has(#main-body .sidebar) #main-body > .container > .row{
    display: flex;
    flex-wrap: nowrap;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: stretch;
  }

  /* 10.2 左栏：240px 固定，白底 + 右侧细线，通高 */
  body:has(#main-body .sidebar) #main-body > .container > .row > .col-lg-4{
    display: block !important;
    flex: 0 0 240px !important;
    width: 240px !important;
    max-width: 240px !important;
    padding: 0 !important;
    background: #fff;
    border-right: 1px solid #e8eef7;
    min-height: calc(100vh - 64px);
  }

  /* 10.3 内容区：浅灰底，白卡片浮在上面 */
  body:has(#main-body .sidebar) #main-body > .container > .row > .primary-content{
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding: 26px 32px 56px !important;
    background: #f5f8fd;
    min-height: calc(100vh - 64px);
  }

  /* 10.4 侧栏内导航：去掉“卡片套卡片”的观感 */
  body:has(#main-body .sidebar) .sidebar{
    padding: 14px 0 20px;
  }
  body:has(#main-body .sidebar) .sidebar .card-sidebar{
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-bottom: 4px !important;
  }
  body:has(#main-body .sidebar) .sidebar .card-header{
    background: transparent !important;
    border: 0 !important;
    padding: 14px 20px 8px !important;
  }
  body:has(#main-body .sidebar) .sidebar .card-title{
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #97a4b7;
  }
  body:has(#main-body .sidebar) .sidebar .card-minimise{
    display: none !important;
  }
  body:has(#main-body .sidebar) .sidebar .list-group-item{
    position: relative;
    display: flex;
    align-items: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    padding: 9px 18px 9px 20px !important;
    font-size: 14px;
    color: #33415c;
    transition: background-color .18s ease, color .18s ease;
  }
  body:has(#main-body .sidebar) .sidebar .list-group-item:hover{
    background: #f6f9ff !important;
    color: var(--cst-brand) !important;
  }
  body:has(#main-body .sidebar) .sidebar .list-group-item.active{
    background: #eef5ff !important;
    color: var(--cst-brand) !important;
    font-weight: 500;
  }
  body:has(#main-body .sidebar) .sidebar .list-group-item.active::before{
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--cst-brand);
  }
  body:has(#main-body .sidebar) .sidebar-menu-item-wrapper{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  body:has(#main-body .sidebar) .sidebar-menu-item-icon-wrapper{
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b98ad;
    font-size: 13px;
  }
  body:has(#main-body .sidebar) .sidebar .list-group-item.active .sidebar-menu-item-icon-wrapper{
    color: var(--cst-brand);
  }
  body:has(#main-body .sidebar) .sidebar-menu-item-label{
    flex: 1 1 auto;
    min-width: 0;
  }
  body:has(#main-body .sidebar) .sidebar-menu-item-badge .badge{
    background: var(--cst-brand);
    font-weight: 400;
  }
}

/* 10.5 内容区卡片统一圆角与边框 */
body:has(#main-body .sidebar) .primary-content .card{
  border: 1px solid #e8eef7;
  border-radius: 12px;
  box-shadow: 0 10px 26px -22px rgba(12,32,64,.28);
  overflow: hidden;
}
body:has(#main-body .sidebar) .primary-content .card-header{
  background: #fff;
  border-bottom: 1px solid #eef3fa;
}

/* 10.6 统一左侧导航（includes/cst-clientnav.tpl） */
.cst-cnav{
  padding: 14px 0 20px;
  background: #fff;
}
.cst-cnav__menu{ display: block; }
.cst-cnav__grp{
  display: block;
  padding: 14px 20px 8px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97a4b7;
}
.cst-cnav__item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 14px;
  color: #33415c;
  transition: background-color .16s ease, color .16s ease;
}
.cst-cnav__item i{
  width: 18px;
  text-align: center;
  color: #8b98ad;
  font-size: 13px;
}
.cst-cnav__item em{
  margin-left: auto;
  font-style: normal;
  background: var(--cst-brand);
  color: #fff;
  font-size: 11px;
  line-height: 1.6;
  padding: 1px 6px;
  border-radius: 10px;
}
.cst-cnav__item em.is-warn{ background: #e5484d; }
.cst-cnav__item:hover{
  background: #f6f9ff;
  color: var(--cst-brand);
}
.cst-cnav__item:hover i{ color: var(--cst-brand); }
.cst-cnav__item.is-active{
  background: #eef5ff;
  color: var(--cst-brand);
  font-weight: 500;
}
.cst-cnav__item.is-active i{ color: var(--cst-brand); }
.cst-cnav__item.is-active::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--cst-brand);
}
.cst-cnav__out{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 20px 0;
  padding-top: 14px;
  border-top: 1px solid #eef3fa;
  font-size: 13.5px;
  color: #8b98ad;
}
.cst-cnav__out:hover{ color: #e5484d; }

/* 10.7 首页旧的自建侧栏让位给统一导航 */
body:has(#cstClientNav) .cvd-nav{ display: none !important; }
body:has(#cstClientNav) .cvd-shell{ display: block !important; }

/* 10.8 页面级筛选侧栏：跟统一导航保持同一观感 */
/* 第二个 .sidebar 是 WHMCS 的账户信息块，与导航重复，隐藏 */
body:has(#cstClientNav) #main-body .row > div > .sidebar ~ .sidebar{
  display: none !important;
}
/* 侧栏里“只有说明文字、没有菜单列表”的信息卡（如“您的信息”）隐藏，保留筛选列表 */
body:has(#cstClientNav) #main-body .sidebar .card-sidebar:has(.card-body):not(:has(.list-group)){
  display: none !important;
}
/* 状态筛选前的圆点图标去掉，只留文字 */
body:has(#cstClientNav) #main-body .sidebar .list-group-item i.fa-circle,
body:has(#cstClientNav) #main-body .sidebar .list-group-item i.fas.fa-circle{
  display: none !important;
}
body:has(#cstClientNav) #main-body .sidebar .list-group-item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px !important;
  border: 0 !important;
  font-size: 13.5px;
  color: #5a6b85;
}
body:has(#cstClientNav) #main-body .sidebar .list-group-item:hover{
  background: #f6f9ff !important;
  color: var(--cst-brand) !important;
}
body:has(#cstClientNav) #main-body .sidebar .list-group-item.active{
  background: #eef5ff !important;
  color: var(--cst-brand) !important;
  font-weight: 500;
}
body:has(#cstClientNav) #main-body .sidebar .list-group-item .badge{
  margin-left: auto;
  background: #eef4ff !important;
  color: var(--cst-brand) !important;
  border-radius: 10px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 500;
}
body:has(#cstClientNav) #main-body .sidebar .card-header{
  padding: 14px 20px 6px !important;
}
body:has(#cstClientNav) #main-body .sidebar .card-title{
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97a4b7;
}

@media (max-width: 767.98px){
  .cst-cnav{ display: none; }
}

/* ==========================================================================
   11. 客户区视觉收敛：面包屑、内容内边距、表格卡片
   ========================================================================== */
@media (min-width: 768px){
  /* 去掉 #main-body 自带的上下 padding，间距交给内容列统一控制 */
  body:has(#cstClientNav) #main-body{
    padding: 0 !important;
    background: #f5f8fd !important;
  }
  /* 面包屑：透明、无边框、与内容左边界对齐 */
  body:has(#cstClientNav) #main-body .breadcrumb{
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 16px 0 2px !important;
    font-size: 13px;
    color: #93a1b5;
  }
  body:has(#cstClientNav) .primary-content{
    padding: 0 clamp(20px, 2.4vw, 40px) 56px !important;
  }
  /* 内容区第一个块的上间距，避免贴住面包屑 */
  body:has(#cstClientNav) .primary-content > *:first-child{
    margin-top: 12px;
  }
  /* 表格：包成白卡片 */
  body:has(#cstClientNav) .primary-content .table-container{
    background: #fff;
    border: 1px solid #e8eef7;
    border-radius: 12px;
    padding: 2px 10px 10px;
    box-shadow: 0 12px 30px -26px rgba(12,32,64,.32);
    overflow: hidden;
  }
  body:has(#cstClientNav) .primary-content .table-container .table{
    margin-bottom: 0;
  }
  body:has(#cstClientNav) .primary-content .table-container thead th{
    background: #fafcff;
    border-bottom: 1px solid #eef3fa;
    font-size: 12.5px;
    color: #78889e;
    font-weight: 500;
  }
}

/* 侧栏导航的呼吸感 */
.cst-cnav{
  padding: 12px 8px 18px;
}
.cst-cnav__grp{
  padding: 16px 12px 8px;
}
.cst-cnav__item{
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 8px;
  margin: 1px 0;
}
.cst-cnav__item.is-active::before{
  left: -8px;
  top: 50%;
  bottom: auto;
  height: 18px;
  margin-top: -9px;
}
.cst-cnav__out{
  margin: 14px 12px 0;
}

/* ==========================================================================
   12. E1 设计系统落地（数据概览 / 我的服务 / 服务详情）
   ========================================================================== */

/* 12.1 侧栏固定 232，与设计稿一致 */
@media (min-width: 768px){
  body:has(#main-body .sidebar) #main-body > .container > .row > .col-lg-4{
    flex: 0 0 232px !important;
    width: 232px !important;
    max-width: 232px !important;
  }
}

/* 12.2 状态徽标 → 胶囊（把 WHMCS 的 badge 统一成胶囊样式） */
body:has(#cstClientNav) .primary-content .badge{
  border-radius: 20px;
  font-size: 12px;
  font-weight: 400;
  padding: 2px 9px;
  line-height: 1.6;
}
body:has(#cstClientNav) .primary-content .badge-success,
body:has(#cstClientNav) .primary-content .badge.badge-success{
  background: #e8f7ef;
  color: #12a05c;
}
body:has(#cstClientNav) .primary-content .badge-warning,
body:has(#cstClientNav) .primary-content .badge.badge-warning{
  background: #fff4e6;
  color: #b25e09;
}
body:has(#cstClientNav) .primary-content .badge-danger,
body:has(#cstClientNav) .primary-content .badge.badge-danger{
  background: #fdecec;
  color: #e5484d;
}
body:has(#cstClientNav) .primary-content .badge-info,
body:has(#cstClientNav) .primary-content .badge.badge-info{
  background: #eef5ff;
  color: #0052d9;
}
body:has(#cstClientNav) .primary-content .badge-secondary,
body:has(#cstClientNav) .primary-content .badge.badge-secondary{
  background: #f1f4f9;
  color: #8b98ad;
}

/* 12.3 概览页指标卡：元素级限宽 + 圆角统一 */
body:has(#cstClientNav) .cvd-stats{
  grid-template-columns: repeat(4, minmax(0, 260px)) !important;
}
body:has(#cstClientNav) .cvd-stat{
  border-radius: 12px;
}
body:has(#cstClientNav) .cvd-card{
  border-radius: 12px;
}

/* 12.4 表格操作链接 / 按钮间距 */
body:has(#cstClientNav) .primary-content .table td .btn{
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 7px;
}

/* 12.5 分页块（WHMCS 用 DataTables 的 .paginate_button） */
body:has(#cstClientNav) .primary-content .dataTables_paginate .paginate_button{
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  margin-left: 6px;
  border: 1px solid #e8eef7 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #4a5a73 !important;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body:has(#cstClientNav) .primary-content .dataTables_paginate .paginate_button:hover{
  border-color: #c9d8ee !important;
  color: #0052d9 !important;
}
body:has(#cstClientNav) .primary-content .dataTables_paginate .paginate_button.current{
  background: #eef5ff !important;
  border-color: #0052d9 !important;
  color: #0052d9 !important;
}
body:has(#cstClientNav) .primary-content .dataTables_paginate .paginate_button.disabled{
  color: #c3ccd9 !important;
}

/* ==========================================================================
   13. 密度收紧（对标 kvmlo：卡片等分铺满 + 整壳限宽居中 + 横幅压缩）
   ========================================================================== */
@media (min-width: 768px){
  /* 侧栏 + 内容作为一个整体限宽居中，超宽屏两侧对称留白，不再出现「右边空一条」 */
  body:has(#cstClientNav) #main-body > .container[class]{
    max-width: 1720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* 13.1 指标卡恢复四列等分铺满，与下面的卡片对齐同一网格边 */
body:has(#cstClientNav) .cvd-stats{
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
body:has(#cstClientNav) .cvd-stat{
  padding: 13px 16px 14px !important;
}

/* 13.2 顶部深蓝横幅压缩：高度砍掉一半，标题降一级 */
body:has(#cstClientNav) .cvd-head{
  padding: 16px 20px !important;
  gap: 12px !important;
}
body:has(#cstClientNav) .cvd-head__txt h1{
  font-size: 18px !important;
}
body:has(#cstClientNav) .cvd-head__txt p{
  font-size: 12px !important;
  margin-top: 2px !important;
}

/* 13.3 卡片与间距收紧 */
body:has(#cstClientNav) .cvd-grid{
  gap: 12px !important;
}
body:has(#cstClientNav) .cvd-card{
  padding: 14px 18px 16px !important;
}
body:has(#cstClientNav) .cvd-card__hd h2{
  font-size: 13.5px !important;
}
/* 无数据时不要撑那么高 */
body:has(#cstClientNav) .cvd-empty{
  padding: 22px 10px !important;
  font-size: 12.5px !important;
}

/* 13.4 表格行高收紧 */
body:has(#cstClientNav) .primary-content .table th{
  padding: 9px 16px !important;
}
body:has(#cstClientNav) .primary-content .table td{
  padding: 10px 16px !important;
}

/* ==========================================================================
   14. 选购页（orderforms/cst_cart 共享目录）
   作用域用 #order-standard_cart（订单页的结构性容器），
   不依赖 body 上的主题标记，将来复制主题也不会失灵。
   — 方案 D：每个分类一行横向卡片
   — 去掉产品介绍下方的四组小方块
   ========================================================================== */

/* 14.1 去掉四组小方块（保留标题 / 测试 IP / 介绍词） */
#order-standard_cart .tc-intro__grid{
  display: none !important;
}

/* 14.2 分类内的产品：纵向列表 → 横向卡片排 */
#order-standard_cart .tc-pnav__items{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px !important;
  padding: 2px 0 6px !important;
}
#order-standard_cart .tc-pnav__item{
  flex: none !important;
  height: 56px;
  min-width: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 14px !important;
  border: 1px solid #e8eef7 !important;
  border-radius: 9px !important;
  background: #fff !important;
  text-decoration: none !important;
  transition: border-color .16s ease, background-color .16s ease;
}
#order-standard_cart .tc-pnav__item:hover{
  border-color: #cfe0ff !important;
  background: #f8fbff !important;
}
#order-standard_cart .tc-pnav__item.is-active{
  border-color: #0052d9 !important;
  background: #eef5ff !important;
}
#order-standard_cart .tc-pnav__iname{
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #0e1b2e !important;
  line-height: 1.35;
}
#order-standard_cart .tc-pnav__item.is-active .tc-pnav__iname{
  color: #0052d9 !important;
}
#order-standard_cart .tc-pnav__isub{
  font-size: 11.5px !important;
  color: #8b98ad !important;
  line-height: 1.3;
}
#order-standard_cart .tc-pnav__glabel{
  font-size: 11px !important;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8b98ad !important;
  margin: 10px 0 7px !important;
}
#order-standard_cart .tc-pnav__group{
  margin: 0 0 2px !important;
}

/* 14.4 顶部选择条：不吸顶、不跟随滚动 */
#order-standard_cart .tc-pnav,
#order-standard_cart #tcPnav{
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* 14.5 只保留地区胶囊：去掉当前产品名与“共 N 款” */
#order-standard_cart .tc-pnav__cur,
#order-standard_cart .tc-pnav__count,
#order-standard_cart .tc-pnav__sep{
  display: none !important;
}

/* ==========================================================================
   15. 上线护栏：手机端横向裁切
   移动端侧边抽屉（#cstNav）弹出前会超出视口 33px，把 scrollWidth 撑大。
   用 overflow-x:clip（不是 hidden，clip 不会创建滚动容器，不影响 position:sticky）
   ========================================================================== */
html{
  overflow-x: clip;
}

/* ==========================================================================
   14.6 方案 A：选择区做窄条，只包内容、左对齐
   — 容器 width:fit-content，避开「铺满但填不满」的空白感
   ========================================================================== */
#order-standard_cart .tc-pnav{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex-wrap: nowrap !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
}
#order-standard_cart .tc-pnav__regions{
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px !important;
  margin: 0 0 10px !important;
}
#order-standard_cart .tc-pnav__panel{
  flex: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* 分类：标签在左、卡片在右，同一行 */
#order-standard_cart .tc-pnav__group{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 6px !important;
}
#order-standard_cart .tc-pnav__group:last-child{
  margin-bottom: 0 !important;
}
#order-standard_cart .tc-pnav__glabel{
  width: 72px !important;
  flex: 0 0 72px !important;
  margin: 0 !important;
  text-align: left !important;
}
#order-standard_cart .tc-pnav__items{
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 0 !important;
}
#order-standard_cart .tc-pnav__item{
  flex: 0 0 216px !important;
  width: 216px !important;
  height: auto !important;
  min-height: 56px !important;
  padding: 8px 13px !important;
}
#order-standard_cart .tc-pnav__iname{
  line-height: 1.35 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 14.7 间距放宽：容器内边距、地区与分组间隔、标签与卡片间距 */
#order-standard_cart .tc-pnav{
  padding: 16px 20px !important;
}
#order-standard_cart .tc-pnav__regions{
  gap: 8px !important;
  margin: 0 0 16px !important;
}
#order-standard_cart .tc-pnav__group{
  gap: 16px !important;
  margin: 0 0 10px !important;
}
#order-standard_cart .tc-pnav__glabel{
  width: 80px !important;
  flex: 0 0 80px !important;
}
#order-standard_cart .tc-pnav__item{
  min-height: 62px !important;
  padding: 10px 14px !important;
}

/* ==========================================================================
   17. 我的服务：行内「管理」下拉菜单
   用 <details> 实现：桌面可点、手机可点，无需 JS
   ========================================================================== */
/* 下拉要能溢出卡片，否则被 .table-container / .listtable 裁掉 */
@media (min-width: 992px){
  body:has(#main-body .sidebar) #main-body .table-container,
  body:has(#main-body .sidebar) #main-body .listtable{
    overflow: visible !important;
  }
}
/* 去掉 overflow:hidden 后补回表头/表尾切角 */
body:has(#main-body .sidebar) #main-body .table-container thead tr:first-child th:first-child{
  border-top-left-radius: 12px;
}
body:has(#main-body .sidebar) #main-body .table-container thead tr:first-child th:last-child{
  border-top-right-radius: 12px;
}
body:has(#main-body .sidebar) #main-body .table-container tbody tr:last-child td:first-child{
  border-bottom-left-radius: 12px;
}
body:has(#main-body .sidebar) #main-body .table-container tbody tr:last-child td:last-child{
  border-bottom-right-radius: 12px;
}

.cst-acts{
  position: relative;
  display: inline-block;
  text-align: left;
}
.cst-acts > summary{
  list-style: none;
  cursor: pointer;
}
.cst-acts > summary::-webkit-details-marker{ display: none; }
.cst-acts > summary::marker{ content: ""; }
.cst-acts__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 96px;
  padding: 0 20px;
  border: 1px solid #dbe4f2;
  border-radius: 9px;
  background: #fff;
  color: #33415c;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.cst-acts__btn i{
  font-size: 11px;
  color: #8b98ad;
  transition: transform .2s ease, color .2s ease;
}
.cst-acts__btn:hover{
  border-color: #0052d9;
  color: #0052d9;
  background: #f8fbff;
  box-shadow: 0 6px 16px -10px rgba(0,82,217,.6);
}
.cst-acts__btn:hover i{ color: #0052d9; }
.cst-acts[open] > .cst-acts__btn{
  border-color: #0052d9;
  color: #0052d9;
  background: #eef5ff;
}
.cst-acts[open] > .cst-acts__btn i{
  color: #0052d9;
  transform: rotate(180deg);
}
.cst-acts__menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 172px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e8eef7;
  border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(12,32,64,.35);
}
.cst-acts__menu::before{
  content: "";
  position: absolute;
  top: -5px;
  right: 24px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-left: 1px solid #e8eef7;
  border-top: 1px solid #e8eef7;
  transform: rotate(45deg);
}
.cst-acts__menu a{
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #33415c;
  transition: background-color .15s ease, color .15s ease;
}
.cst-acts__menu a i{
  width: 14px;
  text-align: center;
  font-size: 12px;
  color: #8b98ad;
}
.cst-acts__menu a:hover{
  background: #eef5ff;
  color: #0052d9;
}
.cst-acts__menu a:hover i{ color: #0052d9; }

/* JS 接管定位后固定到视口，不受表格 overflow 裁切 */
.cst-acts__menu.is-floating{
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
}
.cst-acts__menu.is-floating::before{
  display: none;
}

/* 空间不足时向上弹：菜单翻到按钮上方，小三角也跟着翻面 */
.cst-acts--up .cst-acts__menu{
  top: auto;
  bottom: calc(100% + 8px);
}
.cst-acts--up .cst-acts__menu::before{
  top: auto;
  bottom: -5px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
}

/* 窄屏：容器铺满，卡片行内横向滚动，避免溢出 */
@media (max-width: 767.98px){
  #order-standard_cart .tc-pnav{
    width: 100% !important;
  }
  #order-standard_cart .tc-pnav__group{
    align-items: flex-start !important;
  }
  #order-standard_cart .tc-pnav__items{
    overflow-x: auto;
    padding-bottom: 4px !important;
    scrollbar-width: thin;
  }
  #order-standard_cart .tc-pnav__item{
    flex: 0 0 190px !important;
    width: 190px !important;
  }
}

/* ==========================================================================
   16. 客户区窄屏：13 个月柱状图不溢屏
   （原来 13 根柱固定宽度，手机上把 scrollWidth 撑成 423 > 390）
   ========================================================================== */
@media (max-width: 767.98px){
  body:has(#cstClientNav) .cvd-bars{
    gap: 3px !important;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  body:has(#cstClientNav) .cvd-bar{
    min-width: 26px !important;
  }
  /* 指标卡窄屏改两列，否则四列挤成一字一行 */
  body:has(#cstClientNav) .cvd-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body:has(#cstClientNav) .cvd-stat{
    padding: 12px 14px !important;
  }
  body:has(#cstClientNav) .cvd-bar__lbl{
    font-size: 9.5px !important;
  }
  /* 再兜一层：整个概览主体横向裁切，避免任何子元素把文档宽度撑大 */
  body:has(#cstClientNav) .cvd-main{
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  body:has(#cstClientNav) .cvd-grid,
  body:has(#cstClientNav) .cvd-stats{
    max-width: 100% !important;
  }
}

/* 14.3 分类常展开：面板不再收起，回到正常文档流（否则会盖住套餐卡） */
#order-standard_cart .tc-pnav{
  flex-wrap: wrap !important;
  align-items: center !important;
}
#order-standard_cart .tc-pnav__panel,
#order-standard_cart .tc-pnav__panel[hidden]{
  display: block !important;
  position: static !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}
/* 只显示当前地区的分类 */
#order-standard_cart .tc-pnav__pane{
  display: none !important;
}
#order-standard_cart .tc-pnav__pane.is-active{
  display: block !important;
}
/* 当前产品名与下拉箭头不再需要（选中卡片已有高亮） */
#order-standard_cart .tc-pnav__cur{
  cursor: default !important;
  pointer-events: none;
}
#order-standard_cart .tc-pnav__caret{
  display: none !important;
}
