/* ============================================================
   蓝积云腾 · 运营后台设计系统 (admin.css)
   复用前台品牌色，后台采用「深色侧边栏 + 浅色内容区」
   ============================================================ */
:root {
  --c-primary: #6366f1;
  --c-primary-600: #4f46e5;
  --c-primary-700: #4338ca;
  --c-accent: #06b6d4;
  --c-ink: #1e293b;
  --c-ink-2: #475569;
  --c-muted: #94a3b8;
  --c-line: #e6e8f0;
  --c-bg: #f4f5fb;
  --c-card: #ffffff;
  --c-ok: #16a34a;
  --c-warn: #d97706;
  --c-danger: #dc2626;
  --side-bg: #1e1b4b;
  --side-bg-2: #312e81;
  --side-ink: #c7d2fe;
  --side-ink-dim: #8b93c7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(30,41,59,.06);
  --shadow: 0 10px 30px rgba(99,102,241,.10);
  --side-w: 244px;
  --side-w-mini: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--c-ink);
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--c-primary-600); text-decoration: none; }
a:hover { color: var(--c-primary-700); }

/* ---------------- 整体布局 ---------------- */
.admin-shell { display: flex; min-height: 100vh; }

.admin-side {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-ink);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .25s ease, width .25s ease, flex-basis .25s ease;
}
.admin-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #06b6d4 120%);
  color: #fff; font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.brand-text { font-weight: 700; color: #fff; font-size: 16px; line-height: 1.2; display: flex; flex-direction: column; }
.brand-text small { color: var(--side-ink-dim); font-weight: 500; font-size: 11px; margin-top: 2px; }

.admin-menu { padding: 12px 12px 20px; overflow-y: auto; flex: 1; }
.menu-group {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--side-ink-dim); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 14px 12px 6px;
  cursor: pointer; user-select: none;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.menu-group:hover { color: var(--side-ink); background: rgba(255,255,255,.06); }
.mg-arrow {
  font-size: 10px; opacity: .75; line-height: 1;
  transition: transform .2s ease;
}
.menu-group.open .mg-arrow { transform: rotate(180deg); }
.menu-collapse { display: none; }
.menu-collapse.open { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0;
  border-radius: 10px; color: var(--side-ink);
  font-size: 15px; font-weight: 500;
  transition: background .15s, color .15s;
}
.menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu-item.active { background: rgba(99,102,241,.9); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.35); }
.mi-ico { width: 20px; text-align: center; opacity: .85; font-size: 15px; }
.menu-item.active .mi-ico { opacity: 1; }

.admin-main { flex: 1; margin-left: var(--side-w); display: flex; flex-direction: column; min-width: 0; }

.admin-topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.side-toggle { border: none; background: #eef0ff; color: var(--c-primary-700);
  width: 38px; height: 38px; border-radius: 10px; font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s; }
