/* ============================================================================
   快乐周末 · Web 管理后台
   沿用小程序那一套设计变量：主色户外青绿、强调色暖橙只用于需要立刻看见的信号。
   ============================================================================ */

:root {
  --primary: #0e9f6e;
  --primary-d: #0a7a54;
  --primary-l: #e8f7f1;
  --primary-l2: #f3fbf8;
  --accent: #f97316;
  --accent-l: #fff2e8;
  --danger: #ef4444;
  --danger-l: #fef2f2;
  --warning: #d97706;
  --warning-l: #fffbeb;

  --text: #111827;
  --text-2: #4b5563;
  --text-3: #9ca3af;
  --text-4: #c9ced6;
  --line: #eef0f2;
  --line-2: #f5f6f8;
  --bg: #f6f7f8;
  --card: #ffffff;

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --sh: 0 2px 10px rgba(17, 24, 39, 0.05);
  --sh-raise: 0 8px 24px rgba(17, 24, 39, 0.1);

  --sidebar-w: 232px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-d); text-decoration: none; }

.ic { display: block; flex: none; }

/* ------------------------------------------------------------------ 布局 */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--card);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand__dot {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, #17b981, #0a7a54);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}

.brand__name { font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }
.brand__sub { font-size: 11px; color: var(--text-3); margin-top: -1px; }

.nav { padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }

.nav__group { padding: 14px 8px 6px; font-size: 11px; color: var(--text-4); letter-spacing: 1px; }

.nav__item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav__item:hover { background: var(--line-2); }
.nav__item.is-on { background: var(--primary-l); color: var(--primary-d); font-weight: 600; }
.nav__item .nav__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.sidebar__foot { padding: 12px; border-top: 1px solid var(--line); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  height: var(--topbar-h);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 15;
}
.topbar__title { font-size: 17px; font-weight: 700; letter-spacing: 0.3px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.content { padding: 24px 28px 60px; max-width: 1600px; }

/* 首屏登录态校验期间整块遮住：脏 token（过期 / 被踢 / 换过 SECRET_KEY）会让
   壳层先渲染出来、再被 401 踢到登录页，中间那一瞬像「没登录也能进系统」。
   校验通过后由 api.js 摘掉 .booting；校验失败就直接跳走，用户一帧都看不到。
   延迟 0.2s 才淡入提示，避免快的时候闪一下文字。 */
body.booting #app,
body.booting .auth { visibility: hidden; }
body.booting::after {
  content: '正在校验登录状态…';
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text-3); font-size: 13px;
  opacity: 0; animation: bootingFade 0.15s 0.2s forwards;
}
@keyframes bootingFade { to { opacity: 1; } }

/* ------------------------------------------------------------------ 卡片 */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
}
.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card__title { font-size: 14.5px; font-weight: 700; }
.card__body { padding: 20px; }
.card + .card { margin-top: 18px; }
/* ⚠️ .grid-2 里两卡是并排的，间距已经由 grid 的 gap 负责；
   若放任上面那条 .card + .card 生效，右边那张会被额外推下 18px
   —— 看上去就是「两个卡片顶部没对齐」。 */
.grid-2 > .card + .card { margin-top: 0; }
/* 反过来，整宽卡片跟在 .grid-2 后面时，它不是 .card 的相邻兄弟，
   .card + .card 够不着 → 会完全贴住上面那张网格卡片，所以补一条。 */
