/* ============ 云码支付 · 毛玻璃果冻风 UI ============ */
:root {
  --brand1: #6366f1;
  --brand2: #8b5cf6;
  --brand3: #22d3ee;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #f43f5e;
  --ink: #1c2033;
  --ink2: #575d75;
  --ink3: #8d93a8;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-soft: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.75);
  --radius: 22px;
  --shadow: 0 18px 50px -18px rgba(79, 70, 229, 0.35), 0 2px 8px rgba(28, 32, 51, 0.04);
  --jelly: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.4, 0.1, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #eef1ff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 彩色背景层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 8% 4%, #dbe4ff 0%, transparent 60%),
    radial-gradient(800px 700px at 92% 8%, #f3e8ff 0%, transparent 62%),
    radial-gradient(900px 700px at 50% 100%, #d8fbff 0%, transparent 60%),
    linear-gradient(160deg, #f7f8ff 0%, #eef2ff 45%, #f6f7ff 100%);
}

/* 漂浮果冻光斑 */
.blob {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  animation: blobFloat 18s var(--ease) infinite alternate;
}
.blob.b1 { width: 380px; height: 380px; top: -90px; left: -70px; background: radial-gradient(circle, #a5b4fc, transparent 70%); }
.blob.b2 { width: 420px; height: 420px; top: 12%; right: -120px; background: radial-gradient(circle, #ddd6fe, transparent 70%); animation-delay: -6s; }
.blob.b3 { width: 360px; height: 360px; bottom: -120px; left: 32%; background: radial-gradient(circle, #a5f3fc, transparent 70%); animation-delay: -11s; }

@keyframes blobFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, -34px, 0) scale(1.08); }
  100% { transform: translate3d(-22px, 26px, 0) scale(0.96); }
}

/* ============ 玻璃容器 ============ */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}

.jelly { transition: transform 0.42s var(--jelly), box-shadow 0.42s var(--ease); }
.jelly:hover { transform: translateY(-3px) scale(1.012); }
.jelly:active { transform: scale(0.975); }

/* 入场 */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to { opacity: 1; transform: none; }
}
.pop { animation: popIn 0.6s var(--jelly) both; }
.d1 { animation-delay: 0.06s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.18s; }
.d4 { animation-delay: 0.24s; }

/* ============ 排版 ============ */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; line-height: 1.7; }
a { color: var(--brand1); text-decoration: none; }
.muted { color: var(--ink3); font-size: 13px; }
.sub { color: var(--ink2); }
.grad-text {
  background: linear-gradient(120deg, var(--brand1), var(--brand2) 45%, var(--brand3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px -10px rgba(28, 32, 51, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  transition: transform 0.42s var(--jelly), box-shadow 0.3s var(--ease), filter 0.25s;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 30px -12px rgba(99, 102, 241, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost { background: rgba(255, 255, 255, 0.4); color: var(--ink2); }
.btn-ok { color: #fff; background: linear-gradient(135deg, #10b981, #34d399); border-color: rgba(255,255,255,.3); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #f43f5e, #fb7185); border-color: rgba(255,255,255,.3); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 7px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.3s var(--ease), background 0.25s;
  backdrop-filter: blur(10px);
}
.input::placeholder, .textarea::placeholder { color: #a9aec2; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(99, 102, 241, 0.65);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.13);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8d93a8 50%), linear-gradient(135deg, #8d93a8 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

/* ============ 徽章 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink2);
}
.badge.ok { color: #067a5b; background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.28); }
.badge.warn { color: #9a5b00; background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); }
.badge.danger { color: #a3123a; background: rgba(244, 63, 94, 0.13); border-color: rgba(244, 63, 94, 0.28); }
.badge.info { color: #3d3ab8; background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.28); }

/* ============ 布局 ============ */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; gap: 0; }
.sidebar {
  margin: 16px 0 16px 16px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo {
  width: 38px; height: 38px; border-radius: 13px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2) 60%, var(--brand3));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255,255,255,.5);
  animation: logoPulse 4s var(--ease) infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(-3deg); }
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: 0.2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.35s var(--jelly);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.55); transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 12px 26px -14px rgba(99, 102, 241, 0.95), inset 0 1px 0 rgba(255,255,255,.3);
}
.nav-item .ico { font-size: 16px; width: 20px; text-align: center; }
.nav-sep { height: 1px; background: rgba(140, 148, 176, 0.16); margin: 10px 6px; }

.main { padding: 16px 16px 32px 16px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 22px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.topbar h2 { font-size: 19px; }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink2); }

.panel { padding: 22px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h3 { font-size: 16px; }
.panel-head .muted { margin-top: 4px; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 20px; border-radius: 20px; position: relative; overflow: hidden; }
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 70%);
}
.stat .k { font-size: 12.5px; color: var(--ink3); font-weight: 600; margin-bottom: 8px; }
.stat .v { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--ink3); margin-left: 3px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 16px; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13.5px; }
thead th {
  text-align: left; padding: 8px 12px; font-size: 12.5px; font-weight: 700;
  color: var(--ink3); white-space: nowrap;
}
tbody td { padding: 13px 12px; background: rgba(255, 255, 255, 0.5); vertical-align: middle; }
tbody tr { transition: transform 0.35s var(--jelly); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.78); }
tbody td:first-child { border-radius: 12px 0 0 12px; }
tbody td:last-child { border-radius: 0 12px 12px 0; }
td.nowrap, th.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.money { font-weight: 700; color: var(--ink); }

