
:root{
  --primary:#2563eb;--primary-dark:#1d4ed8;--success:#16a34a;--danger:#dc2626;
  --warning:#d97706;--sidebar:#111827;--sidebar-soft:#1f2937;--bg:#f3f6fb;
  --card:#fff;--text:#172033;--muted:#748096;--line:#e7ebf2;--radius:16px;
}
*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--bg)}
a{text-decoration:none}.btn{border-radius:10px;font-weight:600}.form-control,.form-select{border-radius:10px;border-color:#dfe5ee;min-height:44px}.form-control:focus,.form-select:focus{border-color:#93b4ff;box-shadow:0 0 0 .2rem rgba(37,99,235,.12)}
.admin-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:linear-gradient(180deg,#111827,#0b1220);color:#fff;padding:22px 14px;z-index:1030}
.brand{display:flex;align-items:center;gap:12px;padding:0 10px 20px;font-size:18px;font-weight:800}.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#3b82f6,#7c3aed);display:grid;place-items:center;box-shadow:0 8px 22px rgba(59,130,246,.35)}
.nav-section{font-size:11px;color:#748096;padding:16px 14px 7px;letter-spacing:.1em}.side-link{display:flex;align-items:center;gap:11px;color:#cbd5e1;padding:11px 13px;border-radius:11px;margin:3px 0;font-size:14px}.side-link:hover,.side-link.active{background:rgba(255,255,255,.1);color:#fff}.side-link.active{box-shadow:inset 3px 0 #60a5fa}
.main{margin-left:238px;min-height:100vh}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:1020}.content{padding:26px}
.page-title{font-size:25px;font-weight:800;margin:0}.page-desc{color:var(--muted);font-size:14px;margin-top:4px}.panel,.stat-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 30px rgba(30,50,90,.055)}
.panel-header{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.panel-body{padding:20px}
.stat-card{padding:20px;position:relative;overflow:hidden}.stat-label{font-size:13px;color:var(--muted)}.stat-value{font-size:29px;font-weight:800;margin-top:8px}.stat-icon{position:absolute;right:18px;top:18px;width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:#eff6ff;font-size:21px}
.table-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 30px rgba(30,50,90,.045)}.table{margin:0}.table>:not(caption)>*>*{padding:14px 16px;border-color:var(--line)}.table thead th{background:#f8fafc;color:#667085;font-size:12px;text-transform:none;white-space:nowrap}.table tbody tr:hover{background:#fbfdff}
.badge-soft{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}.badge-success{background:#ecfdf3;color:#15803d}.badge-muted{background:#f1f5f9;color:#64748b}.badge-warning{background:#fff7ed;color:#c2410c}.badge-danger{background:#fef2f2;color:#b91c1c}.badge-info{background:#eff6ff;color:#1d4ed8}
.qr-thumb{width:48px;height:48px;border-radius:8px;object-fit:cover;border:1px solid var(--line)}.empty{padding:50px;text-align:center;color:var(--muted)}
.mobile-menu{display:none}.copy-btn{border:0;background:#eef2ff;color:#4338ca;border-radius:7px;padding:4px 8px;font-size:12px}
.login-page{min-height:100vh;background:radial-gradient(circle at 20% 10%,rgba(59,130,246,.28),transparent 28%),linear-gradient(135deg,#0f172a,#111827 60%,#172554);display:grid;place-items:center;padding:20px}.login-card{width:100%;max-width:430px;background:rgba(255,255,255,.97);border-radius:22px;padding:36px;box-shadow:0 30px 80px rgba(0,0,0,.3)}
.pay-page{min-height:100vh;background:radial-gradient(circle at top,#dbeafe,transparent 35%),#f5f7fb;padding:24px 12px}.pay-shell{max-width:650px;margin:auto}.pay-card{background:#fff;border:1px solid #e8edf5;border-radius:24px;box-shadow:0 24px 60px rgba(31,49,90,.11);overflow:hidden}.pay-head{padding:26px;background:linear-gradient(135deg,#172554,#1e40af);color:white}.pay-body{padding:28px}.pay-type{cursor:pointer;border:2px solid #e7ebf2;border-radius:15px;padding:19px;text-align:center;transition:.2s;font-weight:700}.pay-type:hover{transform:translateY(-2px)}.pay-type.active{border-color:#2563eb;background:#eff6ff;color:#1d4ed8}.quick-amount{border:1px solid #dbe3ef;background:#fff;border-radius:10px;padding:9px 13px;font-weight:700}.quick-amount:hover{border-color:#2563eb;color:#2563eb}.amount-input{font-size:24px;font-weight:800}.qr-large{max-width:270px;max-height:270px;border-radius:16px;border:8px solid white;box-shadow:0 12px 35px rgba(0,0,0,.12)}.hidden{display:none!important}
@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:none}.main{margin-left:0}.mobile-menu{display:inline-flex}.content{padding:18px}.topbar{padding:0 16px}.page-title{font-size:21px}.table-card{overflow-x:auto}}


/* v0.4.2.6 支付页紧凑布局 */
#step2{
  max-width:680px;
  margin:0 auto;
}
#step2 .row.g-2.mb-3{
  margin-bottom:.6rem!important;
}
#step2 .row.g-2.mb-3 .btn{
  padding:.65rem .75rem!important;
}
#step2 .alert-warning{
  margin-bottom:.6rem!important;
  padding:.55rem .75rem!important;
  line-height:1.5;
}
#step2 .fw-bold.mb-3,
#step2 .display-5.mb-3,
#step2 #receiverName.mb-3,
#step2 #accountBox.mb-3{
  margin-bottom:.6rem!important;
}
#step2 .display-5{
  font-size:2.25rem;
}
#step2 #qrImage{
  display:block;
  width:min(220px,56vw);
  max-height:220px;
  object-fit:contain;
  margin:.35rem auto .65rem!important;
  cursor:zoom-in;
  border-radius:12px;
}
#step2 #accountBox>div{
  padding:.75rem!important;
}
#step2 .text-start.mt-4{
  margin-top:.7rem!important;
}
#step2 #previewBox{
  margin-top:.55rem!important;
}
#step2 #preview{
  max-width:180px;
  max-height:180px;
  object-fit:contain;
}
#step2 #completeBtn{
  margin-top:.75rem!important;
  padding:.75rem!important;
}
#step2 #statusBox{
  margin-top:.55rem!important;
}
.image-preview-mask{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.84);
}
.image-preview-mask.show{
  display:flex;
}
.image-preview-mask img{
  max-width:96vw;
  max-height:92vh;
  object-fit:contain;
  border-radius:12px;
  background:#fff;
}
.image-preview-close{
  position:fixed;
  top:16px;
  right:18px;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  font-size:28px;
  line-height:38px;
  background:rgba(255,255,255,.94);
  color:#222;
}
.copy-success-toast{
  position:fixed;
  left:50%;
  bottom:30px;
  z-index:10000;
  transform:translateX(-50%) translateY(15px);
  opacity:0;
  pointer-events:none;
  padding:10px 18px;
  border-radius:999px;
  color:#fff;
  background:rgba(20,20,20,.92);
  font-size:15px;
  transition:.2s ease;
}
.copy-success-toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
@media (max-height:760px){
  .pay-body{padding-top:12px!important;padding-bottom:12px!important}
  #step2 #qrImage{width:min(180px,46vw);max-height:180px}
  #step2 .display-5{font-size:1.9rem}
  #step2 .alert-warning{font-size:13px}
}
@media (max-width:576px){
  .pay-shell{padding:8px!important}
  .pay-body{padding:14px!important}
  #step2 .row.g-2.mb-3 .btn{font-size:14px}
  #step2 #qrImage{width:min(200px,58vw);max-height:200px}
}

