/* 融跃羽荟 · 网页版管理端 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --purple: #552CB9;
  --purple-2: #6B45D6;
  --purple-light: #F3EEF8;
  --green: #82C75A;
  --green-dark: #5DA83C;
  --green-light: #F3F9EF;
  --red: #FF5A5F;
  --orange: #E08A00;
  --text: #222222;
  --text-2: #666666;
  --text-3: #999999;
  --line: #F0F0F0;
  --bg: #F6F6F8;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============ 登录 ============ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #552CB9 0%, #6B45D6 55%, #8E6FD0 100%);
  padding: 24px;
}
.login-box {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow: 0 20px 60px rgba(40, 10, 90, 0.35);
}
.login-logo {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #fff;
}
.login-title { text-align: center; font-size: 22px; font-weight: 700; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-3); margin: 6px 0 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.login-field input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.login-field input:focus { border-color: var(--purple); }
.login-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-2) 0%, var(--purple) 100%);
  margin-top: 8px;
}
.login-btn:disabled { opacity: .6; cursor: default; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.7; }
.login-links { text-align: right; margin-top: 10px; }
.login-links a { font-size: 13px; color: var(--purple); text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.forgot-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; }
.forgot-steps .stp {
  height: 4px; width: 44px; border-radius: 2px; background: var(--line);
}
.forgot-steps .stp.on { background: var(--purple); }
.forgot-h { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.forgot-sub { font-size: 12px; color: var(--text-3); margin-bottom: 18px; line-height: 1.6; }
.forgot-q { margin-bottom: 14px; }
.forgot-q label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.forgot-q input, .forgot-q select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.forgot-q input:focus, .forgot-q select:focus { border-color: var(--purple); }
.forgot-alt { margin-top: 16px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; }
.forgot-alt a { color: var(--purple); text-decoration: none; }
.forgot-alt a:hover { text-decoration: underline; }
.sec-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.sec-row select, .sec-row input {
  flex: 1; min-width: 150px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.sec-row select:focus, .sec-row input:focus { border-color: var(--purple); }
.sec-row .sec-del { flex: none; }
.login-error {
  display: none;
  background: #FFF0F0;
  color: var(--red);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ============ 主框架 ============ */