.grid-2 + .card { margin-top: 18px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: 0.4px; }
.page-head p { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.page-head__actions { display: flex; gap: 10px; flex: none; }

/* ------------------------------------------------------------- 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
/* 概览固定 3 列，6 个指标刚好 3×2，不会出现孤零零的第五个 */
.stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 兜底护栏：网格里的卡片间距一律交给 gap，绝不允许 .card + .card 的
   margin-top 生效 —— 它会把第 2 张之后的卡片各推下 18px，表现为
   「第一张卡比后面的高」。统计卡请用 .stat（见下面定义）。 */
.stat-grid > .card + .card { margin-top: 0; }
@media (max-width: 900px) { .stat-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid--3 { grid-template-columns: 1fr; } }
.stat {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat__top { display: flex; align-items: center; justify-content: space-between; }
.stat__label { font-size: 12.5px; color: var(--text-3); }
.stat__icon {
  width: 32px; height: 32px; border-radius: 10px; background: var(--primary-l);
  display: flex; align-items: center; justify-content: center;
}
.stat__value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1; }
.stat__value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat__value.is-accent { color: var(--accent); }
.stat__hint { font-size: 11.5px; color: var(--text-4); }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { opacity: 0.86; }
.btn:active { opacity: 0.72; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(14, 159, 110, 0.24); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn--ghost:hover { border-color: var(--text-4); }
.btn--danger { background: var(--danger-l); color: #dc2626; }
.btn--soft { background: var(--primary-l); color: var(--primary-d); }
.btn--sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; height: 44px; font-size: 15px; }

/* ------------------------------------------------------------------ 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge--green { background: var(--primary-l); color: var(--primary-d); }
.badge--orange { background: var(--accent-l); color: #c2410c; }
.badge--gray { background: var(--line-2); color: #6b7280; }
.badge--red { background: var(--danger-l); color: #dc2626; }
.badge--outline { background: transparent; border: 1px solid var(--line); color: var(--text-3); }

/* ------------------------------------------------------------------ 表格 */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
/* 首列 / 末列的左（右）内边距对齐 .card__head 的 20px —— 否则文字和操作按钮
   会贴到卡片边缘上。中间列仍然 14px，宽表不容易挤出横向滚动条。
   ⚠️ 这两条靠「特异性」压过下面 th/td 的 padding 简写（:first-child 算一个
   类级选择器，(0,2,2) > (0,1,2)），所以位置放前放后都行，别看着顺序在前就删掉。 */
table.table th:first-child, table.table td:first-child { padding-left: 20px; }
table.table th:last-child,  table.table td:last-child  { padding-right: 20px; }
table.table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3);
  padding: 12px 14px; background: var(--line-2); white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.table th:first-child { border-radius: var(--r-sm) 0 0 0; }
table.table th:last-child { border-radius: 0 var(--r-sm) 0 0; }
table.table td {
  padding: 13px 14px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; color: var(--text-2);
}
table.table tbody tr:hover { background: var(--primary-l2); }
table.table td.strong { color: var(--text); font-weight: 600; }
table.table td.num { font-variant-numeric: tabular-nums; }
table.table .cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

.thumb {
  width: 48px; height: 48px; border-radius: 10px; object-fit: cover;
  background: var(--line-2); display: block; flex: none;
}
.thumb--lg { width: 100%; height: 100%; border-radius: 0; }

.activity-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.activity-cell__body { min-width: 0; }
.activity-cell__title {
  font-weight: 600; color: var(--text); font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4;
}
.activity-cell__meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* ---------------------------------------------------------------- 进度条 */
.progress { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #34d399, #0e9f6e); }
.progress i.urgent { background: linear-gradient(90deg, #fbbf24, #f97316); }
.progress i.full { background: #d1d5db; }

/* ------------------------------------------------------------------ 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > label .req { color: var(--danger); margin-left: 3px; }
.field .hint { font-size: 11.5px; color: var(--text-4); }

.input, .textarea, .select {
  width: 100%; padding: 9px 12px; min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; color: var(--text);
  font-size: 13.5px; font-family: inherit; line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.12);
}
.textarea { min-height: 88px; resize: vertical; }
.input[type="number"] { font-variant-numeric: tabular-nums; }

.inline-fields { display: flex; gap: 10px; align-items: center; }
.inline-fields .input { flex: 1; }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--line-2); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--text-4); }
.chip.is-on { background: var(--primary-l); border-color: var(--primary); color: var(--primary-d); font-weight: 600; }

.cover-picker {
  position: relative; border: 1px dashed #d7dbe0; border-radius: var(--r-lg);
  background: #fff; overflow: hidden; cursor: pointer;
  height: 220px; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.cover-picker:hover { border-color: var(--primary); }
/* ⚠️ 只能用子选择器：封面预览图是 .cover-picker 的直接子元素，
   而右下角「更换封面」胶囊里的相机图标、空态里的占位图标都是更深层的
   <img class="ic" width=14/34>。写成 `.cover-picker img` 会把它们也按
   width/height:100% 撑大 —— 表现就是那颗图标涨到几百像素、把胶囊顶成一条黑带。 */
.cover-picker > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-picker__ph { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.cover-picker__mask {
  position: absolute; right: 12px; bottom: 12px;
  height: 30px; padding: 0 14px; border-radius: 999px;
  background: rgba(17, 24, 39, 0.66); color: #fff;
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 5px;
}

/* --------------------------------------------------------------- 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.toolbar__grow { flex: 1; min-width: 120px; }
.search-box { position: relative; }
.search-box .input { padding-left: 34px; min-width: 220px; }
.search-box__icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line); }
.seg button {
  height: 30px; padding: 0 14px; border: none; background: transparent;
  border-radius: 999px; font-size: 12.5px; font-family: inherit;
  color: #6b7280; cursor: pointer; font-weight: 500;
}
.seg button.is-on { background: #fff; color: var(--text); font-weight: 700; box-shadow: 0 2px 6px rgba(17, 24, 39, 0.08); }

/* --------------------------------------------------------------- 分页 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-size: 13px; color: var(--text-3); }
.pager__btns { display: flex; gap: 8px; }

/* --------------------------------------------------------------- 空状态 */
.empty { padding: 64px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty__ring {
  width: 72px; height: 72px; border-radius: 50%; background: var(--line-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.empty__title { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.empty__desc { font-size: 12.5px; color: var(--text-3); margin-top: 6px; max-width: 380px; line-height: 1.7; }
.empty .btn { margin-top: 18px; }

/* ------------------------------------------------------------- 提示条 */
.notice {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.65;
}
.notice--warn { background: var(--warning-l); border: 1px solid #fde68a; color: #92400e; }
.notice--info { background: var(--primary-l2); border: 1px solid #b7e4d1; color: var(--primary-d); }
.notice--danger { background: var(--danger-l); border: 1px solid #fecaca; color: #b91c1c; }
.notice + * { margin-top: 16px; }

/* --------------------------------------------------------------- Toast */
.toast-host { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; background: rgba(17, 24, 39, 0.9);
  color: #fff; font-size: 13.5px; box-shadow: var(--sh-raise);
  animation: toast-in 0.2s ease;
}
.toast.is-error { background: #b91c1c; }
.toast.is-success { background: var(--primary-d); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- Modal */
.modal-host {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(17, 24, 39, 0.42);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  width: 100%; max-width: 460px; background: #fff;
  border-radius: var(--r-lg); box-shadow: var(--sh-raise);
  overflow: hidden; animation: modal-in 0.18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.97) translateY(6px); } to { opacity: 1; transform: none; } }
.modal--wide { max-width: 760px; }
.modal__head { padding: 20px 22px 0; font-size: 16px; font-weight: 700; }
.modal__body { padding: 14px 22px 4px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.modal__foot { padding: 18px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* --------------------------------------------------------------- 登录页 */
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(14, 159, 110, 0.16), transparent 62%),
    radial-gradient(700px 460px at 92% 108%, rgba(249, 115, 22, 0.12), transparent 60%),
    var(--bg);
}
.auth__card { width: 100%; max-width: 396px; background: #fff; border-radius: 20px; box-shadow: var(--sh-raise); padding: 36px 32px 32px; }
.auth__logo { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(150deg, #17b981, #0a7a54); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: 0 10px 22px rgba(14, 159, 110, 0.3); }
.auth h1 { margin: 0; font-size: 23px; letter-spacing: 1px; }
.auth p.sub { margin: 8px 0 26px; font-size: 13px; color: var(--text-3); }
.auth .field + .field { margin-top: 16px; }
.auth__foot { margin-top: 22px; font-size: 12px; color: var(--text-4); text-align: center; line-height: 1.7; }

/* --------------------------------------------------------------- 杂项 */
.muted { color: var(--text-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef0f2 25%, #f6f7f8 37%, #eef0f2 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.code-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--primary-l2); border: 1px dashed #b7e4d1;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px; font-weight: 700; color: var(--primary-d); letter-spacing: 1px;
}

/* ============================================================================
   自适应（手机 / 平板）
   断点：1080 → 表单与双列网格单列 ｜ 860 → 侧栏变抽屉、顶栏与卡片瘦身
        700 → 表格折成卡片（10 列的表格在手机上横向拖太难受）
   ============================================================================ */

/* 抽屉遮罩。桌面尺寸下恒不显示，只在 860 断点里放开 */
.sb-mask {
  display: none;
  position: fixed; inset: 0; z-index: 19;
  background: rgba(17, 24, 39, 0.42);
}
.sb-mask.is-on { display: block; }

/* 顶栏「菜单」按钮：默认藏起来，小屏才出（不用 JS 判宽度，拉伸窗口也不会错） */
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .form-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 0px; --topbar-h: 56px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: min(76vw, 280px);
  }
  .sidebar.is-open {
    transform: none;
    width: min(76vw, 280px);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.22);
  }

  .main { margin-left: 0; }
  .content { padding: 16px 14px 72px; }
  .topbar { padding: 0 14px; }
  .nav-toggle { display: inline-flex; }
  .topbar__title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 署名收进抽屉就够了，顶栏留给标题和操作按钮 */
  .topbar__who { display: none !important; }

  .page-head { flex-direction: column; gap: 12px; }
  .page-head h1 { font-size: 19px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1; }

  /* 9 个标签在手机上排不下：整条横滑，不折行 */
  .seg {
    display: flex;
    width: 100%;
    overflow-x: auto;
    border-radius: var(--r-md);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; }

  .toolbar { padding: 12px 14px; }
  .toolbar__grow { display: none; }
  .search-box { width: 100%; }
  .search-box .input { min-width: 0; width: 100%; }

  .pager { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
  .pager__btns .btn { flex: 1; }

  .stat { padding: 15px 16px; }
  .stat__value { font-size: 24px; }

  .card__head { padding: 14px 16px; }
  .card__body { padding: 16px; }

  /* 弹窗贴底弹出：手机上键盘起来后中间弹窗很容易被顶出可视区 */
  .modal-host { padding: 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal__foot { position: sticky; bottom: 0; background: #fff; padding-bottom: 22px; }
  .modal__foot .btn { flex: 1; }

  .auth { padding: 16px; }
  .auth__card { padding: 28px 22px 24px; }
}

/* ---------------------------------------------- 表格 → 卡片（手机） */
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; }
  table.table { font-size: 13px; }
  table.table thead { display: none; }
  table.table,
  table.table tbody,
  table.table tr,
  table.table td { display: block; width: 100%; }

  table.table tr {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
  }
  table.table tbody tr:hover { background: #fff; }

  table.table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line-2);
    text-align: left;
  }
  /* 折成卡片后每格都是「标签 + 值」，首末格再留 20px 会让文字缩进对不齐，
     统一收回 12px（同特异性、写在后面即可覆盖桌面那两条） */
  table.table td:first-child { padding-left: 12px; }
  table.table td:last-child { padding-right: 12px; }
  table.table td:last-child { border-bottom: none; }
  table.table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.2px;
  }
  /* 没字段名的格子（跨列占位、纯内容块）别留空标签列 */
  table.table td:not([data-label])::before,
  table.table td[data-label=""]::before { display: none; }
  table.table td:not([data-label]),
  table.table td[data-label=""] { grid-template-columns: minmax(0, 1fr); }

  table.table td > .activity-cell,
  table.table td > .cell-actions { min-width: 0; }
  table.table .cell-actions { justify-content: flex-start; }

  /* openid / IP 这类长串原来靠内联样式 nowrap + 省略号收窄，
     卡片里省略掉就彻底看不见了 —— 带内联样式，只能 !important 盖 */
  table.table td.mono {
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    word-break: break-all;
    line-height: 1.45;
  }

  .thumb { width: 40px; height: 40px; }
  .empty { padding: 44px 18px; }
  .cover-picker { height: 170px; }
}
