/* ==========================================================================
   云卡发卡系统 · 前台样式
   仅作用于买家端页面；后台样式在 admin.css，两者互不影响。
   ========================================================================== */

:root {
  /* 品牌色 */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --primary-soft: #c7d2fe;
  --accent: #f43f5e;

  /* 文本与背景 */
  --text: #111827;
  --text-sub: #374151;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --border: #e8eaf0;
  --border-strong: #d6d9e3;
  --bg: #f4f5fa;
  --card: #ffffff;

  /* 语义色 */
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --err: #dc2626;
  --err-bg: #fef2f2;
  --err-border: #fecaca;

  /* 形状 */
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* 阴影：三层递进，避免"脏" */
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 3px rgba(17, 24, 39, .06);
  --shadow: 0 2px 4px -2px rgba(17, 24, 39, .06), 0 8px 20px -10px rgba(17, 24, 39, .14);
  --shadow-lg: 0 4px 8px -4px rgba(17, 24, 39, .08), 0 20px 40px -18px rgba(17, 24, 39, .24);
  --shadow-primary: 0 10px 24px -12px rgba(79, 70, 229, .55);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  /* 让页脚始终贴在视口底部：内容不足一屏时也不上浮 */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  /* 极淡的两点光晕，让纯色背景不那么"平" */
  background-image:
    radial-gradient(900px 420px at 88% -8%, rgba(99, 102, 241, .10), transparent 62%),
    radial-gradient(700px 380px at -6% 4%, rgba(244, 63, 94, .06), transparent 58%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color .16s var(--ease); }
a:hover { color: var(--primary-dark); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: #f3f4f8;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.strong { font-weight: 700; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
/* flex:1 把剩余高度撑开，从而把页脚顶到页面底部 */
.main { flex: 1 0 auto; padding-top: 26px; padding-bottom: 60px; }

/* ---------- 顶部导航 ---------- */
.nav {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.nav-links a {
  position: relative;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: .18s var(--ease);
}
.nav-links a:hover { background: #f4f5fa; color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* ---------- 通用容器 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.section { margin-top: 28px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}
.section-title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 17px; }
.page-title { margin: 0 0 8px; font-size: 23px; letter-spacing: -.02em; }

/* ---------- 提示条 ---------- */
.alert {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.alert-err { background: var(--err-bg); border-color: var(--err-border); color: var(--err); }

.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}
.notice-tag {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.7;
  padding: 1px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .72);
  white-space: nowrap;
}
.notice-body { min-width: 0; white-space: pre-wrap; word-break: break-word; }

.notice-info { background: var(--primary-light); border-color: var(--primary-soft); color: var(--primary-dark); }
.notice-info .notice-tag { color: var(--primary); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-border); color: #92400e; }
.notice-warn .notice-tag { color: var(--warn); }
.notice-success { background: var(--ok-bg); border-color: var(--ok-border); color: #065f46; }
.notice-success .notice-tag { color: var(--ok); }

/* ---------- 分类 tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tabs a {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: .18s var(--ease);
}
.tabs a:hover { border-color: var(--primary-soft); color: var(--primary); transform: translateY(-1px); }
.tabs a.active {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-primary);
}

/* ---------- 商品网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin-bottom: 0;
  color: var(--text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--accent));
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.product-card:hover::before { opacity: 1; }
.product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.product-head h3 {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.tag {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}
.product-sub {
  margin: 10px 0 18px;
  color: var(--text-muted);
  font-size: 13.5px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--border-strong);
  font-size: 13px;
  color: var(--text-muted);
}
.product-meta .go { color: var(--primary); font-weight: 600; white-space: nowrap; }
.product-meta .muted { white-space: nowrap; }

.price {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: -.02em;
}
.price em { font-style: normal; font-size: 14px; font-weight: 700; margin-right: 1px; }
.price-lg { font-size: 36px; font-weight: 800; color: var(--accent); letter-spacing: -.03em; }
.price-lg em { font-style: normal; font-size: 19px; font-weight: 700; margin-right: 2px; }

.badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: #f3f4f8; color: var(--text-muted); }

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.crumb a { color: var(--text-muted); }
.crumb a:hover { color: var(--primary); }
.crumb .current { color: var(--text-sub); }

/* ---------- 商品详情 ---------- */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 18px;
  align-items: start;
}
.detail-main { padding: 26px 28px; }
.detail-title { margin: 0 0 8px; font-size: 25px; line-height: 1.35; letter-spacing: -.02em; }
.detail-sub { margin: 0 0 18px; color: var(--text-muted); }
.detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.detail-price .sep { width: 1px; height: 18px; background: var(--border-strong); }
.rich { white-space: pre-wrap; word-break: break-word; line-height: 1.85; color: var(--text-sub); }
.tips { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: 14px; }
.tips li { margin-bottom: 7px; }
.tips strong { color: var(--text-sub); }

/* ---------- 购买面板 ---------- */
.buy-panel {
  position: sticky;
  top: 82px;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.panel-title { margin: 0 0 20px; font-size: 17px; letter-spacing: -.01em; }

.field { display: block; margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 7px;
}
.field-label .req { color: var(--err); font-style: normal; }
.field-hint { display: block; font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }

input[type=text], input[type=number], input[type=password], input[type=date],
input[type=search], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .14);
}

.qty { display: flex; align-items: center; gap: 8px; }
.qty input { text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  flex: 0 0 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-sub);
  transition: .16s var(--ease);
}
.qty-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.qty-btn:disabled { opacity: .45; cursor: not-allowed; }

