:root{
  --primary:#1677ff;
  --primary-weak:#e6f4ff;
  --accent:#ff4d4f;
  --success:#16a34a;
  --text:#1f2328;
  --muted:#667085;
  --border:#e6e8ec;
  --bg:#f6f7f9;
  --white:#ffffff;
  --shadow-sm:0 1px 6px rgba(16,24,40,.06);
  --shadow:0 2px 10px rgba(16,24,40,.08);
  --shadow-md:0 8px 24px rgba(16,24,40,.10);
  --radius:12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
}
a{color:inherit}
a:hover{color:var(--primary)}
img{max-width:100%;display:block}

.container{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:0 14px;
}

.stack > * + *{margin-top:12px}
.text-lg{font-size:16px}
.text-sm{font-size:13px}
.text-xs{font-size:12px}
.fw-800{font-weight:800}
.fw-700{font-weight:700}
.mt-6{margin-top:6px}
.mt-10{margin-top:10px}
.mt-12{margin-top:12px}
.mt-14{margin-top:14px}
.mb-0{margin-bottom:0}

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:14px;top:12px;width:auto;height:auto;
  background:#000;color:#fff;
  padding:10px 12px;border-radius:8px;
  z-index:999;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--white);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:64px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  min-width:0;
}
.brand:hover{color:inherit}
.brand-logo{
  width:38px;height:38px;
  border-radius:10px;
}
.brand-text{min-width:0}
.brand-name{
  font-size:14px;
  font-weight:700;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:58vw;
}
.brand-sub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:58vw;
}

.nav-toggle{
  width:42px;height:42px;
  border:1px solid var(--border);
  background:var(--white);
  border-radius:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width:18px;height:2px;
  background:#344054;
  border-radius:2px;
}

