/* web-admin/css/style.css - LOVEU美甲 · 运营管理后台 */
:root {
  --brand: #7C5CFC;
  --brand-2: #A78BFA;
  --brand-deep: #5B3FD4;
  --brand-bg: #F1EDFF;
  --bg: #F4F5F9;
  --card: #FFFFFF;
  --line: #E7E9F0;
  --line-2: #F1F2F6;
  --text: #1F2329;
  --text-2: #5B6270;
  --text-3: #8A9099;
  --ok: #2FBF71;
  --warn: #FF9F0A;
  --danger: #F5495C;
  --info: #3B82F6;
  --shadow: 0 6px 24px rgba(31, 35, 41, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }

/* ============ 布局 ============ */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 224px; flex: 0 0 224px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.side-logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.side-logo .logo-badge {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  background: linear-gradient(135deg, #7C5CFC, #B18CFF);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.35);
  overflow: hidden;
}
.side-logo .logo-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-logo .logo-name { font-size: 16px; font-weight: 700; color: var(--text); }
.side-logo .logo-sub { font-size: 11px; color: var(--text-3); }
.side-nav { flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: 2px 0;
  border-radius: 10px; color: var(--text-2); font-size: 14px; cursor: pointer;
  position: relative; transition: all .15s;
}
.nav-item:hover { background: var(--line-2); color: var(--text); }
.nav-item.on { background: var(--brand-bg); color: var(--brand-deep); font-weight: 600; }
.nav-item.on::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 4px; background: var(--brand);
}
.nav-item .ico { font-size: 17px; width: 22px; text-align: center; }
.side-foot {
  padding: 12px 10px 4px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); line-height: 1.7;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; flex: 0 0 60px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.top-title { font-size: 17px; font-weight: 700; }
.top-title .top-desc { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 10px; }
.top-user { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; background: var(--line-2); border-radius: 999px; padding: 5px 14px 5px 6px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #7C5CFC, #B18CFF);
  color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.user-meta { line-height: 1.25; }
.user-meta .u-name { font-size: 13px; font-weight: 600; }
.user-meta .u-role { font-size: 11px; color: var(--text-3); }
.btn-logout { color: var(--text-3); font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.btn-logout:hover { background: #FDEBED; color: var(--danger); }

.page-body { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

/* ============ 通用卡片 ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-extra { display: flex; align-items: center; gap: 8px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi-card .k-label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi-card .k-num { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: .5px; }
.kpi-card .k-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-bg); }
.kpi-card.accent::after { background: #FFF2E5; }
.kpi-card.green::after { background: #E6F7EF; }
.kpi-card.red::after { background: #FDEBED; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600;
  transition: all .15s; border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, #7C5CFC, #9B7BFF); color: #fff; box-shadow: 0 4px 12px rgba(124, 92, 252, 0.3); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; border-color: #F5C6CC; color: var(--danger); }
.btn-danger:hover { background: #FDEBED; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ============ 标签 / 徽标 ============ */
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6; }
.tag-success { background: #E6F7EF; color: #1D9A5F; }
.tag-warn { background: #FFF4E0; color: #C77700; }
.tag-danger { background: #FDEBED; color: #D6384C; }
.tag-brand { background: var(--brand-bg); color: var(--brand-deep); }
.tag-gray { background: var(--line-2); color: var(--text-3); }
.tag-info { background: #EAF2FF; color: #2B6FD8; }

/* ============ 表格 ============ */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 12px; color: var(--text-3); font-weight: 600; font-size: 12px;
  background: var(--line-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl .th-sort { cursor: pointer; user-select: none; transition: color .12s ease; }
.tbl .th-sort:hover { color: var(--brand); }
.sort-arrow { font-size: 10px; color: var(--text-3); margin-left: 2px; }
.th-sort:hover .sort-arrow { color: var(--brand); }
.tbl tr:hover td { background: #FAFAFD; }
.tbl .t-name { font-weight: 600; }
.tbl .t-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tbl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-empty { text-align: center; padding: 40px 0; color: var(--text-3); }
.tbl .ta-c { text-align: center; width: 44px; }
.tbl .fb-chk { width: 16px; height: 16px; cursor: pointer; }
.tbl .gal-thumb { display: inline-block; width: 40px; height: 40px; border-radius: 8px; vertical-align: middle; }
.tbl .gal-chk, .tbl .tw-chk, .tbl .now-chk, .tbl .ref-chk { width: 16px; height: 16px; cursor: pointer; }
/* 可点击缩略图（查看原图 / 下载） */
.tbl .gal-thumb-img { display: inline-block; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; cursor: pointer; vertical-align: middle; transition: transform .12s ease, box-shadow .12s ease; }
.tbl .gal-thumb-img:hover { transform: scale(1.1); box-shadow: 0 2px 10px rgba(124, 92, 252, .35); }

/* 缩略图单元格（缩略图 + 复制引用地址按钮） */
.thumb-cell { position: relative; display: inline-block; width: 40px; height: 40px; }
.thumb-cell .gal-thumb-img { width: 40px; height: 40px; }
.thumb-copy {
  position: absolute; right: -4px; bottom: -4px;
  padding: 1px 6px; font-size: 11px; line-height: 1.5;
  background: #6C5CE7; color: #fff; border: none; border-radius: 6px;
  cursor: pointer; box-shadow: 0 2px 6px rgba(108, 92, 231, .45); z-index: 2;
}
.thumb-copy:hover { background: #5a4bd6; }

/* 图库聚合页子页签 */
.sub-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sub-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: #f1effb; color: #5a52a8; border: 1px solid transparent; user-select: none;
}
.sub-tab.on { background: #6C5CE7; color: #fff; box-shadow: 0 3px 10px rgba(108, 92, 231, .35); }
.sub-tab:hover { border-color: #6C5CE7; }

/* 原图查看遮罩 */
.img-viewer-overlay { position: fixed; inset: 0; background: rgba(18, 18, 28, .78); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 24px; }
.img-viewer-box { background: var(--card, #fff); border-radius: 14px; max-width: min(92vw, 960px); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.img-viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-2, #eee); gap: 12px; }
.img-viewer-title { font-weight: 700; font-size: 14px; color: var(--text, #222); word-break: break-all; }
.img-viewer-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.img-viewer-stage { padding: 16px; overflow: auto; display: flex; align-items: center; justify-content: center; background: #fafafa; min-height: 120px; }
.img-viewer-img { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.img-viewer-ph { width: 320px; height: 320px; border-radius: 10px; }
.img-viewer-note { padding: 0 16px 14px; color: var(--text-3, #999); font-size: 12px; text-align: center; }

/* ============ 表单 ============ */
.inp, .sel, textarea.inp {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--text); transition: border .15s;
}
.inp:focus, .sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.12); }
.sel { cursor: pointer; }
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.form-row .f-label { width: 92px; flex: 0 0 92px; font-size: 13px; color: var(--text-2); text-align: right; }
.form-row .f-field { flex: 1; }
.form-row .f-hint { font-size: 12px; color: var(--text-3); }

/* ============ 筛选条 / Tabs ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: var(--line-2); cursor: pointer; transition: all .15s;
}
.tab:hover { color: var(--brand); }
.tab.on { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(124, 92, 252, 0.3); }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search-box .inp { padding-left: 34px; }
.search-box .s-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; }

/* ============ 地区筛选 & 城市排行 ============ */
.geo-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.geo-sel {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--text); min-width: 108px; cursor: pointer;
}
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.rank-row:last-child { border-bottom: none; }
.rank-no {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; background: var(--line-2);
  color: var(--text-3); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rank-no.top { background: linear-gradient(135deg, #FFB25E, #FF8A3D); color: #fff; }
.rank-city { flex: 0 0 auto; min-width: 118px; font-size: 13px; font-weight: 600; }
.rank-bar { flex: 1; height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.rank-bar-in { height: 100%; background: linear-gradient(90deg, #7C5CFC, #B18CFF); border-radius: 999px; transition: width .3s; }
.rank-val { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--brand-deep); min-width: 74px; text-align: right; }
.rank-empty { text-align: center; color: var(--text-3); padding: 20px 0; font-size: 13px; }
.metric-tabs { display: flex; gap: 5px; }
.metric-tab { padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--text-2); background: var(--line-2); cursor: pointer; }
.metric-tab.on { background: var(--brand-bg); color: var(--brand-deep); font-weight: 600; }

/* ============ 开关 ============ */
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #D7DAE1; transition: background .2s; flex: 0 0 42px; cursor: pointer; }
.switch::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s;
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 21px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.switch-row:last-child { border-bottom: none; }
.switch-row .sw-info .sw-name { font-size: 14px; font-weight: 600; }
.switch-row .sw-info .sw-desc { font-size: 12px; color: var(--text-3); }

/* ============ 步进器 ============ */
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.step-btn {
  width: 30px; height: 30px; border-radius: 8px; background: var(--brand-bg); color: var(--brand-deep);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-btn:hover { background: #E4DBFF; }
.step-val { min-width: 46px; text-align: center; font-size: 15px; font-weight: 700; color: var(--brand-deep); }

/* ============ 续期列表 ============ */
.renew-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.renew-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.renew-row:hover { border-color: var(--brand-2); }
.renew-main { flex: 1; min-width: 0; }
.renew-name { font-weight: 600; font-size: 14px; }
.renew-tag { margin-left: 8px; }
.renew-info { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }

/* 续期概览：只展示数量 + 一键续期 */
.renew-summary {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px; border-radius: 14px;
  background: #F7F8FB; border: 1px solid var(--line);
  margin-bottom: 14px;
}
.renew-summary.on { background: linear-gradient(135deg, #FFF3EE, #FFE8E2); border-color: #F7CFC4; }
.renew-num-block { display: flex; align-items: baseline; gap: 4px; flex: 0 0 auto; }
.renew-num { font-size: 46px; font-weight: 800; color: var(--text-3); line-height: 1; }
.renew-summary.on .renew-num { color: var(--brand); }
.renew-num-unit { font-size: 14px; color: var(--text-3); font-weight: 600; }
.renew-sum-text { flex: 1; min-width: 0; }
.renew-sum-title { display: block; font-size: 15px; font-weight: 700; color: var(--text-1); }
.renew-sum-desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.renew-onekey { display: block; width: 100%; padding: 12px 0; font-size: 15px; font-weight: 700; border-radius: 12px; }
.check {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px; border: 2px solid #C9CDD6;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px;
  transition: all .15s; background: #fff;
}
.check.on { background: var(--brand); border-color: var(--brand); }
.empty { text-align: center; padding: 26px 0; color: var(--text-3); font-size: 13px; }

/* ============ 详情抽屉/模态 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(23, 26, 36, 0.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: #fff; border-radius: 16px; width: 560px; max-width: 96vw; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal.wide { width: 720px; }
.modal-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-hd .m-title { font-size: 16px; font-weight: 700; }
.modal-x { width: 30px; height: 30px; border-radius: 8px; color: var(--text-3); font-size: 17px; }
.modal-x:hover { background: var(--line-2); color: var(--text); }
.modal-bd { padding: 18px 20px; overflow-y: auto; }
.modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-item .d-label { font-size: 12px; color: var(--text-3); }
.detail-item .d-val { font-size: 14px; font-weight: 600; margin-top: 2px; word-break: break-all; }

/* 详情弹窗：套餐编辑 / 营业执照 */
.detail-sec { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.detail-sec-title { font-size: 14px; font-weight: 800; color: var(--text-1); margin-bottom: 12px; }
.lic-detail { display: flex; gap: 16px; align-items: flex-start; }
.lic-thumb {
  width: 200px; height: 140px; object-fit: contain; background: var(--fill);
  border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in; flex-shrink: 0;
}
.lic-thumb:hover { border-color: var(--brand-500); }
.lic-meta { flex: 1; min-width: 0; }
.lic-company { font-size: 15px; font-weight: 800; color: var(--text-1); }
.lic-sub2 { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* 执照图库网格 */
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lic-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}
.lic-img {
  width: 100%; height: 180px; object-fit: contain; background: var(--fill);
  border-bottom: 1px solid var(--line); cursor: zoom-in;
}
.lic-img:hover { filter: brightness(0.97); }
.lic-info { padding: 12px 14px 8px; }
.lic-name {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.lic-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.lic-download {
  margin: 0 14px 14px; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--brand-700); background: var(--brand-light); border-radius: 10px; padding: 9px 0; cursor: pointer;
}
.lic-download:hover { opacity: 0.85; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%); z-index: 200;
  background: rgba(31, 35, 41, 0.92); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toastIn .2s;
}
.toast.ok { background: rgba(31, 148, 92, 0.95); }
.toast.err { background: rgba(214, 56, 76, 0.95); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6B4BE6 0%, #8E6BFF 45%, #B18CFF 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08);
}
.login-wrap::before { width: 420px; height: 420px; top: -140px; right: -120px; }
.login-wrap::after { width: 320px; height: 320px; bottom: -120px; left: -100px; }
.login-card {
  position: relative; z-index: 2; width: 400px; max-width: 92vw; background: #fff;
  border-radius: 20px; padding: 36px 34px 30px; box-shadow: 0 24px 80px rgba(30, 12, 80, 0.35);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-logo .logo-badge { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #7C5CFC, #B18CFF); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(124,92,252,.4); overflow: hidden; }
.login-logo .logo-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-logo .lg-name { font-size: 19px; font-weight: 800; }
.login-logo .lg-sub { font-size: 12px; color: var(--text-3); }
.login-tip { font-size: 12px; color: var(--text-3); margin: 14px 0 18px; background: var(--line-2); padding: 10px 12px; border-radius: 9px; line-height: 1.7; }
.login-form .form-row { margin-bottom: 14px; }
.login-form .form-row .f-label { width: 64px; flex: 0 0 64px; }
.login-code { display: flex; gap: 8px; }
.login-code .inp { flex: 1; }
.btn-code { white-space: nowrap; padding: 0 14px; border-radius: 9px; background: var(--brand-bg); color: var(--brand-deep); font-size: 13px; font-weight: 600; }
.btn-code:disabled { opacity: .5; }
.quick-list { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.quick-list .q-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.quick-acct {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all .15s; background: #fff;
}
.quick-acct:hover { border-color: var(--brand); background: var(--brand-bg); }
.quick-acct .q-ava { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #7C5CFC, #B18CFF); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.quick-acct .q-info { flex: 1; line-height: 1.4; }
.quick-acct .q-name { font-size: 13px; font-weight: 600; }
.quick-acct .q-phone { font-size: 11px; color: var(--text-3); }
.quick-acct .q-arrow { color: var(--text-3); }

/* ============ 分布条（看板） ============ */
.dist-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.dist-row .d-name { flex: 0 0 92px; font-size: 13px; color: var(--text-2); }
.dist-row .d-bar { flex: 1; height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.dist-row .d-bar-in { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7C5CFC, #B18CFF); }
.dist-row .d-val { flex: 0 0 64px; text-align: right; font-size: 13px; font-weight: 700; }

/* ============ 可折叠卡片（长列表收起） ============ */
.card[data-fold].folded .fold-body { display: none; }
.fold-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--text-2); background: var(--line-2); transition: all .15s;
}
.fold-btn:hover { color: var(--brand); background: var(--brand-bg); }
.fold-btn::before { content: '▴'; font-size: 10px; }
.card[data-fold].folded .fold-btn::before { content: '▾'; }

/* ============ 其他 ============ */
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-6 { margin-top: 6px; }
.mt-4 { margin-top: 4px; }
.mt-14 { margin-top: 14px; }
.mb-8 { margin-bottom: 8px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D3D6DF; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 数据备份页 ============ */
.bk-stat-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.bk-stat { flex: 1 1 120px; min-width: 110px; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; text-align: center; }
.bk-stat-num { font-size: 26px; font-weight: 700; color: var(--brand-700); }
.bk-stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.bk-ctrl { border-top: 1px solid var(--line-2); padding-top: 12px; }
.bk-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.bk-meta { font-size: 12px; color: var(--text-3); }

.bk-export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.export-item { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ex-name { font-size: 14px; font-weight: 600; }
.ex-desc { font-size: 12px; color: var(--text-3); line-height: 1.6; }

.import-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mig-sum { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; line-height: 1.7; }

/* ============ 服务器配置模块 ============ */
.svr-status { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.svr-chip { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 9px 14px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.svr-chip b { font-weight: 600; color: var(--text); }
.svr-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #C4C8D4; flex: none; }
.svr-chip.ok { color: var(--ok); } .svr-chip.ok .dot { background: var(--ok); }
.svr-chip.warn { color: #C77700; } .svr-chip.warn .dot { background: var(--warn); }
.svr-chip.err { color: var(--danger); } .svr-chip.err .dot { background: var(--danger); }

.svr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 20px; }
.svr-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.svr-item.wide { grid-column: 1 / -1; }
.svr-label { font-size: 13px; font-weight: 600; color: var(--text); }
.svr-label .req { color: var(--danger); margin-left: 2px; }
.svr-label .tag { font-size: 11px; font-weight: 400; color: var(--text-3); background: var(--line-2); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.svr-hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.svr-code { background: #1F2430; color: #E6E8EF; font-size: 12px; line-height: 1.75; padding: 12px 14px; border-radius: 12px; overflow-x: auto; white-space: pre; font-family: ui-monospace, Menlo, Consolas, monospace; }
.svr-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text-2); line-height: 1.95; }
.svr-steps code { background: var(--line-2); border-radius: 5px; padding: 1px 6px; font-size: 12px; }

/* ============ 运营与内容（ops 页） ============ */
.cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-tab {
  cursor: pointer; padding: 8px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 14px; color: var(--text-2); transition: all .15s;
}
.cat-tab:hover { border-color: var(--brand-2); color: var(--brand-deep); }
.cat-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }

/* 开关行 */
.sw-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; background: #fff; cursor: pointer; transition: border-color .15s;
}
.sw-row:hover { border-color: var(--brand-2); }
.sw-info { flex: 1; min-width: 0; }
.sw-name { font-size: 14px; font-weight: 600; color: var(--text); }
.sw-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.sw-box {
  position: relative; width: 42px; height: 24px; flex: 0 0 42px;
  border-radius: 999px; background: #D7DAE2; transition: background .18s;
}
.sw-box i {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: left .18s;
}
.sw-box.on { background: var(--brand); }
.sw-box.on i { left: 20px; }

/* 开通套餐弹窗：门店选择（支持门店名 / 手机号搜索） */
.shop-pick-box {
  margin-top: 10px; max-height: 240px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.shop-pick-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.shop-pick-row:last-child { border-bottom: none; }
.shop-pick-row:hover { background: var(--brand-bg); }
.shop-pick-row.on { background: var(--brand-bg); }
.sp-radio { flex: 0 0 16px; color: var(--brand); font-size: 14px; }
.sp-info { flex: 1; min-width: 0; }
.sp-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ============ 订单总览 / 营收业绩（orders / revenue 页） ============ */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.inp-sm { width: 210px; }
.sel-sm { width: 130px; }

/* ============ 通用：间距 / 分隔线 / 勾选网格 ============ */
.ml-8 { margin-left: 8px; }
.fold-sep { border: none; border-top: 1px dashed var(--line, #e9edf3); margin: 14px 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 14px; }
.perm-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.perm-item input { width: 15px; height: 15px; }

/* 后台账号权限勾选组 */
.perm-grid { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.perm-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer; background: #fff;
}
.perm-item:hover { border-color: var(--brand-2); }
.perm-check { accent-color: var(--brand); }

/* 优惠券门店选择：已选 / 搜索结果列表最多展示 10 行，超出出现滚动条 */
.cp-sel-list, .cp-search-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* ===== 抽奖奖池管理弹窗 ===== */
.pp-wrap { display: flex; flex-direction: column; gap: 14px; max-height: 66vh; overflow-y: auto; padding-right: 4px; }
.pp-cat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafafa; }
.pp-cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pp-cat-name { font-weight: 700; font-size: 14px; color: var(--text-1); margin-right: 4px; }
.pp-items { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.pp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pp-tag { font-size: 12px; font-weight: 600; color: var(--brand); min-width: 44px; }
.pp-lbl { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pp-row .inp.pp-name { flex: 1 1 150px; min-width: 120px; }
.pp-row .inp.pp-num { width: 76px; }
.pp-row .inp.pp-amt, .pp-row .inp.pp-days { width: 86px; }
.pp-row .inp.pp-min { width: 80px; }
.pp-row .sel.pp-ctype, .pp-row .sel.pp-shop { width: auto; max-width: 180px; }
.pp-adds { display: flex; gap: 8px; margin-top: 8px; }
.pp-row .pp-del { margin-left: auto; }
/* 适用门店投放配置 */
.switch-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.switch-line input { accent-color: var(--brand, #E0533D); width: 16px; height: 16px; }
.tbl-filter { margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tbl-filter select { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 13px; }

/* ============ 登录方式切换（账号密码 / 邮箱验证码） ============ */
.lg-tabs { display: flex; gap: 6px; background: var(--line-2); padding: 4px; border-radius: 10px; margin: 16px 0 0; }
.lg-tab { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 8px 0; border-radius: 8px; color: var(--text-3); cursor: pointer; transition: all .15s; user-select: none; }
.lg-tab:hover { color: var(--brand-deep); }
.lg-tab.on { background: #fff; color: var(--brand-deep); box-shadow: 0 2px 8px rgba(30, 12, 80, .10); }
.lg-forgot { text-align: right; margin-top: 10px; font-size: 12px; }
.lg-forgot a { color: #7C5CFC; text-decoration: none; }
.lg-forgot a:hover { text-decoration: underline; }

/* ============ 登录页：未接后端告警 + 底部连接信息 ============ */
.login-tip-err { background: #FFF1F0; color: #B42318; border: 1px solid #FFD6D4; }
.login-tip-err code { background: rgba(0, 0, 0, .06); padding: 1px 4px; border-radius: 4px; font-size: 11px; }
.lg-foot { display: flex; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--text-3); line-height: 1.7; }
.lg-foot a { color: #7C5CFC; text-decoration: none; }
.lg-foot a:hover { text-decoration: underline; }

/* ============ 备案信息（后台页脚 / 登录页底部） ============ */
.site-foot { padding: 14px 24px 18px; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.9; }
.site-foot a, .login-foot a { color: var(--text-3); text-decoration: none; }
.site-foot a:hover, .login-foot a:hover { color: var(--brand-deep); text-decoration: underline; }
.site-foot .sep, .login-foot .sep { margin: 0 8px; opacity: .5; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .75); line-height: 1.9; }
.login-foot a { color: rgba(255, 255, 255, .75); }
.login-foot a:hover { color: #fff; }

/* ============ 登录页：连接诊断报告 ============ */
.lg-diag { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .6); border: 1px dashed #FFD6D4; font-size: 11.5px; line-height: 1.85; color: #8A3B33; word-break: break-all; }
.lg-diag code { background: rgba(0, 0, 0, .06); padding: 1px 4px; border-radius: 4px; }

/* 诊断区内的自测入口 */
.lg-diag-acts { margin-top: 6px; font-size: 11.5px; }
.lg-diag-acts a { color: #7C5CFC; text-decoration: underline; font-weight: 600; }
.lg-diag-acts .muted { color: #A08C86; margin-left: 4px; }

/* ============ 修复：表单提示与验证码行布局 ============ */
/* .t-sub 之前只有 .tbl 作用域内的定义，导致表单里所有提示按正文大小渲染、把输入框挤乱 */
.t-sub { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 4px; }
.f-field > .t-sub { margin-top: 6px; }
/* 验证码行：输入框必须能撑开（min-width:0 防止 flex 子项拒绝收缩导致输入框被压成一条缝） */
.login-code { display: flex; gap: 8px; align-items: stretch; }
.login-code .inp { flex: 1 1 auto; min-width: 0; }
.login-code .btn-code { flex: 0 0 auto; }