.app { display: none; height: 100vh; }
.app.on { display: flex; }
.sidebar {
  width: 216px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #3B1F7E 0%, #552CB9 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-brand .b-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.sidebar-brand .b-sub { font-size: 11px; opacity: .65; margin-top: 3px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-size: 14px;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.on {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-left-color: #FFD54D;
  font-weight: 600;
}
.nav-item .n-ico { width: 20px; text-align: center; }
/* v1.20：导航分组（大目录）与子项 */
.nav-group {
  padding: 14px 18px 6px;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255,255,255,.45);
  font-weight: 600;
}
.nav-item.sub { padding-left: 30px; font-size: 13px; }
/* v1.20：转人工未读红点 */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #FF5A5F;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
}
/* v1.20：客服页转人工提醒横幅 */
.notice-bar {
  margin: 16px 24px 0;
  padding: 10px 16px;
  background: #FFF7E8;
  border: 1px solid #FFE3B0;
  border-radius: 10px;
  font-size: 13px;
}
.notice-bar .nb-title { font-weight: 700; color: #B26A00; margin-bottom: 6px; }
.notice-bar .nb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
}
.notice-bar .nb-item:hover { background: #FFEFD4; }
.notice-bar .nb-item.unread { color: #333; font-weight: 600; }
.notice-bar .nb-dot { width: 7px; height: 7px; border-radius: 50%; background: #FFB020; flex-shrink: 0; }
.notice-bar .nb-item:not(.unread) .nb-dot { background: #DDD; }
.notice-bar .nb-time { margin-left: auto; font-size: 11px; color: #B0B0B0; font-weight: 400; }
.sidebar-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  opacity: .75;
  line-height: 1.8;
}
.sidebar-foot .logout { color: #FFD54D; cursor: pointer; }

.main { flex: 1; min-width: 0; overflow-y: auto; height: 100vh; }
.page-head {
  background: #fff;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-title { font-size: 19px; font-weight: 700; }
.page-body { padding: 22px 28px 60px; }

/* ============ 通用组件 ============ */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title .t-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--purple-light);
  color: var(--purple);
  transition: filter .15s;
}
.btn:hover { filter: brightness(.96); }
.btn.primary { background: linear-gradient(135deg, var(--purple-2), var(--purple)); color: #fff; }
.btn.green { background: var(--green-light); color: var(--green-dark); }
.btn.red { background: #FFF0F0; color: var(--red); }
.btn.gray { background: #F3F3F3; color: var(--text-2); }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: default; }

.tag {
  display: inline-block;
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 12px;
  background: #F3F3F3;
  color: var(--text-2);
}
.tag.green { background: var(--green-light); color: var(--green-dark); }
.tag.red { background: #FFF0F0; color: var(--red); }
.tag.purple { background: var(--purple-light); color: var(--purple); }
.tag.orange { background: #FFF7E6; color: var(--orange); }
.tag.gray { background: #F0F0F0; color: var(--text-3); }

.grid { display: grid; gap: 14px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--purple); }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 5px; }

.bar-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.bar-info { width: 210px; flex-shrink: 0; }
.bar-name { font-size: 13px; color: #444; display: block; }
.bar-price { font-size: 11px; color: #C084E8; display: block; margin-top: 1px; }
.bar-track { flex: 1; height: 14px; background: var(--green-light); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #93D168, var(--green)); border-radius: 99px; }
.bar-val { width: 90px; text-align: right; font-size: 13px; color: var(--text-3); flex-shrink: 0; }

/* 占用表格（v1.24 仿参考图；v1.25 按新参考图配色 + 修灰底 bug）
   数据看板 / 场地状态 / 当天预订总览 三页共用
   避坑：左侧时间列用 g-hlabel、合并块内时间用 g-mtime，两类不得共用类名——
   v1.24 曾共用 g-time，`.grid-tbl tbody .g-time`（特指度 0,2,1）盖过单元格内
   的 `.g-cell .g-time`（0,2,0），导致合并块内时间标签带上 #FAFAFA 灰底（v1.25 修） */
.grid-scroll { overflow-x: auto; }
.grid-tbl { border-collapse: collapse; width: 100%; min-width: 760px; }
.grid-tbl th, .grid-tbl td { border: 1px solid #ECECEC; padding: 5px 8px; text-align: center; }
.grid-tbl thead th { background: #FAFAFA; font-weight: 700; font-size: 13px; color: var(--text); height: 40px; }
.grid-tbl .g-hlabel { width: 104px; color: var(--text-3); font-size: 12px; background: #FCFCFC; white-space: nowrap; }
.grid-tbl tbody .g-hlabel { background: #FAFAFA; }
.g-cell { height: 48px; font-size: 12px; line-height: 1.3; vertical-align: middle; position: relative; }
.g-cell .g-mtime { background: transparent; width: auto; font-size: 10px; opacity: .75; }
.g-cell b { font-size: 13px; font-weight: 600; }
.g-cell .g-sub { display: block; font-size: 11px; opacity: .85; }
.g-cell .g-dim { opacity: .65; }
.g-cell .g-price { display: block; font-size: 14px; font-weight: 600; }
/* 配色（v1.25 按参考图）：开放预订=白底标价 / 已过期=浅灰 / 线上预订=浅粉 /
   线下预订（固定场+锁场）=浅粉 #F8D6CF（v1.26 起与线上预订同色） / 维修中=灰 / 超时未核销=格内红字签（不改底色） */
.g-cell.available { background: #FFFFFF; color: #555555; cursor: pointer; }
.g-cell.available:hover { background: #F7F4FB; }
.g-cell.passed { background: #F0F0F0; color: #B5B5B5; cursor: default; }
.g-cell.booked { background: #F8D6CF; color: #880E4F; cursor: default; }
.g-cell.booked.fixed, .g-cell.locked { background: #F8D6CF; color: #880E4F; }
.g-cell.maintenance { background: #9E9E9E; color: #FFFFFF; cursor: pointer; }
.g-cell.closed { background: #FAFAFA; color: #D0D0D0; cursor: default; }
.g-cell.sel { outline: 3px solid #2196F3; outline-offset: -3px; }
/* v1.23：超时未核销标签（右上角白底红字小签；v1.25 起只做标签，不再改单元格底色） */
.g-cell .g-noshow {
  position: absolute; top: 3px; right: 3px;
  background: rgba(255, 255, 255, .92);
  color: #D84315;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: .5px;
}

/* 订单管理：筛选栏 + 右上角总金额（v1.24） */
.orders-filter { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.orders-total { font-size: 12px; color: var(--text-3); white-space: nowrap; padding-top: 4px; text-align: right; }
.orders-total b { color: var(--text); }
.orders-total .ot-scope { color: var(--text-2); font-weight: 600; }
.orders-total .ot-amount { color: #E64A19; font-size: 15px; }
.orders-total .ot-sub { display: block; font-size: 11px; color: #B0B0B0; margin-top: 2px; }

/* 当天预订总览（v1.22 改版，仿参考图：日期条 + 五色矩阵 + 左上角角标） */
.ov-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ov-venue { font-weight: 700; font-size: 14px; }
.ov-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); }
.ov-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.ov-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
/* 日期条：横向日期 + 星期；选中蓝色、今天金色（仿参考图） */
.ov-datestrip { display: flex; align-items: center; gap: 8px; }
.ov-dates { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 2px 0; }
.ov-date {
  flex-shrink: 0; min-width: 62px; padding: 6px 8px; border-radius: 8px; text-align: center;
  background: #F5F5F7; cursor: pointer; border: 1px solid transparent; user-select: none;
}
.ov-date .d-md { display: block; font-size: 12px; color: var(--text-2); }
.ov-date .d-wd { display: block; font-size: 11px; color: var(--text-3); margin-top: 1px; }
.ov-date.today { background: #FFF6E0; border-color: #F0D9A0; }
.ov-date.today .d-wd { color: #B8860B; font-weight: 600; }
.ov-date.on { background: #1976D2; border-color: #1976D2; }
.ov-date.on .d-md, .ov-date.on .d-wd { color: #FFFFFF; }
.ov-date.on.today .d-wd { color: #FFE9B0; }
.ov-datepick { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; color: var(--text-2); background: #fff; }
.ov-stats { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.ov-stats b { color: var(--text); font-size: 13px; }
.ov-stats .ov-cur { color: var(--text); font-weight: 600; }

/* 核销管理（v1.22）：全局核销结果卡 + 记录表格 */
.vf-result .tbl td.k { width: 110px; color: var(--text-3); }
.vf-result.ok .card-title { color: var(--green-dark); }
.vf-result.fail .card-title { color: var(--red); }
.vf-reason { font-size: 13px; color: var(--text-2); margin: 4px 0 12px; }
.row-dim td { opacity: .55; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  padding: 10px 12px;
  background: #FAFAFC;
  color: var(--text-2);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #FCFCFE; }
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin-left: 6px; }
.empty { text-align: center; color: var(--text-3); padding: 36px 0; font-size: 13px; }

/* 规则列表（图片样式：筛选栏 + 表格 + 分页，v1.18） */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar select, .filter-bar input {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.filter-bar input { min-width: 220px; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--purple); }
.pager { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.pager .pg-info { margin-right: auto; }
.pager .pg {
  min-width: 32px; height: 32px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  padding: 0 8px;
  color: var(--text-2);
}
.pager .pg.on { background: var(--purple); color: #fff; border-color: var(--purple); }
.pager .pg:disabled { opacity: .45; cursor: default; }
.tbl-wrap { overflow-x: auto; }

/* 表单 */
.form-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row label { font-size: 13px; color: var(--text-2); width: 86px; flex-shrink: 0; }
.form-row input[type=text], .form-row input[type=number], .form-row input[type=date], .form-row select, .form-row textarea {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--purple); }
.form-row textarea { width: 100%; min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }

/* 弹窗 */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  width: 520px;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 26px 28px;
}
.modal.wide { width: 720px; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.modal-ops { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* 单元格操作浮层 */
.cell-pop {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  padding: 6px;
  z-index: 60;
  min-width: 128px;
}
.cell-pop .cp-item {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.cell-pop .cp-item:hover { background: var(--purple-light); color: var(--purple); }
.cell-pop .cp-item.danger:hover { background: #FFF0F0; color: var(--red); }

/* 商品卡 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
}
.product-card.off { opacity: .62; }
.product-card .pc-img { width: 100%; height: 168px; background: #F3EEF8; object-fit: cover; display: block; }
.product-card .pc-body { padding: 14px 16px; flex: 1; }
.pc-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; }
.pc-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.pc-price { font-size: 18px; font-weight: 700; color: var(--red); margin-top: 6px; }
.pc-ops { display: flex; gap: 8px; padding: 0 16px 16px; }
.pc-ops .btn { flex: 1; }

/* 趋势图 */
.trend { display: flex; align-items: flex-end; gap: 5px; height: 180px; padding-top: 12px; overflow-x: auto; }
.trend .t-wrap { flex: 1; min-width: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.trend .t-bar { width: 100%; max-width: 14px; background: linear-gradient(180deg, #8E6FD0, var(--purple)); border-radius: 4px 4px 0 0; min-height: 3px; }
.trend .t-lab { font-size: 10px; color: var(--text-3); margin-top: 6px; white-space: nowrap; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 42px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 18px;
  z-index: 300;
  display: none;
  max-width: 70vw;
}
.toast.on { display: block; animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 强制改密横幅 */
.force-banner {
  background: #FFF7E6;
  border: 1px solid #FFE1A8;
  color: var(--orange);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 客服 */
.chat-wrap { display: flex; gap: 16px; height: calc(100vh - 210px); min-height: 420px; }
.chat-list { width: 280px; flex-shrink: 0; background: #fff; border-radius: 14px; overflow-y: auto; }
.chat-item { padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat-item:hover { background: #FAFAFC; }
.chat-item.on { background: var(--purple-light); }
.chat-item .ci-name { font-size: 13px; font-weight: 600; }
.chat-item .ci-last { font-size: 12px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { flex: 1; background: #fff; border-radius: 14px; display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; }
.msg { max-width: 72%; margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.msg .m-bubble { padding: 9px 13px; border-radius: 10px; display: inline-block; white-space: pre-wrap; word-break: break-word; }
.msg .m-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.msg.user .m-bubble { background: var(--purple-light); color: var(--text); }
.msg.admin { text-align: right; }
.msg.admin .m-bubble { background: linear-gradient(135deg, var(--purple-2), var(--purple)); color: #fff; }
.msg.system { text-align: center; }
.msg.system .m-bubble { background: #F3F3F3; color: var(--text-3); font-size: 12px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 13px; outline: none; resize: none; height: 42px; }

/* ===== v1.16：设置页（锁场/固定场）与商城订单 ===== */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { font-size: 12px; color: var(--text-2); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 16px; cursor: pointer; }
.tab.on { background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips + .chips { margin-top: 8px; }
.chip {
  font-size: 12px; color: #555; background: #F6F6FA; border: 1px solid #E8E8EF;
  border-radius: 8px; padding: 7px 14px; cursor: pointer; user-select: none;
}
.chip:hover { border-color: #C9AEF0; }
.chip.on { background: var(--purple-light); border-color: var(--purple); color: var(--purple); font-weight: 600; }
.chip.quick { border-radius: 99px; font-size: 11px; padding: 5px 13px; }
.chip.hour { min-width: 64px; text-align: center; }
.field-label { font-size: 12px; color: var(--text-2); margin: 18px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.field-label .link { color: var(--purple); font-size: 11px; cursor: pointer; }
.setting-save { margin-top: 4px; }
/* v1.20：批量设置模板 */
.tip-bar {
  background: var(--purple-light);
  border: 1px solid #E4D6F8;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--purple);
  margin-bottom: 16px;
  line-height: 1.7;
}
.tpl-card { border: 1px solid var(--line); }
.tpl-card + .tpl-card { margin-top: 4px; }
.card-sub { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 20px 0 6px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rule-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.rule-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rule-purpose { font-size: 14px; font-weight: 700; color: var(--purple); }
.rule-count { font-size: 11px; color: var(--text-3); }
.rule-line { font-size: 12px; color: var(--text-2); margin-top: 5px; line-height: 1.6; }
.rule-ops { display: flex; justify-content: flex-end; margin-top: 8px; }
.rule-del { font-size: 12px; color: var(--red); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.rule-del:hover { background: #FFF0F0; }
.fulfill-tag { font-size: 11px; color: var(--purple); background: var(--purple-light); border-radius: 6px; padding: 2px 8px; margin-right: 6px; }

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-brand .b-name, .sidebar-brand .b-sub, .nav-item span, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .page-body { padding: 14px; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .chat-list { width: 200px; }
}