/* v0.4.2.7 图片预览关闭按钮修复 */
.image-preview-close{z-index:10002;cursor:pointer;pointer-events:auto}
.image-preview-mask img{z-index:10000}


/* v0.5.0 平台ID及紧凑账号区域 */
.platform-id-mask{position:fixed;inset:0;z-index:10020;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.68)}
.platform-id-mask.show{display:flex}.platform-id-dialog{width:100%;max-width:430px;background:#fff;border-radius:20px;padding:24px;box-shadow:0 25px 70px rgba(0,0,0,.28)}
.platform-id-dialog h4{font-weight:800}.platform-id-actions{display:flex;gap:10px}.platform-id-actions .btn{flex:1}
#accountBox .account-compact-row{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 0}
#accountBox .account-compact-label{font-size:12px;color:#748096;flex:0 0 auto}
#accountBox .account-compact-value{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1;text-align:left}
#accountBox .account-compact-row .btn{font-size:12px;padding:4px 8px;flex:0 0 auto}
#platformUidDisplay{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media(max-width:576px){#accountBox .account-compact-value{font-size:13px}#accountBox .account-compact-label{font-size:11px}.platform-id-dialog{padding:20px}}


/* v0.5.2 固定金额每行4个 */
.quick-amount-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.5rem!important;
}
.quick-amount-grid>[class*="col-"]{
  width:auto!important;
  max-width:none!important;
  flex:none!important;
  padding:0!important;
}
.quick-amount-grid .btn{
  width:100%;
  min-width:0;
  padding:.7rem .25rem;
  white-space:nowrap;
}
@media (max-width:420px){
  .quick-amount-grid{
    gap:.4rem!important;
  }
  .quick-amount-grid .btn{
    padding:.62rem .15rem;
    font-size:13px;
  }
}


