/* ============================================================
   AI 百货 · 全局样式（移动优先，卡片风格）
   ============================================================ */
:root {
  --primary: #4e6ef2;
  --primary-dark: #3b5bdb;
  --success: #16a34a;
  --warn: #ea580c;
  --danger: #dc2626;
  --gold: #f59e0b;
  --text: #1f2937;
  --text-sub: #6b7280;
  --bg: #f5f6fa;
  --card: #ffffff;
  --border: #eceef3;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(31, 41, 55, 0.06);
  --alipay: #1677ff;
  --wechat: #07c160;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  font-size: 22px;
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--text-sub);
  font-size: 14px;
}
.nav-link.active,
.nav-link:hover {
  background: rgba(78, 110, 242, 0.1);
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 公告栏 ---------- */
.notice-bar {
  margin: 14px 0 0;
  background: linear-gradient(90deg, #fff7e6, #fff);
  border: 1px solid #ffe1a8;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
  color: #8a5b00;
}
.notice-bar b {
  color: var(--warn);
}

/* ---------- 商品列表 ---------- */
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 4px;
  -webkit-overflow-scrolling: touch;
}
.cat-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-sub);
  font-size: 13.5px;
  cursor: pointer;
}
.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px 0 30px;
}
@media (min-width: 640px) {
  .goods-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 960px) {
  .goods-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.goods-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.goods-card:hover {
  transform: translateY(-2px);
}
.goods-cover {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
}
.goods-cover .cover-emoji {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}
.goods-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.goods-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.goods-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  color: var(--primary);
  background: rgba(78, 110, 242, 0.08);
  border: 1px solid rgba(78, 110, 242, 0.25);
  padding: 1px 7px;
  border-radius: 10px;
}
.goods-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.goods-price {
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
}
.goods-price small {
  font-size: 12px;
}
.btn-buy {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.btn-buy:hover {
  background: var(--primary-dark);
}

.empty {
  text-align: center;
  color: var(--text-sub);
  padding: 60px 0;
}

/* ---------- 通用按钮 / 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card {
  margin-top: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-block {
  width: 100%;
}
.btn-alipay {
  background: var(--alipay);
  color: #fff;
}
.btn-wechat {
  background: var(--wechat);
  color: #fff;
}

/* ---------- 商品详情 ---------- */
.item-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.item-cover {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
}
.item-info {
  flex: 1;
  min-width: 0;
}
.item-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.item-meta {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.item-price {
  color: var(--danger);
  font-size: 22px;
  font-weight: 800;
  margin-top: 8px;
}
.item-price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  margin-left: 6px;
}

.auto-ship-box {
  margin-top: 14px;
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 700;
  color: #92400e;
  font-size: 14.5px;
}
.auto-ship-box a {
  color: var(--warn);
}

.buy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--primary);
}

.detail-block h3 {
  font-size: 14.5px;
  margin: 12px 0 6px;
  color: var(--text);
}
.detail-block ul {
  padding-left: 18px;
  color: #374151;
  font-size: 14px;
}
.detail-block li {
  margin: 4px 0;
}
.warn-box {
  margin-top: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
}

/* 售后规则 */
.rules-list {
  padding-left: 18px;
  color: #374151;
  font-size: 13.5px;
}
.rules-list li {
  margin: 4px 0;
}

/* ---------- 下单页 ---------- */
.steps {
  display: flex;
  gap: 4px;
  margin: 14px 0;
}
.step {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-sub);
  position: relative;
}
.step .num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-sub);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 4px;
}
.step.active .num {
  background: var(--primary);
  color: #fff;
}
.step.done .num {
  background: var(--success);
  color: #fff;
}
.step.active,
.step.done {
  color: var(--text);
  font-weight: 600;
}

.order-prod {
  display: flex;
  gap: 12px;
  align-items: center;
}
.order-prod .cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.order-prod .name {
  font-weight: 600;
  font-size: 14.5px;
}
.order-prod .price {
  color: var(--danger);
  font-weight: 700;
}

