/* Relight 内部系统 样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f6fb; --card: #fff; --border: #e6eaf2; --text: #1f2733; --muted: #6b7585;
  --primary: #2b5cff; --primary-dark: #1d44d6; --green: #18a058; --orange: #f59e0b;
  --purple: #8b5cf6; --red: #e5484d; --sidebar: #1a2233; --sidebar-hi: #2b3a55;
  --radius: 10px; --shadow: 0 1px 3px rgba(20,30,60,.06), 0 4px 12px rgba(20,30,60,.04);
}
html, body { height: 100%; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar); color: #cdd6e6; display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg,#2b5cff,#8b5cf6); color: #fff; font-weight: 700; display: grid; place-items: center; }
.brand-name { font-weight: 700; color: #fff; font-size: 16px; }
.brand-sub { font-size: 11px; color: #8794a8; }
.nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { padding: 10px 12px; border-radius: 8px; color: #cdd6e6; font-size: 14px; transition: all .15s; }
.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.user-box { margin-bottom: 8px; }
.user-name { color: #fff; font-weight: 600; }
.user-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-edit { flex-shrink: 0; background: none; border: 1px solid rgba(255,255,255,.22); color: #cdd6e6; font-size: 12px; padding: 1px 8px; border-radius: 6px; cursor: pointer; line-height: 1.7; transition: all .15s; }
.user-edit:hover { background: rgba(255,255,255,.14); color: #fff; }
.user-role { font-size: 12px; color: #8794a8; }
.btn-logout { display: block; text-align: center; padding: 8px; border-radius: 7px; background: rgba(255,255,255,.06); color: #cdd6e6; font-size: 13px; }
.btn-logout:hover { background: rgba(229,72,77,.2); color: #ffb3b6; text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.page-title { font-size: 18px; font-weight: 700; }
.rate-chip { font-size: 13px; color: var(--muted); background: #f4f6fb; padding: 6px 12px; border-radius: 20px; }
.rate-chip b { color: var(--text); }
.content { padding: 24px 28px; flex: 1; }

/* 闪存 */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #e8f8ef; color: #0a7d3e; border-color: #c3ead2; }
.alert-error { background: #fdecec; color: #b3261e; border-color: #f5c6c6; }
.alert-warning { background: #fff5e0; color: #9a6700; border-color: #ffe3a3; }
.alert-info { background: #eaf1ff; color: #1d44d6; border-color: #c7d8ff; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 700; }
.link { font-size: 13px; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-form .select { width: auto; min-width: 130px; flex: 0 0 auto; }
.filter-form input.input { width: 240px; flex: 0 0 auto; }
.filter-form .btn { white-space: nowrap; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
@media (max-width: 700px) {
  .filter-form input.input { width: 100%; flex: 1 1 100%; }
}

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); }
.btn-light:hover { background: #f4f6fb; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.btn-link.small { font-size: 12px; }

/* 表单 */
.input, .select { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; color: var(--text); }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43,92,255,.12); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
textarea.input { resize: vertical; min-height: 70px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form { display: flex; gap: 12px; padding: 18px; flex-wrap: wrap; align-items: end; }
.inline-form .field { margin-bottom: 0; flex: 0 0 auto; }
.inline-form .field > span { display: block; font-size: 12px; margin-bottom: 4px; }
.check-line { display: flex; align-items: center; gap: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.form-actions.full { grid-column: 1 / -1; }

.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.form-left, .form-right { display: flex; flex-direction: column; gap: 18px; }
.form-left .card, .form-right .card { margin-bottom: 0; padding: 18px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } .row-2 { grid-template-columns: 1fr; } }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.table th { background: #f9fafc; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.table tbody tr:hover { background: #f9fafc; }
.table .empty { text-align: center; color: var(--muted); padding: 28px; }
/* 操作列 td:保持 table-cell 随行等高,内部用行内流并排 */
.actions { white-space: nowrap; }
.actions > a,
.actions > form { display: inline-block; vertical-align: middle; }
.actions > a { margin-right: 10px; }
.actions > form { margin: 0 10px 0 0; }
.actions > *:last-child { margin-right: 0; }
.inline { display: inline; }
.row-paid-order td { background: #f6fbf8; }
.row-paid-order .order-no { color: var(--muted); }
.row-paid-order .order-src { display: inline-block; margin-top: 2px; font-size: 11px; color: #0a7d3e; }
.table-foot { padding: 12px 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }
.stock-input { width: 110px; text-align: center; }
.stock-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stock-tip { font-size: 12px; color: var(--muted); }

.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: lowercase; }
.badge-active, .badge-confirmed { background: #e8f8ef; color: #0a7d3e; }
.badge-inactive, .badge-rejected { background: #fdecec; color: #b3261e; }
.badge-pending { background: #fff5e0; color: #9a6700; }
.badge-cancelled { background: #eef0f4; color: #6b7585; }
.badge-main { background: var(--primary); color: #fff; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.discount-chip { background: #eaf1ff; color: var(--primary-dark); padding: 2px 8px; border-radius: 12px; font-weight: 600; }

/* 折扣计算示例 */
.discount-preview { font-size: 13px; color: var(--muted); }
.discount-preview b { color: var(--primary-dark); font-size: 16px; margin-left: 4px; }
.discount-demo { margin-top: 14px; border: 1px dashed #c3d2f5; background: #f7faff; border-radius: 8px; padding: 12px 14px; }
.discount-demo .demo-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.discount-demo .demo-head small { color: var(--muted); font-weight: 400; }
.demo-rows { display: flex; flex-direction: column; gap: 6px; }
.demo-row { display: flex; justify-content: space-between; font-size: 13px; color: #3a4657; }
.demo-row b { font-weight: 600; color: #1f2733; }
.demo-row.demo-result { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; margin: 2px 0 0; }
.demo-row.demo-result b { color: var(--primary-dark); font-size: 16px; }
.demo-note { margin-top: 8px; font-size: 12px; color: var(--muted); border-top: 1px dashed #dfe7f8; padding-top: 8px; line-height: 1.6; }

/* 统计卡 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s; }
.stat-card:hover { transform: translateY(-2px); text-decoration: none; }
.stat-num { font-size: 28px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-blue .stat-num { color: var(--primary); }
.stat-green .stat-num { color: var(--green); }
.stat-orange .stat-num { color: var(--orange); }
.stat-purple .stat-num { color: var(--purple); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* 详情页 */
.detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 18px; }
@media (max-width: 800px) { .detail-wrap { grid-template-columns: 1fr; } }
.gallery-main { background: #f4f6fb; border-radius: var(--radius); aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-main.no-img { display: grid; place-items: center; color: var(--muted); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.detail-info { display: flex; flex-direction: column; gap: 14px; }
.detail-name { font-size: 22px; font-weight: 700; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; }
.detail-row { font-size: 14px; }
.detail-desc { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.detail-desc-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.detail-desc-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--primary); }
.price-box { background: linear-gradient(135deg,#eaf1ff,#f0f4ff); border: 1px solid #c7d8ff; border-radius: var(--radius); padding: 16px; }
.price-box.highlight { background: linear-gradient(135deg,#1d44d6,#2b5cff); color: #fff; border-color: transparent; }
.price-box.dist-price { opacity: .7; }
.price-label { font-size: 12px; opacity: .8; }
.price-value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.price-sub { font-size: 13px; opacity: .85; margin-top: 2px; }
.price-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.price-card { background: #f9fafc; border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.price-card.highlight { background: #fff5e0; border-color: #ffe3a3; }
.pc-label { font-size: 12px; color: var(--muted); }
.pc-value { font-size: 18px; font-weight: 700; margin-top: 4px; }

/* 上传 */
.upload-area { display: block; border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; color: var(--muted); transition: all .15s; }
.upload-area:hover { border-color: var(--primary); color: var(--primary); }
.upload-area input { display: none; }
.upload-hint { font-size: 13px; }
.img-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 14px; }
.img-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; position: relative; }
.img-item.is-main { border-color: var(--primary); }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.img-meta { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: #f9fafc; }

/* 产品网格(分销商/sales) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; color: var(--text); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(20,30,60,.10); border-color: #d3dcee; }
.pc-link { display: block; color: inherit; flex: 1; min-height: 0; }
.pc-link:hover { text-decoration: none; }
.pc-media { position: relative; aspect-ratio: 1; background: #f4f6fb; overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.product-card:hover .pc-media img { transform: scale(1.05); }
.pc-badge { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg,#ff7a45,#ff4d4f); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; box-shadow: 0 2px 6px rgba(255,77,79,.35); letter-spacing: .5px; }
.pc-body { padding: 12px 14px 6px; }
.pc-name { font-weight: 600; font-size: 14px; line-height: 1.4; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pc-model { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-foot { padding: 10px 14px 14px; border-top: 1px solid var(--border); margin-top: 10px; }
.pc-origin { font-size: 11px; color: var(--muted); }
.pc-origin s { color: var(--red); margin-left: 2px; }
.pc-now { font-size: 20px; font-weight: 800; color: var(--primary); margin-top: 2px; line-height: 1.25; }
.pc-sub { font-size: 12px; color: var(--muted); }
.pc-add { margin-top: 10px; }
.pc-add .btn { width: 100%; border-radius: 8px; padding: 8px 10px; font-size: 13px; background: #eef3ff; color: var(--primary-dark); border: 1px solid #d5e0ff; transition: all .15s; }
.pc-add .btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty-block { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--muted); }

/* 价格明细(下单) */
.price-detail, .price-detail-total { display: flex; flex-direction: column; gap: 8px; }
.price-detail { padding: 14px 18px; }
.pd-row, .pdt-row { display: flex; justify-content: space-between; font-size: 13px; }
.pd-row span:last-child { font-weight: 500; }
.price-detail-total { padding: 14px 18px; border-top: 1px solid var(--border); background: #f9fafc; }
.pdt-row span:last-child, .pdt-row .big { font-weight: 700; font-size: 18px; color: var(--primary); }
.prod-summary { padding: 12px 18px; background: #f4f6fb; border-radius: 8px; margin-bottom: 14px; }
.ps-name { font-weight: 700; }
.ps-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 分页 */
.pagination { display: flex; gap: 4px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text); }
.pagination a:hover { background: #f4f6fb; text-decoration: none; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a.disabled { opacity: .4; pointer-events: none; }
.pagination .ellipsis { padding: 6px 8px; color: var(--muted); }

/* 登录页 */
.login-page { background: linear-gradient(135deg, #1a2233, #2b3a55); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-logo { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg,#2b5cff,#8b5cf6); color: #fff; font-weight: 800; display: grid; place-items: center; margin: 0 auto 16px; font-size: 22px; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-switch { text-align: center; margin-top: 16px; font-size: 13px; }
.login-hint { text-align: center; margin-top: 12px; font-size: 11px; color: var(--muted); }
.login-copyright { text-align: center; margin-top: 14px; font-size: 11px; color: var(--muted); }

/* 产品参数编辑器 */
.param-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; background: #f9fafc; border-bottom: 1px solid var(--border); }
.pq-label { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.pq-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 4px 10px; border-radius: 14px; font-size: 12px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: #eaf1ff; }
.param-tip { padding: 8px 18px 0; font-size: 12px; color: var(--muted); }
.param-list { padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.param-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; }
.param-row .btn-link { white-space: nowrap; }
@media (max-width: 500px) { .param-row { grid-template-columns: 1fr; } }

/* 参数展示盒(分销商详情) */
.specs-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.specs-title { background: #f9fafc; padding: 8px 16px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); }

/* 参数展示表 */
.params-table { width: 100%; border-collapse: collapse; }
.params-table th, .params-table td { padding: 9px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.params-table th { width: 140px; background: #f9fafc; color: var(--muted); font-weight: 600; text-align: left; }
.params-table tr:last-child td { border-bottom: none; }

/* 型号/版本下拉 */
.variant-box { display: flex; flex-direction: column; gap: 6px; }
.variant-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.variant-control { display: flex; align-items: center; gap: 10px; }
.variant-select { max-width: 320px; }
.variant-stock { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 12px; white-space: nowrap; }
.variant-stock.in-stock { background: #e8f8ef; color: #0a7d3e; }
.variant-stock.out-stock { background: #fdecec; color: #b3261e; }

/* 参数空态 */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 20px; text-align: center; }
.empty-icon { width: 46px; height: 46px; border-radius: 50%; background: #eef1f7; color: #9aa3b2; display: grid; place-items: center; font-size: 22px; }
.empty-text { color: var(--muted); font-size: 13px; }

/* 富文本详情展示 */
.rich-content { font-size: 14px; line-height: 1.8; word-break: break-word; }
.rich-content img { max-width: 100%; border-radius: 6px; }
.rich-content table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.rich-content table td, .rich-content table th { border: 1px solid var(--border); padding: 6px 10px; }
.rich-content a { color: var(--primary); }

/* TinyMCE 编辑区 */
.tox-tinymce { border-radius: 8px !important; border-color: var(--border) !important; }

/* 灯箱:点击大图 */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 15, 25, .82); display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox-box { max-width: min(1200px, 94vw); max-height: 92vh; background: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.4); cursor: default; }
.lightbox-box img { max-width: min(1160px, 92vw); max-height: 88vh; object-fit: contain; border-radius: 6px; }

/* 图库交互 */
.detail-gallery .gallery-main img { cursor: zoom-in; }
.gallery-thumbs img { cursor: pointer; transition: all .15s; opacity: .75; }
.gallery-thumbs img:hover { opacity: 1; transform: translateY(-2px); }
.gallery-thumbs img.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); opacity: 1; }

/* 审核操作卡片 */
.audit-card .card-head { gap: 10px; }
.card-hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.audit-form { display: block; }
.audit-body { display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding: 20px 22px 24px; }
@media (max-width: 760px) { .audit-body { grid-template-columns: 1fr; } }
.audit-left { display: flex; flex-direction: column; gap: 12px; border-right: 1px dashed var(--border); padding-right: 20px; }
@media (max-width: 760px) { .audit-left { border-right: none; border-bottom: 1px dashed var(--border); padding-right: 0; padding-bottom: 18px; } }
.audit-sec-title { font-size: 13px; color: var(--muted); font-weight: 600; }
.status-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.status-opt { position: relative; display: inline-flex; }
.status-opt input { position: absolute; opacity: 0; pointer-events: none; }
.status-chip { display: inline-block; padding: 9px 18px; border: 2px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; background: #fff; color: var(--muted); }
.status-opt:hover .status-chip { border-color: #b9c6e6; }
.status-opt input:checked + .status-chip { border-color: var(--primary); background: #eaf1ff; color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(43,92,255,.1); }
.status-opt input:checked + .sp-confirmed { border-color: var(--green); background: #e8f8ef; color: #0a7d3e; box-shadow: 0 0 0 3px rgba(24,160,88,.12); }
.status-opt input:checked + .sp-rejected { border-color: var(--red); background: #fdecec; color: #b3261e; box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
.status-opt input:checked + .sp-pending { border-color: var(--orange); background: #fff5e0; color: #9a6700; box-shadow: 0 0 0 3px rgba(245,158,11,.14); }
.audit-tip { font-size: 12px; color: var(--muted); }
.audit-cur { text-transform: capitalize; }
.audit-right { display: flex; flex-direction: column; gap: 4px; }
.audit-right .field { margin-bottom: 6px; }
.audit-actions { justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }

/* 支付类型选择 */
.pay-type-row, .pay-types { display: flex; gap: 12px; flex-wrap: wrap; }
.pay-types { padding: 16px 18px 20px; }
.pay-type-opt { position: relative; display: inline-flex; flex: 1 1 0; align-items: stretch; }
.pay-type-row .pay-type-opt { flex: 0 0 auto; }
.pay-type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-box { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s; background: #fff; color: var(--text); }
.pay-type-opt:hover .pay-box { border-color: #b9c6e6; }
.pay-type-opt input:checked + .pay-box { border-color: var(--primary); background: #eaf1ff; color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(43,92,255,.1); }
.pay-ico { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; flex: none; color: #fff; font-size: 13px; font-weight: 700; font-style: normal; }
.pay-ico.alipay { background: linear-gradient(135deg,#1677ff,#36a7ff); }
.pay-ico.wxpay { background: linear-gradient(135deg,#07c160,#29d97f); }

/* 结算付款卡 */
.pay-card { background: linear-gradient(180deg, #fff, #f6f8fd) !important; }
.pay-btn-tip { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 10px; }

/* 支付结果 */
.result-box { text-align: center; padding: 40px 24px 30px; }
.result-icon { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.result-icon.ok { background: #e8f8ef; color: #18a058; }
.result-icon.wait { background: #fff5e0; color: #f59e0b; }
.result-title { font-size: 20px; font-weight: 700; }
.result-desc { color: var(--muted); font-size: 13px; margin-top: 6px; }
.result-meta { margin: 16px auto 0; display: inline-flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); background: #f9fafc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; }

/* 提示 */
.tip-note { font-size: 12px; color: var(--muted); }

/* 购物车徽标与页 */
.cart-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; text-align: center; margin-left: 6px; }
.cart-prod { display: flex; align-items: center; gap: 10px; }
.cart-qty-form { display: inline-block; }
.cart-qty { width: 72px; text-align: center; }
.cart-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--border); }
.cart-total { font-size: 14px; }
.total-rmb { color: var(--primary); }
.page-sub { font-size: 13px; color: var(--muted); font-weight: 500; }

/* 结算清单 */
.order-items { padding: 10px 18px; display: flex; flex-direction: column; }
.order-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.order-item:last-child { border-bottom: none; }
.oi-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.oi-amt { font-weight: 600; color: var(--primary); white-space: nowrap; }

/* 卡片右上角:记录总数 + 分页 */
.card-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.card-head-right .pager-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.card-head-right .pagination { margin: 0; justify-content: flex-end; }

/* 收款/发票相关 */
.badge-shipped, .badge-invoice { background: #eaf1ff; color: #1d44d6; }
.pay-qr-img { width: 150px; height: 150px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.pay-qr-img.sm { width: 90px; height: 90px; }
.proof-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.proof-grid a { display: block; }
.proof-grid img { width: 110px; height: 110px; object-fit: cover; border: 1px solid var(--border); border-radius: 8px; }
.state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }


/* 加入购物车数量步进 */
.qty-stepper { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.qty-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; color: var(--text); font-size: 15px; line-height: 1; }
.qty-btn:hover { background: #f4f6fb; }
.qty-input { text-align: center; }

/* 商品卡片按钮尺寸(加购版) */
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 系统配置管理后台(/lovelium) */
.cfgp-page { background: var(--bg); min-height: 100vh; }
.cfgp-head { background: #1a2233; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.cfgp-head-inner { max-width: 780px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.cfgp-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.cfgp-brand b { font-size: 16px; display: block; line-height: 1.2; }
.cfgp-brand small { font-size: 11px; color: #8794a8; }
.cfgp-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg,#2b5cff,#8b5cf6); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.cfgp-main { max-width: 780px; margin: 0 auto; padding: 28px 20px 60px; }
.cfgp-card { margin-bottom: 16px; }
.card-form { padding: 20px 22px 22px; }
.card-form .field { margin-bottom: 18px; }
.card-form-actions { border-top: 1px solid var(--border); padding-top: 16px; display: flex; justify-content: flex-end; }
.secret-wrap { display: flex; gap: 8px; }
.secret-wrap .input { flex: 1; }
.secret-toggle { white-space: nowrap; }
.field-tip { font-size: 12px; color: var(--muted); }
.cfgp-note { text-align: center; color: var(--muted); font-size: 13px; }
.cfgp-note a { color: var(--primary); }

/* 模态 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; align-items: center; justify-content: center; }
.modal-card { background: #fff; border-radius: var(--radius); padding: 24px; width: 420px; max-width: 92vw; }
.modal-card h3 { margin-bottom: 16px; }
