* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #FBF7F2; color: #2B211A; }
.hidden, [hidden] { display: none !important; }

/* 登录 */
.login-mask { position: fixed; inset: 0; background: linear-gradient(135deg, #FF9A3D, #FF7A29); display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; background: #fff; border-radius: 20px; padding: 36px 30px; box-shadow: 0 20px 50px rgba(255,122,41,.30); }
.login-logo { font-size: 26px; font-weight: 800; color: #FF7A29; text-align: center; }
.login-sub { font-size: 13px; color: #9A948C; text-align: center; margin-bottom: 24px; }
.inp { width: 100%; height: 46px; border: 1.5px solid #F0E6DC; border-radius: 12px; padding: 0 14px; margin-bottom: 14px; font-size: 14px; transition: .2s; }
.inp:focus { border-color: #FF7A29; outline: none; box-shadow: 0 0 0 3px rgba(255,122,41,.12); }
.btn { width: 100%; height: 46px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, #FF9A3D, #FF7A29); color: #fff; box-shadow: 0 8px 20px rgba(255,122,41,.30); }
.btn-primary:active { transform: translateY(1px); }
.login-tip { font-size: 12px; color: #9A948C; text-align: center; margin-top: 14px; }

/* 框架 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #2B211A; color: #C9BFB4; padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-size: 18px; font-weight: 800; color: #fff; padding: 6px 10px 20px; }
.brand::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #FF7A29; margin-right: 8px; vertical-align: middle; }
.nav-item { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; background: transparent; border: none; color: #C9BFB4; padding: 12px 14px; border-radius: 10px; font-size: 14px; cursor: pointer; margin-bottom: 4px; transition: .15s; }
.nav-item:hover { background: #3A2D22; color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #FF9A3D, #FF7A29); color: #fff; box-shadow: 0 6px 16px rgba(255,122,41,.35); }
.badge { background: #FF5252; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.side-foot { margin-top: auto; font-size: 12px; color: #8A7F73; display: flex; justify-content: space-between; padding: 12px 10px; border-top: 1px solid #3A2D22; }
.link { background: none; border: none; color: #FF9A3D; cursor: pointer; font-size: 12px; }
.content { flex: 1; padding: 26px 30px; overflow: auto; background: #FBF7F2; }

/* 卡片 / 通用 */
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; color: #2B211A; }
.card { background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(43,33,26,.05); border: 1px solid #F3EBE2; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: #2B211A; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(43,33,26,.05); border: 1px solid #F3EBE2; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -20px; top: -20px; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,122,41,.08); }
.kpi .num { font-size: 28px; font-weight: 800; color: #FF7A29; }
.kpi .cap { font-size: 13px; color: #9A948C; margin-top: 6px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 12px 14px; border-bottom: 1px solid #F3EBE2; text-align: left; vertical-align: middle; }
.tbl th { color: #9A948C; font-weight: 600; background: #FDF7F0; white-space: nowrap; }
.tbl tr:hover td { background: #FDF7F0; }
/* 不换行单元格：时间戳、单数统计、状态标签等，避免被列宽挤断成多行 */
.tbl td.nw { white-space: nowrap; }
/* 操作按钮组：单行排列、统一间距、不折行 */
.tbl .acts { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.tbl .acts .btn-sm { margin-right: 0; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 8px; font-size: 12px; background: #F3EBE2; color: #6B5D4F; white-space: nowrap; }
.tag.warn { background: #FFF1E0; color: #C2720A; }
.tag.ok { background: #E8F6EC; color: #1E9E4A; }
.tag.bad { background: #FDECEA; color: #D33B2C; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; border: 1px solid #E6D9CC; background: #fff; cursor: pointer; margin-right: 6px; white-space: nowrap; transition: .15s; }
.btn-sm:hover { border-color: #FF7A29; color: #FF7A29; }
.btn-sm.ok { background: linear-gradient(135deg, #FF9A3D, #FF7A29); color: #fff; border-color: transparent; }
.btn-sm.ok:hover { color: #fff; opacity: .92; }
.btn-sm.bad { background: #D33B2C; color: #fff; border-color: #D33B2C; }
.btn-sm.bad:hover { color: #fff; opacity: .92; }
.btn-sm.ghost { background: #fff; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #6B5D4F; margin-bottom: 6px; }
.field input { width: 100%; height: 40px; border: 1.5px solid #F0E6DC; border-radius: 10px; padding: 0 12px; font-size: 14px; }
.field input:focus { border-color: #FF7A29; outline: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.tab { padding: 7px 16px; border-radius: 10px; border: 1px solid #E6D9CC; background: #fff; cursor: pointer; font-size: 13px; }
.tab.active { background: linear-gradient(135deg, #FF9A3D, #FF7A29); color: #fff; border-color: transparent; }

/* 弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(43,33,26,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { width: 700px; max-width: 92vw; max-height: 86vh; overflow: auto; background: #fff; border-radius: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid #F3EBE2; font-weight: 700; }
.modal-body { padding: 22px; }
.timeline { border-left: 2px solid #F0D9C2; margin-left: 6px; padding-left: 16px; }
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #FF7A29; }
.timeline-item .t-title { font-size: 14px; font-weight: 600; }
.timeline-item .t-time { font-size: 12px; color: #9A948C; margin-top: 2px; }

.toast { position: fixed; left: 50%; top: 40px; transform: translateX(-50%); background: rgba(43,33,26,.90); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 100; }
.muted { color: #9A948C; font-size: 12px; }
.export-bar { margin-bottom: 12px; }
.flow { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.flow .step { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: #F3EBE2; color: #6B5D4F; }
.flow .step.cur { background: linear-gradient(135deg, #FF9A3D, #FF7A29); color: #fff; }
.flow .step.done { background: #FDE7D4; color: #C2720A; }

/* ============================================================
   V9：客户 / 师傅信息 + 订单全链路看板
   ============================================================ */
.col { display: flex; flex-direction: column; min-width: 0; }
.row .col { gap: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-flex; flex: none; border: 1px solid #F0E6DC; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-ph { align-items: center; justify-content: center; background: linear-gradient(135deg,#FF9A3D,#FF7A29); color: #fff; font-weight: 700; font-size: 16px; }
.avatar-sm.avatar-ph { font-size: 13px; }
.kpi-strip { margin-bottom: 16px; }
.kpi-strip .kpi { padding: 16px; }
.kpi-strip .kpi .num { font-size: 24px; }
.inp-inline { width: 100%; height: 38px; border: 1.5px solid #F0E6DC; border-radius: 10px; padding: 0 12px; font-size: 13px; margin-bottom: 0; }
.inp-inline:focus { border-color: #FF7A29; outline: none; }
.flag-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; font-size: 13px; }
.flag-grid > div { padding: 8px 0; border-bottom: 1px dashed #F3EBE2; }
.proof-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.proof { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid #F0E6DC; background: #FBF7F2; transition: .15s; }
.proof:hover { border-color: #FF7A29; transform: translateY(-2px); }
.tbl td .row { gap: 10px; }
.tbl td .muted { white-space: nowrap; }
/* V10：注册手机验证开关 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.switch-info { flex: 1; min-width: 0; }
.switch-state { font-size: 14px; font-weight: 600; }
.switch-group { flex: none; display: flex; gap: 8px; }
.switch-group .btn-sm { margin-right: 0; min-width: 96px; }
.btn-sm.warnbtn { background: #FFF1E0; color: #C2720A; border-color: #F3D3AC; }
.btn-sm.warnbtn:hover { background: #FFE4C4; color: #A65E05; border-color: #E7BA87; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .flag-grid { grid-template-columns: 1fr; }
  .switch-row { flex-direction: column; align-items: flex-start; }
}

/* V11：页面失败兜底 / JS 版本标识 */
.err-box { background: #FFF6F2; border: 1px solid #F3CDBD; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.9; color: #6B4335; }
.err-box code { background: #FDECE3; padding: 1px 5px; border-radius: 4px; }
.side-ver { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 6px; letter-spacing: .3px; }

/* ============================================================
   V12：订单信息看板「客户」列 —— 头像 + 姓名 + 手机号 双行紧凑卡片
   旧版 <img> 与灰字平铺，列窄即换行错位；现在整格 flex 居中，不再被 11 列挤压。
   ============================================================ */
.board-tbl th:nth-child(3), .board-tbl td:nth-child(3) { min-width: 168px; }
.cust-cell { display: inline-flex; align-items: center; gap: 9px; min-width: 148px; max-width: 190px; vertical-align: middle; }
.cust-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #F0E6DC; }
.cust-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.25; }
.cust-name { font-size: 13px; font-weight: 600; color: #2B211A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-phone { font-size: 11px; color: #9A948C; white-space: nowrap; letter-spacing: .3px; }
.cust-phone.cust-unbound { color: #C2720A; }

/* ============================================================
   V13：订单详情 —— 只显示当前状态 + 管理员改状态 + 业务字段明细
   旧版把 values 原样 JSON.stringify 成一大块 <pre>，运营无法阅读。
   ============================================================ */
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.status-cur { font-size: 13px; padding: 4px 12px; background: #FDE7D4; color: #C2720A; font-weight: 600; }
.status-editor { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sel-inline { height: 34px; min-width: 158px; border: 1.5px solid #F0E6DC; border-radius: 10px; padding: 0 10px; font-size: 13px; background: #fff; color: #2B211A; }
.sel-inline:focus { border-color: #FF7A29; outline: none; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.kv { padding: 9px 0; border-bottom: 1px dashed #F3EBE2; min-width: 0; }
.kv-k { font-size: 12px; color: #9A948C; margin-bottom: 4px; }
.kv-v { font-size: 13px; color: #2B211A; line-height: 1.6; word-break: break-word; }
.kv-wide { grid-column: 1 / -1; }
.kv-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid #F0E6DC; margin-right: 6px; }
@media (max-width: 700px) { .kv-grid { grid-template-columns: 1fr; } }

/* V20：器材类型管理页 */
.eq-list { display: flex; flex-wrap: wrap; gap: 8px; }
.eq-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13px; }
.eq-del { border: 0; background: transparent; color: #B9AFa4; font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; }
.eq-del:hover { color: #C0392B; }
/* V33：器材二级分类（分类名编辑行） */
.eq-cat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.eq-cat-idx { font-size: 12px; color: #9A948C; white-space: nowrap; }
.eq-cat-name { font-size: 14px; font-weight: 600; min-width: 200px; max-width: 280px; }
/* V34：器材项编辑行（名称 + 个人参考价 + 团体协议价，网格对齐） */
.eq-item-head { display: grid; grid-template-columns: minmax(140px, 1.4fr) 1fr 1fr 28px; gap: 8px; margin-bottom: 6px; font-size: 12px; color: #9A948C; }
.eq-item-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) 1fr 1fr 28px; gap: 8px; align-items: center; flex: 1 1 100%; margin-bottom: 8px; }
.eq-item-name { font-size: 13px; font-weight: 600; padding: 6px 10px; }
.eq-price { font-size: 13px; padding: 6px 10px; min-width: 0; }
.eq-add-row { flex-wrap: nowrap; gap: 8px; }

/* ============================================================
   V25：等级与积分管理页 —— 规则开关行 / 阶梯编辑 / 徽章 / 示例框
   ============================================================ */
.lv-row { display: flex; align-items: flex-start; gap: 20px; padding: 12px 0; border-bottom: 1px dashed #F3EBE2; }
.lv-row:last-of-type { border-bottom: 0; }
.lv-label { flex: 0 0 180px; font-size: 13px; font-weight: 600; color: #2B211A; line-height: 1.5; }
.lv-label .muted { font-size: 11px; font-weight: 400; }
.lv-ctl { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lv-ctl .btn-sm { margin-right: 0; }
.lv-inline label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6B5D4F; }
.inp-mini { height: 32px; min-width: 76px; max-width: 150px; border: 1.5px solid #F0E6DC; border-radius: 8px; padding: 0 8px; font-size: 13px; background: #fff; color: #2B211A; }
.inp-mini:focus { border-color: #FF7A29; outline: none; }
.inp-mini.lv-num { max-width: 96px; }
.lv-color { width: 44px; height: 32px; border: 1.5px solid #F0E6DC; border-radius: 8px; background: #fff; padding: 2px; cursor: pointer; }
.lv-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.lv-badge { display: inline-block; padding: 3px 12px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
/* V26：等级图标（上传后显示在阶梯行与师傅看板；未上传则显示颜色徽章/首字母） */
/* V27：图标列文字排列整齐 —— 上传按钮不换行、居中对齐 */
.lv-icon-cell { text-align: center; vertical-align: middle; padding: 8px 4px; }
.lv-icon-img { display: block; width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 8px; object-fit: contain; background: #F3EEE7; border: 1px solid #ECE3D8; }
.lv-upload-btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; font-size: 12px; color: #6B8E7F; background: #F1F6F3; border: 1px dashed #C2D6CA; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.lv-upload-btn:hover { background: #E6F0EB; }
.lv-badge-icon { display: inline-block; width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #F3EEE7; border: 1px solid #ECE3D8; vertical-align: middle; }
.btn-link { display: block; margin: 0 auto; border: 0; background: transparent; color: #C0392B; font-size: 12px; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.lv-sel { height: 32px; min-width: 118px; font-size: 12px; padding: 0 6px; }
.lv-adj { max-width: 92px; }
.lv-example { background: #FDF7F0; border: 1px solid #F3E4D3; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.8; color: #6B4335; }
@media (max-width: 900px) {
  .lv-row { flex-direction: column; gap: 8px; }
  .lv-label { flex: none; }
}

/* V30：广告位 Banner 管理（预览 / 上传按钮 / 列表缩略图 / 表单控件） */
.bn-preview { width: 240px; height: 80px; border: 1px dashed #E4DDD3; border-radius: 10px; background: #FBF7F2; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #9A948C; font-size: 12px; flex: none; }
.bn-preview img { width: 100%; height: 100%; object-fit: cover; }
.bn-thumb { width: 120px; height: 40px; object-fit: cover; border-radius: 6px; background: #F4F0EA; display: block; }
.bn-upload-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #C2560A; background: #FFF1E6; border: 1px solid #FBD7B8; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.bn-upload-btn:hover { background: #FFE6D2; }
.field input[type="checkbox"] { width: 16px; height: 16px; padding: 0; }
.field select.bn-input { width: 100%; height: 40px; border: 1.5px solid #F0E6DC; border-radius: 10px; padding: 0 12px; font-size: 14px; background: #fff; color: #2B211A; }
.field select.bn-input:focus { border-color: #FF7A29; outline: none; }

/* V35 / V39：详情弹窗键值行（发票信息、提现申请详情共用） */
.inv-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #F0EAE2; }
.inv-row:last-child { border-bottom: none; }
.inv-row-k { flex: none; width: 130px; font-size: 12px; color: #9A948C; }
.inv-row-v { flex: 1; text-align: right; font-size: 13px; color: #2B211A; word-break: break-all; }