.form-field {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  background: #fafbfd;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.form-tip {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 5px;
}

.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pay-method {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  background: #fafbfd;
  transition: all 0.15s ease;
}
.pay-method .pay-icon {
  font-size: 22px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}
.pay-method .pay-icon.alipay {
  color: var(--alipay);
}
.pay-method .pay-icon.wechat {
  color: var(--wechat);
}
.pay-method .pay-name {
  font-size: 13px;
  color: var(--text-sub);
}
.pay-method.selected {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.12);
}

/* ---------- 收款码弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal-mask.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  padding: 22px 18px;
  text-align: center;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
}
.modal-sub {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 4px;
}
.qr-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}
.qr-tab {
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fafbfd;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.qr-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.qr-box {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fafbfd;
}
.qr-box img {
  width: 200px;
  height: 200px;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
}
.qr-hint {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 10px;
}
.qr-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--danger);
  margin: 6px 0;
}
.qr-order-no {
  font-size: 13px;
  background: #f1f3f9;
  border-radius: 8px;
  padding: 8px;
  margin: 8px 0;
  word-break: break-all;
  user-select: all;
}
.modal .btn {
  margin-top: 10px;
}

/* ---------- 订单查询 ---------- */
.query-form {
  display: flex;
  gap: 8px;
}
.query-form .form-input {
  flex: 1;
}
.query-form .btn {
  flex-shrink: 0;
}