/* v0.5.4 首页固定金额：电脑和手机均每行4个 */
.quick-amount-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  width:100%;
}

.quick-amount-grid .quick-amount{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:10px 5px;
  box-sizing:border-box;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:15px;
  line-height:1.2;
}

@media (max-width:768px){
  .quick-amount-grid{
    gap:8px;
  }

  .quick-amount-grid .quick-amount{
    min-height:42px;
    padding:9px 3px;
    font-size:14px;
  }
}

@media (max-width:480px){
  .quick-amount-grid{
    gap:6px;
  }

  .quick-amount-grid .quick-amount{
    min-height:40px;
    padding:8px 2px;
    font-size:13px;
    letter-spacing:-0.2px;
  }
}

@media (max-width:360px){
  .quick-amount-grid{
    gap:5px;
  }

  .quick-amount-grid .quick-amount{
    min-height:38px;
    padding:7px 1px;
    font-size:12px;
  }
}


/* v0.5.5 后台收款账号管理 */
.receiver-account-line{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:260px;
}
.receiver-account-value{
  max-width:280px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width:576px){
  .receiver-account-line{
    min-width:220px;
  }
  .receiver-account-value{
    max-width:150px;
  }
}


/* v0.5.6 管理员账号管理 */
.admin-enabled-switch{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding-left:2.8rem;
}
.admin-enabled-switch .form-check-input{
  margin-top:0;
}

/* v0.6.0 */
.pagination{flex-wrap:wrap;gap:4px}.pagination .page-link{border-radius:8px}


/* v0.6.2 支付方式图片，自适应电脑与手机 */
.payment-method-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.payment-method-grid .pay-type{
  position:relative;
  width:100%;
  min-width:0;
  min-height:150px;
  padding:16px 14px 13px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:2px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
  color:#1f2937;
  cursor:pointer;
  overflow:hidden;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background .2s ease;
  -webkit-tap-highlight-color:transparent;
}
.payment-method-grid .pay-type:hover{
  transform:translateY(-2px);
  border-color:#b8c7ef;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.payment-method-grid .pay-type.active{
  border-color:#2563eb;
  background:#f5f8ff;
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.payment-method-image-wrap{
  width:100%;
  height:84px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.payment-method-image{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:84px;
  object-fit:contain;
}
.payment-method-name{
  display:block;
  font-size:16px;
  line-height:1.3;
  font-weight:700;
  white-space:nowrap;
}
.payment-method-check{
  position:absolute;
  right:9px;
  top:9px;
  width:24px;
  height:24px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#2563eb;
  font-size:14px;
  font-weight:800;
  opacity:0;
  transform:scale(.75);
  transition:.2s ease;
}
.payment-method-grid .pay-type.active .payment-method-check{
  opacity:1;
  transform:scale(1);
}
@media (max-width:575.98px){
  .payment-method-grid{
    gap:10px;
  }
  .payment-method-grid .pay-type{
    min-height:124px;
    padding:12px 8px 10px;
    border-radius:13px;
  }
  .payment-method-image-wrap{
    height:66px;
  }
  .payment-method-image{
    max-height:66px;
  }
  .payment-method-name{
    font-size:14px;
  }
  .payment-method-check{
    right:7px;
    top:7px;
    width:21px;
    height:21px;
    font-size:12px;
  }
}
@media (min-width:992px){
  .payment-method-grid .pay-type{
    min-height:170px;
  }
  .payment-method-image-wrap{
    height:98px;
  }
  .payment-method-image{
    max-height:98px;
  }
}