.side-toggle:hover { background: #e0e4ff; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--c-ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.admin-user { color: var(--c-ink-2); font-weight: 600; }

/* ============ 待办提醒铃铛（轮询 /ygzlk/index/pendingCount） ============ */
.todo-bell-wrap { position: relative; }
.todo-bell {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--c-line); background: #f6f7fb; color: var(--c-ink-2);
  font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, box-shadow .15s;
}
.todo-bell:hover { background: #eef0ff; }
.todo-bell.is-active { color: var(--c-warn-600, #d48806); }
/* 有新提交时铃铛轻微脉冲，强化「第一时间」感知 */
.todo-bell.is-active .tb-ico { animation: bellShake .9s ease-in-out infinite; }
@keyframes bellShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }
.tb-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--c-danger-500, #f56c6c); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff;
}
.tb-dot {
  position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-danger-500, #f56c6c); box-shadow: 0 0 0 2px #fff;
}
.todo-panel {
  position: absolute; top: 48px; right: 0; width: 268px; background: #fff; border: 1px solid var(--c-line);
  border-radius: 12px; box-shadow: 0 16px 48px rgba(17,24,39,.18); padding: 8px; z-index: 40;
  display: none;
}
.todo-panel.show { display: block; }
.tp-head { font-size: 13px; font-weight: 700; color: var(--c-ink); padding: 8px 10px 6px; }
.tp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px; border-radius: 8px; color: var(--c-ink); text-decoration: none; font-size: 14px;
}
.tp-row:hover { background: #f6f7fb; }
.tp-row b {
  min-width: 26px; height: 22px; padding: 0 8px; border-radius: 11px; background: #f0f2f7; color: var(--c-ink-2);
  font-size: 13px; line-height: 22px; text-align: center; font-weight: 700;
}
.tp-row b:empty, .tp-row b[data-zero="1"] { background: #f0f2f7; color: #b9bfcd; }
.tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 4px; border-top: 1px solid var(--c-line); margin-top: 4px; }
.tp-hint { font-size: 12px; color: var(--c-ink-3, #9aa1b1); }

.admin-content { padding: 24px 24px 48px; flex: 1; }

/* 让内容区至少撑到视口底部下沿，避免短页面时卡片贴底产生压逼感 */
.admin-content::after {
  content: "";
  display: block;
  height: 12px;
}
.admin-scrim { display: none; }

/* ---------------- 侧边栏收缩（mini） ---------------- */
body.side-mini .admin-side { width: var(--side-w-mini); flex: 0 0 var(--side-w-mini); }
body.side-mini .admin-side:hover { width: var(--side-w); flex: 0 0 var(--side-w); z-index: 41; }
body.side-mini .admin-main { margin-left: var(--side-w-mini); transition: margin-left .25s ease; }
/* 隐藏文字 / 徽标（hover 展开时恢复） */
body.side-mini .brand-text,
body.side-mini .mg-txt,
body.side-mini .mg-arrow,
body.side-mini .mi-txt,
body.side-mini .menu-badge {
  visibility: hidden; opacity: 0; transition: opacity .15s;
}
body.side-mini .admin-brand { justify-content: center; padding: 20px 0 16px; }
body.side-mini .menu-group { justify-content: center; padding: 14px 0 6px; }
body.side-mini .menu-item { justify-content: center; gap: 0; padding: 10px 0; }
body.side-mini .admin-side:hover .brand-text,
body.side-mini .admin-side:hover .mg-txt,
body.side-mini .admin-side:hover .mg-arrow,
body.side-mini .admin-side:hover .mi-txt,
body.side-mini .admin-side:hover .menu-badge { visibility: visible; opacity: 1; }
body.side-mini .admin-side:hover .menu-group { justify-content: space-between; padding: 14px 12px 6px; }
body.side-mini .admin-side:hover .menu-item { justify-content: flex-start; gap: 11px; padding: 10px 12px; }

/* ---------------- 页面头 ---------------- */
.page-head { margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 800; margin: 0; color: var(--c-ink); }
.page-desc { color: var(--c-ink-2); margin: 6px 0 0; font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--c-ink); }
.card-head { display: flex; align-items: center; margin-bottom: 14px; }
.card-head .card-title { margin: 0; }
.card-head .spacer { flex: 1; }

/* ---------- 信息列表（标签-值定义列表，杜绝标签值粘连） ---------- */
.info-list { display: grid; gap: 4px; }
.info-list .row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.info-list .row:nth-child(odd) { background: #f7f8fc; }
.info-list .row > span {
  color: var(--c-ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.info-list .row > b {
  color: var(--c-ink);
  font-weight: 600;
  word-break: break-all;
}
.info-list .row > b.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: .3px;
}
.info-list .row .badge { font-weight: 600; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card .sc-ico {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: #eef2ff; color: var(--c-primary-600);
}
.stat-card .sc-label { color: var(--c-ink-2); font-size: 13px; }
.stat-card .sc-value { font-size: 27px; font-weight: 800; margin-top: 4px; color: var(--c-ink); }
.stat-card .sc-sub { color: var(--c-muted); font-size: 12px; margin-top: 2px; }

/* 模块快捷入口 */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.module-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d9ddff; color: var(--c-primary-700); }
.module-card .mc-ico { width: 40px; height: 40px; border-radius: 11px; background: #eef2ff; color: var(--c-primary-600);
  display: flex; align-items: center; justify-content: center; font-size: 19px; }
.module-card .mc-title { font-weight: 700; color: var(--c-ink); }
.module-card .mc-desc { color: var(--c-muted); font-size: 12px; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--c-card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-line); box-shadow: var(--shadow-sm);
}
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
table.data th { background: #f8f9ff; color: var(--c-ink-2); font-weight: 700; white-space: nowrap; }
table.data tbody tr:hover { background: #fafbff; }
table.data tbody tr:last-child td { border-bottom: none; }
.td-actions a, .td-actions button { margin-right: 8px; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--c-muted); }

/* 分页：ThinkPHP Bootstrap 分页器输出 <ul class="pagination"><li>…，需重置为横向排列（修复 li 垂直堆叠） */
.pager { margin-top: 16px; }
.pager ul { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; list-style: none; margin: 0; padding: 0; }
.pager ul li { display: inline-flex; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 9px;
  border: 1px solid var(--c-line); background: #fff; color: var(--c-ink-2); font-size: 13px; text-decoration: none;
}
.pager a:hover { border-color: var(--c-primary); color: var(--c-primary-700); }
.pager li.active span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.pager li.disabled span { color: var(--c-muted); background: #f8fafc; cursor: not-allowed; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-label { font-weight: 600; color: var(--c-ink); font-size: 13px; }
.form-label .req { color: var(--c-danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--c-ink);
  background: #fff; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.form-control { min-height: 88px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23475569' d='M2 4l4 4 4-4'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.form-hint { color: var(--c-muted); font-size: 12px; }
.form-error { color: var(--c-danger); font-size: 12px; }
/* 套餐表单「按次计量」提示：仅作单价配置，不会出现在会员中心购买列表 */
.form-warn { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--c-warn, #b45309); font-size: 12px; line-height: 1.5; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 26px; transition: .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--c-primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #06b6d4 120%); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--c-primary-700); border-color: var(--c-line); }
.btn-ghost:hover { background: #eef0ff; }
.btn-soft { background: #eef2ff; color: var(--c-primary-700); }
.btn-soft:hover { background: #e0e7ff; }
.btn-danger { background: #fee2e2; color: var(--c-danger); }
.btn-danger:hover { background: #fecaca; }
.btn-link { background: none; border: none; color: var(--c-primary-600); cursor: pointer; padding: 0; font-size: 13px; }
.btn-link:hover { color: var(--c-primary-700); text-decoration: underline; }

/* ---------------- 徽章 ---------------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: #e2e8f0; color: #475569; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-primary { background: #eef2ff; color: #4338ca; }

/* ---------------- 搜索栏 ---------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filter-bar .form-row { min-width: 160px; }
.filter-bar .form-control { padding: 8px 11px; }

/* ---------------- 详情 / 空态 ---------------- */
.empty { text-align: center; padding: 50px 20px; color: var(--c-muted); }
.empty .e-ico { font-size: 40px; opacity: .4; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--c-ink-2); font-weight: 600; }
.kv dd { margin: 0; color: var(--c-ink); word-break: break-all; }
.img-thumb { max-width: 100%; border-radius: 10px; border: 1px solid var(--c-line); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.result-grid img { width: 100%; border-radius: 10px; border: 1px solid var(--c-line); }

/* ---------------- Toast ---------------- */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1e293b; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px);
  transition: opacity .3s, transform .3s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-toast { background: #1e293b; }
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-warn { background: #d97706; }

/* ---------------- 确认弹窗 ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 9000; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); width: 380px; max-width: 92vw; padding: 22px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 10px; font-size: 17px; }
.modal p { color: var(--c-ink-2); margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- 登录页（比例居中） ---------------- */
html, body.login-wrap { height: 100%; }
/* 容器相对定位 + 渐变背景；卡片用绝对定位到 50%/50% 再位移回拉自身一半，
   纯比例居中，不依赖 flex，桌面任意尺寸均精确居中 */
.login-wrap { position: relative; width: 100%; min-height: 100vh; overflow: auto; padding: 24px; box-sizing: border-box;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #06b6d4 140%); }
.login-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 18px; width: 400px; max-width: calc(100% - 32px); padding: 34px 30px;
  max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 42px; height: 42px; font-size: 21px; }
.login-brand .lb-name { font-size: 19px; font-weight: 800; color: var(--c-ink); }
.login-card h2 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { color: var(--c-muted); font-size: 13px; margin: 0 0 22px; }
.login-form .form-row { margin-bottom: 16px; }
.login-err { color: var(--c-danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
}
@media (max-width: 860px) {
  .admin-side { transform: translateX(-100%); }
  .admin-side.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .admin-main { margin-left: 0; }
  .side-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-scrim.show { display: block; position: fixed; inset: 0; z-index: 35; }
}

/* ---------------- 统计卡片（成本核算） ---------------- */
.stat-cards { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; }
.stat-card { flex: 1 1 180px; min-width: 160px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--c-muted); margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--c-ink); }
.text-ok { color: #15803d; }
.text-danger { color: #b91c1c; }

/* 图片/视频预览弹层 */
.lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.lightbox-mask { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.lightbox-box { position: relative; max-width: min(92vw, 1200px); max-height: 90vh; background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 12px 48px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 10px; }
.lightbox-box img, .lightbox-box video { max-width: 90vw; max-height: 76vh; object-fit: contain; border-radius: 8px; background: #111; }
.lightbox-bar { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.lightbox-bar .muted { flex: 1; font-size: 13px; }

/* 菜单角标（如工单待接单数） */
.menu-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:6px; border-radius:9px; background:var(--c-warn-500,#e6a23c); color:#fff; font-size:11px; line-height:1; }

/* ---------------- 列表批量操作条（提示词模板等） ---------------- */
.batch-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 14px;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; font-size: 13px; color: var(--c-ink-2); }
.batch-bar .spacer { flex: 1; }
.batch-bar .bb-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--c-ink); }
.batch-bar .bb-count b { color: var(--c-primary-700); font-size: 14px; }
.batch-bar button[disabled] { opacity: .5; cursor: not-allowed; }
.batch-bar input[type="checkbox"], table.data input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--c-primary-700); vertical-align: middle; }
.st-toggle { display: inline-flex; align-items: center; text-decoration: none; }
.st-toggle:hover { opacity: .82; }
.st-toggle .badge { cursor: pointer; }

/* 表格长文本列统一省略：td 的 max-width/ellipsis 在自动表格布局下各浏览器行为不一致（且全局 white-space:nowrap 会横向溢出覆盖后列）。
   一律套块级容器才可靠：超长单行省略，悬停完整文本由 admin.js 溢出检测后注入原生 title。
   默认限宽 240px，可按列用行内 style="max-width:xxx" 覆盖。 */
.cell-ell { display: block; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }

/* ---------------- 表格「详情」列：多行阅读 + 展开/收起 ----------------
   td 继承了 white-space:nowrap，长文本会横向溢出覆盖后列，必须套块级容器才可靠。
   结构：<div class="cell-detail"><div class="cd-text">正文</div><span class="cd-toggle">展开全文<i></i></span></div>
   裁剪状态判定、展开/收起、溢出测量、窗口 resize 重算统一由 admin.js 接管，页面只套 class。
   要点：① 行高 1.75（英文 1.55 在 13px 中文下会糊成一片）；② word-break:normal + overflow-wrap:anywhere
   让中文按字自然换行，只有超长 URL/邮箱才强制断行；③ 负 margin 让留白只作用于视觉、不额外撑高行。 */
.cell-detail {
  display: block;
  max-width: 520px;          /* 需要按列微调时用行内 style="max-width:…" 覆盖 */
  min-width: 200px;
  white-space: normal;       /* 覆盖 td 的 nowrap */
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.75;
  font-size: 13px;
  color: var(--c-ink-2);
  padding: 6px 10px;
  margin: -6px -10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.cell-detail:hover { background: #f3f5ff; }
.cell-detail:not(.more) { cursor: auto; }
.cell-detail:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.cell-detail .cd-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;     /* 默认最多 3 行，超出才折叠 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cell-detail .cd-toggle { display: none; }
.cell-detail.more .cd-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 3px; font-size: 12px; line-height: 1.6;
  color: var(--c-primary-600); user-select: none;
}
.cell-detail .cd-toggle i {
  width: 5px; height: 5px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .18s ease;
}
.cell-detail.open { background: #f8f9ff; box-shadow: inset 0 0 0 1px #eaedfa; }
.cell-detail.open .cd-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.cell-detail.open .cd-toggle i { transform: rotate(-135deg); margin-top: 3px; }
/* 弹窗内的小号表格（会员详情 → 安全事件） */
.cell-detail.cd-sm { font-size: 12px; line-height: 1.7; max-width: 280px; min-width: 150px; padding: 4px 8px; margin: -4px -8px; }