.nav{
  position:fixed;
  left:0;right:0;
  top:64px;
  background:var(--white);
  border-bottom:1px solid var(--border);
  display:none;
  padding:10px 14px 14px;
  box-shadow:var(--shadow-sm);
}
.nav.open{display:block}
.nav-link{
  display:block;
  padding:12px 10px;
  text-decoration:none;
  border-radius:10px;
  color:#344054;
}
.nav-link.active{
  background:var(--primary-weak);
  color:var(--primary);
  font-weight:700;
}
.nav-link:hover{background:#f3f4f6}

@media (min-width: 900px){
  .nav-toggle{display:none}
  .nav{
    position:static;
    display:flex !important;
    padding:0;
    border:none;
    gap:4px;
    box-shadow:none;
  }
  .nav-link{padding:10px 12px}
  .brand-name,.brand-sub{max-width:none}
}

.main{padding:16px 0 22px}

.card{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card-pad{padding:14px}
.card + .card{margin-top:12px}
.card-flat{
  box-shadow:none;
}
.card-soft{
  background:#fbfcff;
}

.hero{
  padding:16px;
  background:linear-gradient(180deg, var(--primary-weak), #fff);
  border:1px solid var(--border);
  border-radius:var(--radius);
}
.hero-title{
  margin:0;
  font-size:20px;
  line-height:1.35;
}
.hero-sub{
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}
.hero-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  border:1px solid var(--border);
  background:var(--white);
  color:#111827;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
  font-size:14px;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}
.btn-danger{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn-block{width:100%}
.btn:active{transform:translateY(1px)}
.btn:hover{box-shadow:var(--shadow-sm)}
.btn-primary:hover{filter:brightness(.98)}
.btn-danger:hover{filter:brightness(.98)}

.grid{
  display:grid;
  gap:12px;
}
@media (min-width: 900px){
  .grid-2{grid-template-columns:1fr 1fr}
  .grid-3{grid-template-columns:repeat(3,1fr)}
}

.kpi{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}
.kpi-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  min-width:140px;
}
.kpi-num{font-weight:800;font-size:16px}
.kpi-label{color:var(--muted);font-size:12px;margin-top:2px}

.section-title{
  margin:0 0 10px;
  font-size:15px;
}
.muted{color:var(--muted)}
.lead{font-size:14px;line-height:1.75;color:#344054}

.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}
.page-title{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.35;
}
.page-desc{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}

.list{
  margin:0;
  padding-left:18px;
  color:#344054;
}
.list li{margin:6px 0}

.form-row{display:grid;gap:10px}
@media (min-width: 900px){
  .form-row.two{grid-template-columns:1fr 1fr}
}
.field label{
  display:block;
  font-size:12px;
  color:#475467;
  margin-bottom:6px;
}
.input, .select, .textarea{
  width:100%;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:11px 12px;
  font-size:14px;
  outline:none;
}
.textarea{min-height:96px;resize:vertical}
.input:focus, .select:focus, .textarea:focus{
  border-color:rgba(22,119,255,.55);
  box-shadow:0 0 0 4px rgba(22,119,255,.12);
}
.input-error{
  border-color:rgba(255,77,79,.85) !important;
  box-shadow:0 0 0 4px rgba(255,77,79,.12) !important;
}
.help{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  background:var(--primary-weak);
  color:var(--primary);
  font-size:12px;
  font-weight:700;
}
.badge-success{background:#ecfdf3;color:var(--success)}
.badge-danger{background:#fff1f0;color:var(--accent)}
.divider{height:1px;background:var(--border);margin:12px 0}

.amount{
  font-weight:800;
  color:var(--accent);
  letter-spacing:.1px;
}

.pay-method{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.pay-method:hover{border-color:#cfd6df; box-shadow:var(--shadow-sm)}
.pay-method-main{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
}
.pay-icon{
  width:34px;height:34px;
  border-radius:10px;
  background:var(--primary-weak);
  border:1px solid #b6d9ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:var(--primary);
  flex:0 0 auto;
}
.pay-method-title{font-weight:800}
.pay-method-sub{font-size:12px;color:var(--muted);margin-top:2px}

.table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size:13px;
  vertical-align:top;
}
.table th{background:#fafbfc;color:#344054}
.table tr:last-child td{border-bottom:none}
@media (max-width: 520px){
  .table th{width:34%}
}

.footer{
  background:#111827;
  color:#e5e7eb;
  padding:22px 0;
}
.footer-inner{padding:0 14px}
.footer-cols{
  display:grid;
  gap:18px;
}
.footer-title{
  font-weight:800;
  font-size:13px;
  margin-bottom:8px;
}
.footer-link{
  display:block;
  color:#e5e7eb;
  opacity:.92;
  text-decoration:none;
  margin:6px 0;
}
.footer-link:hover{opacity:1;text-decoration:underline}
.footer-text{
  font-size:12px;
  opacity:.9;
  line-height:1.6;
}
.footer-bottom{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.12);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}
.footer-icp a{color:#e5e7eb;text-decoration:none;opacity:.95}
.footer-icp a:hover{text-decoration:underline}

/* 小屏底部固定操作条（付款页使用） */
.actionbar{
  position:sticky;
  bottom:0;
  background:rgba(246,247,249,.9);
  backdrop-filter:saturate(1.2);
  padding:10px 0;
  border-top:1px solid var(--border);
}
.actionbar-inner{
  display:flex;
  gap:10px;
}
.actionbar-note{
  font-size:12px;
  color:var(--muted);
  margin-top:8px;
}

/* 返回顶部 */
.backtop{
  position:fixed;
  right:14px;
  bottom:16px;
  z-index:60;
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  color:#111827;
  width:44px;
  height:44px;
  border-radius:999px;
  box-shadow:var(--shadow-md);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease;
}
.backtop.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.backtop:hover{border-color:#cfd6df}
.backtop-icon{
  width:22px;
  height:22px;
  position:relative;
}
.backtop-icon::before{
  content:"";
  position:absolute;
  left:50%;
  top:7px;
  width:10px;
  height:10px;
  border-left:2px solid var(--primary);
  border-top:2px solid var(--primary);
  transform:translateX(-50%) rotate(45deg);
  border-radius:1px;
}
.backtop-icon::after{
  content:"";
  position:absolute;
  left:50%;
  top:8px;
  width:2px;
  height:10px;
  background:var(--primary);
  transform:translateX(-50%);
  border-radius:2px;
  opacity:.25;
}

@keyframes backtop-float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-2px)}
}
.backtop.show .backtop-icon{animation:backtop-float 1.6s ease-in-out infinite}
.backtop:hover .backtop-icon{animation-duration:1s}

/* 避免遮挡底部操作条 */
@media (max-width: 900px){
  .backtop{bottom:84px}
}

@media (prefers-reduced-motion: reduce){
  .btn{transition:none}
}