.pay-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-type { cursor: pointer; position: relative; }
.pay-type input { position: absolute; opacity: 0; width: 0; height: 0; }
.pay-type-body {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-sub);
  transition: .16s var(--ease);
}
.pay-type:hover .pay-type-body { border-color: var(--primary-soft); }
.pay-type input:checked + .pay-type-body {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}
.pay-type input:focus-visible + .pay-type-body { box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .18); }
.pay-icon {
  flex: 0 0 auto;
  width: 23px; height: 23px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 4px;
  margin-bottom: 16px;
  border-top: 1px dashed var(--border-strong);
  font-size: 14px;
  color: var(--text-muted);
}
.total strong { font-size: 26px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-sub);
  font-size: 14.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: .16s var(--ease);
}
.btn:hover { border-color: var(--primary-soft); color: var(--primary); }
.btn:active { transform: scale(.985); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 12px 26px -12px rgba(79, 70, 229, .68);
}
.btn-primary:active { transform: scale(.985); }
.btn-block { width: 100%; padding: 14px; font-size: 16px; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-mini {
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: .16s var(--ease);
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.link { font-size: 14px; font-weight: 500; }
.inline { display: inline; }

/* ---------- 支付页 ---------- */
.pay-wrap { max-width: 600px; margin: 0 auto; padding: 30px 28px; text-align: center; }
.pay-head h1 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.01em; }
.pay-amount { margin: 22px 0 24px; }
.pay-amount span { display: block; margin-bottom: 2px; color: var(--text-muted); font-size: 13.5px; }
.pay-amount strong { font-size: 42px; font-weight: 800; color: var(--accent); letter-spacing: -.03em; }
.pay-info {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.pay-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  padding: 12px 16px;
  font-size: 14px;
}
.pay-info span { color: var(--text-muted); }
.pay-loading { padding: 22px 0; }
.spinner {
  width: 36px; height: 36px;
  margin: 0 auto 16px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.qr-wrap { padding: 12px 0 6px; }
.qr-img {
  width: 240px; height: 240px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pay-poll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
  font-size: 13.5px;
  color: var(--text-muted);
}
.pay-poll .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, .5);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .45); }
  70% { box-shadow: 0 0 0 9px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ---------- 订单页 ---------- */
.order-card { padding: 26px 28px; }
.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.order-head h1 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.01em; }
.order-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 28px;
  margin: 20px 0 0;
}
.kv > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.kv dt { flex: 0 0 auto; color: var(--text-muted); font-size: 13.5px; }
.kv dd { margin: 0; text-align: right; font-size: 14px; word-break: break-all; }

.status {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); }
.status-info { background: var(--primary-light); color: var(--primary); }
.status-danger { background: var(--err-bg); color: var(--err); }
.status-muted { background: #f3f4f8; color: var(--text-muted); }

.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfcff, #f7f8fc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: .16s var(--ease);
}
.card-item:hover { border-color: var(--primary-soft); box-shadow: var(--shadow-xs); }
.card-index {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-secret {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
}
.deliver-note { margin-top: 16px; font-size: 13.5px; }

.lock-card { padding: 28px; }
.lock-card h2 { margin: 0 0 10px; font-size: 18px; }
.lock-form { display: flex; gap: 10px; margin-top: 18px; }
.lock-form input { flex: 1; }

/* ---------- 订单查询页 ---------- */
.query-card { padding: 26px 28px; }
.query-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.query-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
  border: 1px solid var(--primary-soft);
}
.query-head-text { min-width: 0; }
.query-head-text .page-title { margin: 0 0 5px; font-size: 21px; }
.query-head-text p { margin: 0; }
.query-form .btn { margin-top: 4px; }
.query-alert { margin: 16px 0 0; }

.result-block { margin-top: 22px; }
.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 2px;
}
.result-head h2 { margin: 0; font-size: 16px; }
.result-tip { margin: 14px 2px 0; line-height: 1.7; }