.empty { text-align: center; padding: 44px 12px; color: var(--ink3); font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: 0.7; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--ink2); }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(28, 32, 51, 0.28);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  padding: 24px;
  animation: popIn 0.45s var(--jelly) both;
}
.modal h3 { font-size: 17px; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* Toast */
.toasts { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 12px 22px; border-radius: 14px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 40px -16px rgba(28, 32, 51, 0.45);
  backdrop-filter: blur(18px) saturate(180%);
  color: var(--ink);
  animation: toastIn 0.45s var(--jelly) both;
}
.toast.ok { color: #067a5b; }
.toast.err { color: #a3123a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(0.9); } to { opacity: 1; transform: none; } }

/* ============ 登录页 ============ */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; padding: 34px 30px; }
.login-card .brand { justify-content: center; padding-bottom: 10px; flex-direction: column; gap: 12px; }
.login-card h1 { font-size: 22px; text-align: center; }
.login-card .tip { text-align: center; margin: 8px 0 24px; font-size: 13px; color: var(--ink3); }

/* ============ 收银台 ============ */
.pay-wrap { max-width: 480px; margin: 0 auto; padding: 28px 18px 48px; }
.pay-head { text-align: center; margin-bottom: 18px; }
.pay-amount { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; margin: 6px 0 4px; }
.pay-amount small { font-size: 20px; margin-right: 4px; font-weight: 700; }
.qr-box {
  margin: 18px auto; width: 248px; height: 248px;
  border-radius: 24px; padding: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 45px -22px rgba(99, 102, 241, 0.7), inset 0 1px 0 #fff;
  display: grid; place-items: center;
  animation: qrFloat 5s var(--ease) infinite;
}
@keyframes qrFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(0.6deg); }
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.qr-ph { color: var(--ink3); font-size: 13.5px; text-align: center; padding: 12px; line-height: 1.7; }

.pay-tip {
  text-align: center; font-size: 13.5px; color: var(--ink2);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px; padding: 12px 14px; line-height: 1.7;
}
.pay-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); padding: 0 2px; }
.pay-meta div { padding: 7px 0; }
.countdown { font-weight: 700; color: var(--brand1); }

.steps { display: flex; gap: 8px; margin: 18px 0; }
.step { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.6); overflow: hidden; }
.step > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand1), var(--brand3)); transition: width 0.8s var(--ease); }

.paid-anim { text-align: center; padding: 30px 10px; }
.paid-circle {
  width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: grid; place-items: center; color: #fff; font-size: 42px;
  box-shadow: 0 20px 44px -18px rgba(16, 185, 129, 0.9), inset 0 2px 0 rgba(255,255,255,.4);
  animation: successPop 0.7s var(--jelly) both;
}
@keyframes successPop {
  0% { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(6deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* 落地页 */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 22px 60px; }
.hero { padding: 66px 24px 54px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.18; margin-bottom: 16px; letter-spacing: -1.2px; }
.hero p { max-width: 620px; margin: 0 auto 26px; color: var(--ink2); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 26px; }
.feature { padding: 24px; }
.feature .ico {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.18));
  border: 1px solid rgba(255,255,255,.9); margin-bottom: 14px;
}
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--ink2); }
.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; max-width: 1080px; margin: 0 auto; }
.footer { text-align: center; padding: 26px; font-size: 12.5px; color: var(--ink3); }

/* 代码块 */
pre.code {
  background: rgba(28, 32, 51, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px; padding: 16px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.75; color: #2b3050; margin: 0;
  white-space: pre-wrap; word-break: break-all;
}
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed rgba(140, 148, 176, 0.22); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--ink3); font-size: 13px; }
.kv b { font-weight: 700; text-align: right; word-break: break-all; }
.copy { cursor: pointer; color: var(--brand1); font-size: 12px; margin-left: 6px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs .tab {
  padding: 8px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(255, 255, 255, 0.8); color: var(--ink2);
  transition: all 0.35s var(--jelly);
}
.tabs .tab.active { color: #fff; background: linear-gradient(135deg, var(--brand1), var(--brand2)); box-shadow: 0 10px 22px -12px rgba(99,102,241,.9); }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(99, 102, 241, 0.25); border-top-color: var(--brand1);
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 30px; color: var(--ink3); font-size: 13.5px; }

/* 响应式 */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; margin: 10px 10px 0; padding: 12px;
    flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden;
    z-index: 30;
  }
  .sidebar .brand { padding: 0 8px 0 0; }
  .brand-name { display: none; }
  .sidebar .nav-item { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
  .sidebar .nav-item .ico { display: none; }
  .nav-sep { display: none; }
  .sidebar .spacer, .sidebar .side-foot { display: none; }
  .main { padding: 12px 10px 30px; }
  .topbar { padding: 12px 16px; }
  .stat .v { font-size: 23px; }
  .pay-amount { font-size: 38px; }
  .qr-box { width: 210px; height: 210px; }
}
.spacer { flex: 1; }
.side-foot { padding: 10px 8px 0; font-size: 12px; color: var(--ink3); }
.table-wrap table { min-width: 720px; }
