/* ===================== 后台设计系统（管理/商家共用） ===================== */
:root {
  --b-bg: #f4f5fb;
  --b-side: #1c1b2e;
  --b-side-2: #26243d;
  --b-brand: #6c4cff;
  --b-ink: #23233a;
  --b-line: #ececf3;
  --b-card: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.backend { background: var(--b-bg); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; color: var(--b-ink); -webkit-font-smoothing: antialiased; }

/* 布局 */
.b-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
@media (max-width: 920px){ .b-shell { grid-template-columns: 1fr; } }

/* 侧边栏 */
.b-side { background: var(--b-side); color: #c9c7e0; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.b-side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; font-weight: 800; color: #fff; font-size: 18px; }
.b-side .brand .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--b-brand), #9b6bff); display: flex; align-items: center; justify-content: center; color: #fff; }
.b-side .group { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #6f6d92; margin: 18px 10px 8px; }
.b-side a.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c9c7e0; font-size: 14px; font-weight: 600; margin-bottom: 3px; transition: .12s; }
.b-side a.item:hover { background: var(--b-side-2); color: #fff; }
.b-side a.item.active { background: linear-gradient(135deg, var(--b-brand), #8a5cff); color: #fff; box-shadow: 0 6px 16px rgba(108,76,255,.35); }
.b-side a.item .icon { opacity: .9; }
.b-side .me { margin-top: 14px; padding: 12px; background: var(--b-side-2); border-radius: 12px; }
.b-side .me .row { display: flex; align-items: center; gap: 10px; }
.b-side .me .nm { color: #fff; font-weight: 700; font-size: 14px; }
.b-side .me .rl { font-size: 12px; color: #9d9bc0; }

/* 主区 */
.b-main { display: flex; flex-direction: column; min-width: 0; }
.b-top { height: 62px; background: #fff; border-bottom: 1px solid var(--b-line); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 20; }
.b-top h1 { font-size: 18px; margin: 0; font-weight: 800; }
.b-top .crumb { font-size: 13px; color: #9a98b5; }
.b-top .right { display: flex; align-items: center; gap: 14px; }
.b-content { padding: 26px; }

/* 卡片/面板 */
.panel { background: var(--b-card); border: 1px solid var(--b-line); border-radius: 16px; padding: 22px; box-shadow: 0 4px 18px rgba(40,30,90,.04); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.panel-tabs { display: flex; gap: 6px; }
.panel-tabs a { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: #6c6a8a; background: #f4f5fb; }
.panel-tabs a.active { background: var(--b-brand); color: #fff; }

/* 统计卡 */
.b-stat { background: #fff; border: 1px solid var(--b-line); border-radius: 16px; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.b-stat .ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
.b-stat .num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.b-stat .label { font-size: 13px; color: #8a88a8; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #9a98b5; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--b-line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--b-line); font-size: 14px; vertical-align: middle; }
.table tbody tr:hover { background: #faf9ff; }
.table .thumb { width: 46px; height: 46px; border-radius: 9px; background: linear-gradient(135deg,#f3f0ff,#ece8ff); display: flex; align-items: center; justify-content: center; color: var(--b-brand); overflow: hidden; }
.table .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-title { font-weight: 700; }
.cell-sub { font-size: 12px; color: #9a98b5; }

/* 表格操作按钮组 */
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.act { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--b-line); background: #fff; color: #5a587a; }
.act:hover { border-color: var(--b-brand); color: var(--b-brand); }
.act.ok { color: #0e8a52; border-color: #c7ecd8; }
.act.ok:hover { background: #e6f9f0; }
.act.danger { color: #c5284a; border-color: #f3c6d1; }
.act.danger:hover { background: #ffe9ee; }

/* 表单 */
.b-field { margin-bottom: 18px; }
.b-field label { display: block; font-size: 13px; font-weight: 700; color: #5a587a; margin-bottom: 7px; }
.b-input, .b-textarea, .b-select { width: 100%; padding: 11px 13px; border: 1px solid #e0dfee; border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--b-ink); background: #fff; transition: .15s; }
.b-input:focus, .b-textarea:focus, .b-select:focus { outline: none; border-color: var(--b-brand); box-shadow: 0 0 0 3px rgba(108,76,255,.13); }
.b-textarea { min-height: 150px; resize: vertical; }
.b-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width:640px){ .b-row { grid-template-columns: 1fr; } }
.req { color: #f0506e; margin-left: 3px; }

/* 上传 */
.uploader { display: flex; flex-wrap: wrap; gap: 14px; }
.up-box { width: 120px; height: 120px; border: 2px dashed #d8d6ec; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9a98b5; cursor: pointer; transition: .15s; position: relative; overflow: hidden; }
.up-box:hover { border-color: var(--b-brand); color: var(--b-brand); }
.up-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-box .del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.55); color: #fff; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; }
.up-box.removing { opacity: .4; filter: grayscale(1); }

/* 协议查看区 */
.proto { max-height: 420px; overflow: auto; border: 1px solid var(--b-line); border-radius: 12px; padding: 20px; background: #fcfcff; font-size: 14px; line-height: 1.8; color: #4a4a5e; white-space: pre-wrap; }

/* 审核详情网格 */
.detail-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 820px){ .detail-grid2 { grid-template-columns: 1fr; } }
.kv { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--b-line); font-size: 14px; }
.kv .k { width: 120px; color: #9a98b5; flex-shrink: 0; }
.kv .v { font-weight: 600; }
.doc-img { width: 100%; border-radius: 12px; border: 1px solid var(--b-line); margin-bottom: 10px; }

/* 状态徽章（后台） */
.tag-ok { background: #e6f9f0; color: #0e8a52; }
.tag-warn { background: #fff4e0; color: #b9791a; }
.tag-danger { background: #ffe9ee; color: #c5284a; }
.tag-mute { background: #f0f0f5; color: #8a88a8; }
.tag-brand { background: #efeaff; color: #5a3fd0; }
.tag-info { background: #e6f0ff; color: #2f6fd0; }

/* 筛选条 */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filterbar .b-input, .filterbar .b-select { width: auto; min-width: 150px; }
.filterbar .spacer { flex: 1; }

/* 提示条 */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.note-info { background: #efeaff; color: #5a3fd0; }
.note-warn { background: #fff4e0; color: #9a6a12; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pager a { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--b-line); font-size: 13px; color: #5a587a; background: #fff; }
.pager a.active { background: var(--b-brand); color: #fff; border-color: var(--b-brand); }

/* 登录页（后台） */
.b-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1c1b2e,#6c4cff); padding: 24px; }
.b-login .card { width: 420px; max-width: 100%; background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 24px 70px rgba(10,5,40,.4); }
.b-login .brand { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; font-size: 22px; color: var(--b-ink); margin-bottom: 4px; }
.b-login .sub { text-align: center; color: #9a98b5; font-size: 13px; margin-bottom: 26px; }

/* 结算/财务表 */
.ledger { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 820px){ .ledger { grid-template-columns: repeat(2,1fr); } }
.ledger .item { background: #fff; border: 1px solid var(--b-line); border-radius: 14px; padding: 16px; }
.ledger .item .n { font-size: 22px; font-weight: 800; }
.ledger .item .l { font-size: 12px; color: #9a98b5; }

/* 进度步骤（入驻） */
.prog { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.prog .s { display: flex; align-items: center; gap: 10px; color: #9a98b5; font-weight: 600; font-size: 14px; }
.prog .s .d { width: 30px; height: 30px; border-radius: 50%; background: #ececf3; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.prog .s.done { color: var(--b-brand); }
.prog .s.done .d, .prog .s.active .d { background: var(--b-brand); color: #fff; }
.prog .s.active { color: var(--b-ink); }
.prog .l { flex: 1; height: 2px; background: #e6e5f0; margin: 0 12px; }
.prog .l.done { background: var(--b-brand); }

/* 只读展示 */
.ro { background: #faf9ff; border: 1px solid var(--b-line); border-radius: 10px; padding: 11px 13px; font-size: 14px; color: var(--b-ink); min-height: 44px; display: flex; align-items: center; }

/* ===================== 登录页组件 & 工具类（后台自包含，不依赖前端 style.css） ===================== */
.muted { color: #9a98b5; }
.flex { display: flex; }
.flex.between, .between { justify-content: space-between; }
.items-center { align-items: center; }
.mt16 { margin-top: 16px; }
.fz13 { font-size: 13px; }
.fw7 { font-weight: 700; }
.fw8 { font-weight: 800; }
.c-brand { color: var(--b-brand); }
.c-brand:hover { color: #5a3fd0; }

/* 按钮（与后台主色统一） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 11px; border: 1px solid transparent; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--b-brand), #9b6bff); color: #fff; box-shadow: 0 8px 20px rgba(108,76,255,.32); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(108,76,255,.42); }
.btn-ghost { background: #fff; border-color: var(--b-line); color: #5a587a; }
.btn-ghost:hover { border-color: var(--b-brand); color: var(--b-brand); }
.btn-danger { background: #fff; border-color: #ffd0da; color: #c5284a; }
.btn-danger:hover { background: #c5284a; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge-ok { background: #e6f9f0; color: #0e8a52; }
.badge-warn { background: #fff4e0; color: #b9791a; }
.badge-danger { background: #ffe9ee; color: #c5284a; }
.badge-mute { background: #f0f0f5; color: #8a88a8; }
.badge-brand { background: #efeaff; color: #5a3fd0; }

/* 提示条 */
.flash { padding: 11px 16px; border-radius: 10px; font-size: 14px; margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.flash-err { background: #ffe9ee; color: #c5284a; }
.flash-ok { background: #e6f9f0; color: #0e8a52; }

/* 登录卡片细化 */
.b-login .card.login-card { width: 400px; max-width: 100%; background: #fff; border-radius: 22px; padding: 38px 36px; box-shadow: 0 30px 80px rgba(10,5,40,.45); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand .mark { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--b-brand), #9b6bff); display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 20px rgba(108,76,255,.35); flex-shrink: 0; }
.login-brand .lt { font-weight: 800; font-size: 20px; color: var(--b-ink); line-height: 1.2; }
.login-brand .ls { font-size: 12.5px; color: #9a98b5; margin-top: 3px; }
.b-input-wrap { position: relative; }
.b-input-wrap .b-input-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #b3b1cf; display: inline-flex; pointer-events: none; }
.b-input-wrap .b-input { padding-left: 42px; }
.login-btn { margin-top: 6px; padding: 13px; font-size: 15px; letter-spacing: 3px; }

/* ===================== 共享组件（与公开站 style.css 对齐，统一紫系变量） ===================== */
/* 栅格 */
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2,1fr); }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.cols-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 980px){ .cols-4{grid-template-columns:repeat(2,1fr);} .cols-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 640px){ .cols-2,.cols-3,.cols-4{grid-template-columns:1fr;} }

/* 间距 / 工具类 */
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mt32{margin-top:32px}
.mb4{margin-bottom:4px}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap24 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.fz13{font-size:13px}.fz14{font-size:14px}.fz18{font-size:18px}.fz22{font-size:22px}
.fw7{font-weight:700}.fw8{font-weight:800}
.c-ok{color:#0e8a52}.c-warn{color:#b9791a}.c-danger{color:#c5284a}.c-brand{color:var(--b-brand)}.c-mute{color:#9a98b5}
.c-purple{color:var(--b-brand)}.c-green{color:#0e8a52}
.right{text-align:right}.left{text-align:left}
.nowrap{white-space:nowrap}
.divider{height:1px;background:var(--b-line);margin:18px 0}
.line-clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 表单（与公开 .field/.input 对齐） */
.field { margin-bottom: 16px; }
.field label, .lbl { display: block; font-size: 13px; font-weight: 600; color: #5a587a; margin-bottom: 6px; }
.field .req, .req { color: #f0506e; margin-left: 2px; }
.inp, .input { width: 100%; padding: 11px 13px; border: 1px solid #e0dfee; border-radius: 10px; font-size: 14px; color: var(--b-ink); background: #fff; transition: .15s; font-family: inherit; }
.inp:focus, .input:focus { outline: none; border-color: var(--b-brand); box-shadow: 0 0 0 3px rgba(108,76,255,.13); }
.form-row, .b-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
@media (max-width:640px){ .form-row,.b-row,.form-grid,.form-grid2 { grid-template-columns: 1fr; } }
.agree { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: #efeaff; border-radius: 10px; font-size: 13px; }
.agree input { margin-top: 4px; }
.hint { font-size: 12px; color: #9a98b5; margin-top: 6px; }
.lh18 { line-height: 1.8; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.spec-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--b-line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.btn-line { background: transparent; border-color: var(--b-brand); color: var(--b-brand); }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: #9a98b5; }
.empty .ic { width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 20px; background: #efeaff; color: var(--b-brand); display: flex; align-items: center; justify-content: center; }

/* 头像 */
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; background: #efeaff; display: flex; align-items: center; justify-content: center; color: var(--b-brand); font-weight: 700; overflow: hidden; }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* 标签 / 链接 */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #efeaff; color: #5a3fd0; }
.link-more { color: var(--b-brand); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* 详情画廊（商品审核） */
.gallery .main { aspect-ratio: 1/1; border-radius: 14px; background: linear-gradient(135deg,#efeaff,#e3dcff); display: flex; align-items: center; justify-content: center; color: var(--b-brand); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs .t { width: 64px; height: 64px; border-radius: 10px; border: 2px solid transparent; background: #efeaff; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--b-brand); }
.thumbs .t.active, .thumbs .t:hover { border-color: var(--b-brand); }

/* 价格（后台财务 / 商品金额独立类） */
.price { color: #c5284a; font-weight: 800; font-size: 18px; }
.price small { color: #9a98b5; font-weight: 500; text-decoration: line-through; font-size: 12px; margin-left: 6px; }