.order-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.order-item .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.order-no {
  font-size: 12.5px;
  color: var(--text-sub);
  font-family: Consolas, monospace;
}
.status-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.status-pending {
  background: #fff7e6;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-shipped {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}
.order-item .prod-name {
  font-weight: 600;
  font-size: 14.5px;
}
.order-item .meta {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 4px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ship-block {
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.ship-block .label {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.ship-text {
  font-family: Consolas, 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 13.5px;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 10px;
  user-select: all;
}
.copy-btn {
  margin-top: 8px;
  font-size: 12.5px;
  padding: 5px 14px;
}
.wait-tip {
  margin-top: 10px;
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #854d0e;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

/* ---------- 后台 ---------- */
.admin-login {
  max-width: 380px;
  margin: 40px auto;
}
.admin-login .card {
  padding: 26px 22px;
}
.login-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.stat-card .num {
  font-size: 22px;
  font-weight: 800;
}
.stat-card .label {
  font-size: 12.5px;
  color: var(--text-sub);
}
.stat-card.pending .num {
  color: var(--warn);
}
.stat-card.shipped .num {
  color: var(--success);
}
.stat-card.total .num {
  color: var(--primary);
}
.stat-card.today .num {
  color: var(--gold);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
}
.filter-tabs {
  display: flex;
  gap: 6px;
}
.filter-tab {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-sub);
}
.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.search-box {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.search-box .form-input {
  width: 150px;
  padding: 7px 10px;
  font-size: 13px;
}

.admin-table {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.admin-table th {
  background: #fafbfd;
  color: var(--text-sub);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table .num-cell {
  font-family: Consolas, monospace;
  font-size: 12.5px;
}
.cell-actions {
  white-space: nowrap;
}
.btn-sm {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 8px;
}
.btn-sm.ship {
  background: var(--warn);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-sm.copyship {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.ship-preview {
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 220px;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #374151;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
  display: none;
}
tr.expanded .ship-preview {
  display: block;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 30px;
  font-size: 13px;
  color: var(--text-sub);
}

textarea.form-input {
  resize: vertical;
  min-height: 90px;
  font-family: Consolas, monospace;
  font-size: 13.5px;
}
.modal .ship-target {
  font-size: 13px;
  color: var(--text-sub);
  background: #f1f3f9;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  text-align: left;
  word-break: break-all;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 18px 0 24px;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px;
}
.site-footer p + p {
  margin-top: 4px;
}
.link-qq {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 提示 ---------- */
.msg-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 10px;
  display: none;
}
.msg-error.show {
  display: block;
}

.loading {
  text-align: center;
  color: var(--text-sub);
  padding: 40px 0;
  font-size: 14px;
}

/* ============================================================
   【新增】商品置灰 / Session 上传 / 后台数据清理
   ============================================================ */

/* ---------- 商城首页：未开放商品置灰且不可点击 ---------- */
.goods-card.goods-off {
  opacity: 0.55;
  filter: grayscale(1);
  box-shadow: none;
  cursor: not-allowed;
}
.goods-card.goods-off:hover {
  transform: none;
}
.goods-cover .cover-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.btn-buy-off,
.btn-buy:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
.btn-buy-off:hover,
.btn-buy:disabled:hover {
  background: #9ca3af;
}

/* ---------- 商品详情：Session 上传提示 ---------- */
.upload-tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 12px;
}

/* ---------- 下单页：Session 文件上传 ---------- */
.card.dragging {
  border: 2px dashed var(--primary);
  background: rgba(78, 110, 242, 0.04);
}
input[type='file'].form-input {
  padding: 9px 10px;
  font-size: 13.5px;
  background: #fff;
}
.session-status {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 8px;
  display: none;
  word-break: break-all;
}
.session-status.ok,
.session-status.bad {
  display: block;
}
.session-status.ok {
  color: var(--success);
}
.session-status.bad {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- 后台：数据清理栏 ---------- */
.cleanup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.cleanup-label {
  font-weight: 700;
  color: #9a3412;
}
.cleanup-hint {
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.6;
  flex: 1 1 100%;
}

/* ---------- 下单页：Session 获取教程 ---------- */
.session-guide {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.session-guide-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.session-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text);
}
.session-guide-steps li {
  margin: 2px 0;
  word-break: break-word;
}
.session-guide-steps b {
  font-weight: 700;
  color: var(--text);
}

textarea.session-input {
  width: 100%;
  height: 140px;
  min-height: 100px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  word-break: break-all;
  white-space: pre-wrap;
}

.session-or {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 12.5px;
  margin: 12px 0 8px;
}
.session-or::before,
.session-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- 后台：邮箱核对状态小标 ---------- */.check-badge {
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 3px;
  white-space: nowrap;
}
.check-badge.ok {
  color: var(--success);
}
.check-badge.warn {
  color: var(--warn);
  font-weight: 600;
}

/* ---------- 后台：邮箱点击复制 ---------- */
.link-copy {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  text-decoration: underline dotted;
  word-break: break-all;
}
.link-copy:hover {
  color: var(--primary-dark);
}

/* ---------- 危险按钮（描边） ---------- */
.btn-danger-outline {
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: #fff;
  border-radius: 6px;
}
.btn-danger-outline:hover {
  background: rgba(220, 38, 38, 0.06);
}

/* ---------- Session 弹窗 ---------- */
.modal.modal-wide {
  max-width: 760px;
  width: 100%;
}
.session-box {
  height: 320px;
  min-height: 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}

/* ---------- 后台：顶部标签页 ---------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  margin-bottom: -1px;
}
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- 后台：商品管理 ---------- */
.prod-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 12px;
}
.prod-id {
  font-size: 11.5px;
  color: var(--text-sub);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.mod-badge {
  display: inline-block;
  font-size: 11.5px;
  color: var(--warn);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 1px 8px;
  white-space: nowrap;
}
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  cursor: pointer;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.switch-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  cursor: pointer;
}

/* ============================================================
   【新增】金额尾数对账 + 三态订单（待付款 / 已付款待发货 / 已发货）
   ============================================================ */

/* 统计卡加到 5 个 */
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.stat-card.paid .num {
  color: #0891b2;
}

/* 「已付款·待发货」徽标 */
.status-paid {
  background: #e0f2fe;
  color: #0369a1;
}

/* 后台：客户已点「我已付款」的提示 */
.check-badge.wait {
  color: #0891b2;
  font-weight: 600;
}

/* 后台：确认到账按钮 */
.btn-sm.confirm {
  background: #0891b2;
  color: #fff;
  border: none;
}

/* 下单弹窗 / 查询页：实付金额 + 尾数说明 */
.pay-suffix-tip {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-sub);
  font-weight: 400;
  margin-top: 6px;
}

/* 查询页：待付款订单的收款块 */
.pay-now {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  margin-top: 10px;
}
.pay-now-label {
  font-size: 13px;
  color: var(--text-sub);
}
.pay-now-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--danger);
  line-height: 1.3;
  margin: 2px 0 4px;
}
.pay-now-qr {
  margin: 10px auto 6px;
  width: 190px;
  max-width: 70%;
}
.pay-now-qr img {
  width: 100%;
  display: block;
  border-radius: 8px;
}
.pay-now-hint {
  font-size: 12.5px;
  color: var(--warn);
  font-weight: 600;
}

/* 「已确认到账」的等待提示 */
.wait-tip.ok-tip {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

/* 查询页「我已付款」按钮间距 */
.claim-btn {
  margin-top: 10px;
}

/* ============================================================
   打开网站时的营业公告弹窗
   ============================================================ */
.ann-mask {
  z-index: 300;
}
.ann-modal {
  max-width: 420px;
  text-align: left;
  padding: 18px 16px 16px;
  max-height: 86vh;
  overflow-y: auto;
}
.ann-title {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
  color: var(--text);
}
.ann-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ann-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 9px 11px;
}
.ann-h {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text);
}
.ann-t {
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--text-sub);
  margin-top: 3px;
}
.ann-qq {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #12b7f5;
  border-radius: 22px;
  text-decoration: none;
}
.ann-qq:hover {
  background: #0d9fd6;
}
.ann-ok {
  margin-top: 10px;
}

/* 首页公告条上的「查看详情」 */
.notice-more {
  display: inline-block;
  margin-left: 8px;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

/* ============================================================
   快捷发货页（推送链接打开的极简页）
   ============================================================ */
.qk-wrap {
  max-width: 520px;
  padding-top: 16px;
  padding-bottom: 40px;
}
.qk-card {
  padding: 16px 14px 18px;
}
.qk-banner {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.qk-banner.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.qk-banner.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.qk-order {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.qk-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  line-height: 2;
  border-bottom: 1px dashed var(--border);
}
.qk-row:last-child {
  border-bottom: none;
}
.qk-row span {
  color: var(--text-sub);
  flex: none;
}
.qk-row b {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.qk-amount {
  color: var(--danger) !important;
  font-size: 16px;
  font-weight: 800 !important;
}
.qk-hint {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.qk-hint.center {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}
.qk-btn {
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
}
.qk-text {
  height: 96px;
  min-height: 70px;
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 12px;
}
.qk-ship-text {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.qk-msg {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 10px;
  text-align: center;
  display: none;
}
.qk-msg.ok,
.qk-msg.bad {
  display: block;
}
.qk-msg.ok {
  color: var(--success);
}
.qk-msg.bad {
  color: var(--danger);
  font-weight: 600;
}

.recharge-main { padding-top: 36px; padding-bottom: 60px; }
.recharge-card { max-width: 560px; margin: 0 auto; padding: 28px; }
.recharge-card h1 { margin: 0 0 12px; }
.recharge-card .form-input { margin: 8px 0 14px; }
.recharge-preview { margin-top: 22px; padding: 16px; border-radius: var(--radius); background: #ecfdf5; }
.recharge-preview strong { color: #047857; }
.recharge-session { min-height: 130px; resize: vertical; }
.recharge-ack { display: block; margin: 12px 0; font-size: 13px; line-height: 1.6; }
.recharge-table { overflow-x: auto; }