.order-list { display: grid; gap: 10px; }
.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  transition: .18s var(--ease);
}
.order-item:hover {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--text);
}
.order-item-body { flex: 1 1 auto; min-width: 0; }
.order-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.order-item-no {
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
}
.order-item-name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.order-item-price { font-size: 15px; font-weight: 700; color: var(--accent); }
.order-item-price em { font-style: normal; font-size: 12px; margin-right: 1px; }
.dot-sep { color: var(--text-faint); }
.order-item-go {
  flex: 0 0 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 46px 24px; }
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #f6f7fb, #e8eaf4);
  border: 1px solid var(--border);
}
.empty-title { margin: 0 0 7px; font-size: 16.5px; font-weight: 700; color: var(--text-sub); }
.empty-state p { margin: 5px 0; }

/* ---------- 表格 ---------- */
.query-form { margin-top: 0; }
.table-wrap { overflow-x: auto; }

/* 宽屏下查询表单横向一行，充分占用铺开的卡片宽度 */
@media (min-width: 760px) {
  .query-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
  }
  .query-form .field {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
  }
  .query-form .btn {
    flex: 0 0 auto;
    width: auto;
    padding: 11px 32px;
    margin-top: 0;
  }
}

/* 查询页帮助区在宽屏下分两列，避免单行过长 */
@media (min-width: 900px) {
  .query-help .tips {
    columns: 2;
    column-gap: 40px;
  }
  .query-help .tips li {
    break-inside: avoid;
    margin-bottom: 9px;
  }
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fafbfd;
}
.table tbody tr:hover { background: #fafaff; }

.empty { text-align: center; color: var(--text-muted); padding: 46px 20px; }
.empty.small { padding: 26px 16px; }
.empty p { margin: 7px 0; }
.err-code { margin: 0 0 10px; font-size: 56px; font-weight: 800; letter-spacing: -.04em; color: var(--primary-soft); }

/* ---------- 页脚 ---------- */
.footer {
  flex: 0 0 auto;
  margin-top: 12px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .72);
  font-size: 13.5px;
  color: var(--text-muted);
}
.footer p { margin: 6px 0; }
.footer-note { white-space: pre-wrap; max-width: 780px; line-height: 1.8; }
.footer-contact { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-copy { font-size: 12.5px; color: var(--text-faint); }

/* ---------- 右下角悬浮客服（配置了 Telegram 才出现） ---------- */
.float-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #37b3ec, #229ed9);
  box-shadow: 0 10px 24px -10px rgba(34, 158, 217, .85);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.float-contact:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 30px -10px rgba(34, 158, 217, .95);
}
.float-contact svg { width: 27px; height: 27px; }

/* ---------- 移动端吸底购买栏 ---------- */
.buy-bar { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .buy-panel { position: static; }

  .buy-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -16px rgba(17, 24, 39, .45);
    transform: translateY(105%);
    transition: transform .26s var(--ease);
  }
  .buy-bar.show { transform: none; }
  .buy-bar-price {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -.02em;
  }
  .buy-bar-price em { font-style: normal; font-size: 14px; font-weight: 700; margin-right: 1px; }
  .buy-bar .btn { flex: 0 0 auto; padding: 12px 24px; }
  body.has-buy-bar { padding-bottom: 84px; }
}

@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 14px; }
  .main { padding-top: 18px; padding-bottom: 40px; }

  .nav-inner { height: 56px; gap: 8px; }
  .brand { font-size: 15.5px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 9px; font-size: 13.5px; }

  .card { padding: 18px; border-radius: var(--radius); }
  .detail-main { padding: 20px; }
  .detail-title { font-size: 21px; }
  .price-lg { font-size: 30px; }
  .order-card { padding: 20px; }
  .buy-panel { padding: 20px; }
  .lock-card { padding: 20px; }

  .grid { grid-template-columns: 1fr; }
  .pay-types { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .lock-form { flex-direction: column; }
  .pay-wrap { padding: 24px 18px; }
  .pay-amount strong { font-size: 34px; }
  .qr-img { width: 210px; height: 210px; }

  .notice-bar { padding: 12px 14px; gap: 9px; font-size: 13.5px; }
  .table th, .table td { padding: 10px 11px; font-size: 13.5px; }

  .query-card { padding: 20px; }
  .query-head { gap: 11px; margin-bottom: 18px; }
  .query-head-text .page-title { font-size: 19px; }
  .query-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .order-item { padding: 14px 15px; gap: 10px; }
  .order-item-go { font-size: 13px; }
  .empty-state { padding: 36px 18px; }
  .empty-icon { width: 56px; height: 56px; font-size: 24px; }

  .float-contact { right: 14px; bottom: 14px; width: 48px; height: 48px; }
  .float-contact svg { width: 24px; height: 24px; }
}

/* 手机上出现吸底购买栏时，悬浮客服上移避免被挡住 */
@media (max-width: 900px) {
  body.has-buy-bar .float-contact { bottom: 92px; }
}

/* 尊重系统的"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
