/* ============================================================
   shell.css — 顶栏壳层（v8 布局改版 Phase 1）
   只负责：顶栏导航、账号菜单、页面容器、过渡期高度补偿。
   页面内容样式仍在 admin.css / activity-editor.css，逐页换肤时
   再迁入本文件。色值一律走 admin-tokens.css 的语义 token。
   ============================================================ */

/* 全站字体栈：补中文回退（DESIGN.md 第 0 章决议，替代 Inter 单栈） */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ------------------------------------------------------------
   1. 顶栏
   ------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--wrap-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  padding: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}
.topbar .brand:hover { text-decoration: none; }
.topbar .brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.topbar .brand .mark svg { width: 18px; height: 18px; }
.topbar .brand small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
}

.mainnav { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; }
.mainnav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.mainnav a svg { width: 14px; height: 14px; }
.mainnav a:hover { color: var(--text); text-decoration: none; }
.mainnav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-pill {
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  height: 36px;
  width: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  opacity: 0;
  z-index: 0;
  transition: left .3s cubic-bezier(.4, 0, .2, 1), width .3s cubic-bezier(.4, 0, .2, 1), opacity .2s;
  pointer-events: none;
}
.nav-pill.on { opacity: 1; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.iconbtn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  transition: .18s;
}
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); }

.account { position: relative; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-height: 34px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-soft);
  transition: .18s;
}
.account-trigger:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); }
.account-trigger b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
  text-transform: uppercase;
}
.account-trigger[aria-expanded="true"] { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); }
.account-trigger .caret { width: 13px; height: 13px; transition: rotate .2s; opacity: .7; }
.account-trigger[aria-expanded="true"] .caret { rotate: 180deg; }

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 212px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  translate: 0 -6px;
  transition: opacity .16s, translate .16s, visibility .16s;
}
.account-menu.open { opacity: 1; visibility: visible; translate: 0 0; }
.account-menu-head { padding: 9px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.account-menu-head b { display: block; font-size: 13px; font-weight: 650; color: var(--text); }
.account-menu-head span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.account-menu a,
.account-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: .16s;
}
.account-menu a:hover,
.account-menu button:hover { background: var(--surface-soft); color: var(--text); text-decoration: none; }
.account-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.account-menu svg { width: 14px; height: 14px; flex: none; }
.account-menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.account-menu form { margin: 0; }
/* 仅右侧「当前项」勾标靠右；前置图标不受影响 */
.account-menu svg.tail { margin-left: auto; opacity: 0; width: 13px; height: 13px; }
.account-menu a[aria-current="page"] svg.tail { opacity: 1; }

/* ------------------------------------------------------------
   2. 页面容器：main.content 同时挂 .page-wrap（过渡期保留 content
      以兼容旧规则；逐页换肤完成后 content 退役）
   ------------------------------------------------------------ */
.page-wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: var(--sp-5) var(--gutter) var(--sp-6);
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
}
.page-wrap > * { flex: 0 0 auto; }
.page-wrap > .toast { align-self: stretch; }
.live-connection-status { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; border: 1px solid var(--danger-soft); border-left: 3px solid var(--danger); border-radius: 6px; padding: 7px 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.live-connection-status svg { width: 15px; height: 15px; flex: 0 0 auto; }
/* 只在 CLOSED（浏览器不会重连）时才出现的刷新入口。用 currentColor 描边，跟着横幅的红走；
   悬停反相填充。必须显式 min-height: 0 —— admin.css 的 `button { min-height: 34px }` 是元素
   选择器，不重置的话这个按钮会被撑到 34px，整条横幅从 ~34px 长到 50px。 */
.live-connection-status button { margin-left: auto; flex: 0 0 auto; min-height: 0; padding: 1px 8px; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; font: inherit; line-height: 1.4; cursor: pointer; }
.live-connection-status button:hover { background: var(--danger); color: var(--surface); }

/* ------------------------------------------------------------
   3. 响应式
   ------------------------------------------------------------ */
@media (max-width: 1280px) {
  :root { --gutter: 24px; }
}
@media (max-width: 900px) {
  :root { --gutter: 18px; --wrap-max: 100%; }
  .topbar .brand small { display: none; }
  .topbar-inner { gap: var(--sp-3); }
  .mainnav { overflow-x: auto; scrollbar-width: none; margin-left: 0; }
  .mainnav::-webkit-scrollbar { display: none; }
  .nav-pill { display: none; }
  .mainnav a[aria-current="page"] { background: var(--accent-soft); border-radius: 9px; }
  .account-trigger > span { display: none; }
  .account-trigger { padding: 0 8px 0 5px; }
}
@media (max-width: 560px) {
  .topbar { height: auto; }
  .topbar-inner { flex-wrap: wrap; min-height: 56px; padding: 9px var(--gutter); gap: 10px; }
  .topbar .brand > span:last-child { display: none; }
  .mainnav { order: 3; flex: 1 0 100%; flex-wrap: wrap; justify-content: flex-start; overflow: visible; margin: 0; gap: 4px; }
  .mainnav a { padding: 0 8px; font-size: 12.5px; gap: 5px; }
}

/* ------------------------------------------------------------
   4. 概览页（v8 换肤）：面包屑 + 单卡片 surface + 分区 + 填充表格
   ------------------------------------------------------------ */
.crumbbar { display: flex; align-items: center; gap: var(--sp-3); min-height: 30px; margin-bottom: var(--sp-3); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; transition: color .16s; }
.crumbs a:hover { color: var(--accent); text-decoration: none; }
.crumbs .sep { opacity: .5; }
.crumbs b { color: var(--text-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 显式复位：页面还带着旧 class（如 .task-history-layout）时，
     旧规则里的 align-items:start 会让 flex 子项按内容宽度收缩 */
  align-items: stretch;
  min-height: 0;
}
/* 盖掉 Phase 1 的 .page-wrap > * { flex: 0 0 auto }，让 surface 吸收剩余视口高度 */
.page-wrap > .surface { flex: 1 1 auto; min-height: 0; }

/* 内容区独立滚动的根：flex 子项只有在父级有「确定高度」时才会被压缩，
   min-height 不会压缩。实测给填充模型页注入超量行时，min-height 下整页会随之
   增长、内滚永不接管（.page-wrap 从 890px 被撑到 2214px）。
   过去这个确定高度来自 legacy 的 .task-history-layout { height: calc(100vh - 178px) }，
   也就是 Phase 7 要删的魔法数；删掉它 tasks 页同样会失去内滚，所以这里补到填充模型本身。
   只作用于有 .surface 的换肤页；min-height 兜底，极矮视口退化成整页滚动而不是裁切。 */
@media (min-width: 901px) {
  .page-wrap:has(> .surface) {
    height: calc(100dvh - var(--topbar-h));
    min-height: 560px;
  }
}

.section { flex: 0 0 auto; padding: var(--sp-5) var(--sp-6); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.section--fill { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fill-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fill-body > .table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.fill-body.is-empty > .table-scroll { flex: 0 0 auto; overflow: visible; }
.fill-body > .empty-state { flex: 1 1 auto; min-height: 150px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13.5px; }
.fill-body:not(.is-empty) > .empty-state { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  transition: .18s;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); text-decoration: none; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }

/* 统计卡：admin.css 里旧 .stats/.stat 规则随本页换肤成为死代码，
   这里的 margin/text-transform 是显式复位，不是多余声明 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: var(--sp-3); margin: 0; }
.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, translate .18s;
}
.stat:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); translate: 0 -1px; text-decoration: none; }
.stat-main { min-width: 0; }
.stat-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.stat-value { display: block; margin-top: 6px; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.stat small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.stat-items { margin-top: 4px; display: grid; gap: 2px; }
.stat-more { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-scroll > table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  white-space: nowrap;
}
.table-scroll tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--text-soft); vertical-align: middle; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-scroll tbody tr:hover td { background: var(--surface-soft); }
.mono { font-family: var(--mono); font-size: 12.5px; }

.table-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-5);
  flex-wrap: wrap;
  padding: 13px var(--sp-6);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
}
/* 分页只有一套规格。历史上分了两支：概览 / 执行任务用 .total + .page-size + .pager
   （30px 控件、12.5px 字号），抢券活动 / Worker / 美团用 .sign-pagination-* 变体
   （32px 控件、12px 字号 + 14px 总计）。两族在下面收敛到同一套尺寸与字号，
   否则同一个分页条在不同页面会"一大一小"。 */
.table-foot .total,
.table-foot .sign-pagination-total,
.table-foot .page-size,
.table-foot .sign-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.table-foot .total b,
.table-foot .sign-pagination-total strong {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.sizeselect,
.table-foot .sign-pagination-size select {
  width: auto;
  height: 32px;
  min-height: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 0 7px;
  cursor: pointer;
}
.pager { display: flex; align-items: center; gap: 4px; }
.table-foot .sign-pagination-controls { display: flex; align-items: center; gap: 4px; }
/* span 分支同样要覆盖：无上/下一页时模板渲染的是 <span class="icon-only"> 占位。 */
.table-foot .pager a,
.table-foot .pager button,
.table-foot .pager span,
.table-foot .sign-pagination-controls a,
.table-foot .sign-pagination-controls button,
.table-foot .sign-pagination-controls span {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  transition: .16s;
}
.table-foot .pager a svg,
.table-foot .pager button svg,
.table-foot .sign-pagination-controls svg { width: 14px; height: 14px; }
.table-foot .pager a:hover,
.table-foot .pager button:hover:not(:disabled),
.table-foot .sign-pagination-controls a:hover,
.table-foot .sign-pagination-controls button:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); text-decoration: none; }
.table-foot .pager button:disabled,
.table-foot .sign-pagination-controls button:disabled,
.table-foot .sign-pagination-controls a:disabled,
.table-foot [aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
/* 当前页。选择器必须带上 .sign-pagination-controls 才压得住上面的 `... span` 通用规则，
   否则 Worker / 美团 的当前页会连高亮一起被素掉（活动页因为同时有 .pager 才侥幸正常）。 */
.table-foot .pager .cur,
.table-foot .sign-pagination-controls .sign-pagination-current {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-on-strong);
  font-weight: 650;
  cursor: default;
}

@media (max-width: 900px) {
  /* 窄屏解除填充模型：页面按内容自然高度整页滚动 */
  .page-wrap { min-height: 0; }
  .page-wrap > .surface { flex: 0 0 auto; }
  .section--fill { flex: 0 0 auto; }
  .section { padding: var(--sp-4); }
  .stats { grid-template-columns: 1fr 1fr; }
  .table-foot { justify-content: space-between; padding: 12px var(--sp-4); }
  .table-scroll > table { min-width: 680px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }
}

/* ------------------------------------------------------------
   5. 执行任务页（v8 换肤）：日期标签页 + 按执行时间分时段 + 卡片栅格
   ------------------------------------------------------------ */
.tasks-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: 14px var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.tasks-toolbar .push { margin-left: auto; }
.scope-meta { font-size: 13px; color: var(--muted); flex: none; }

.tool-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
/* 工具条上的动作按钮（标签管理 / 创建服务器 / 创建计划 / 新建活动）原来是裸放在
   条上的 .btn，和旁边带外框的「状态」分组不属于同一种视觉，显得另类。把它们包进
   .tool-group 后，这里只需把尺寸压到同一档。 */
.tool-group > .btn,
.tool-group > .button,
.tool-group > a,
.tool-group > button {
  height: 32px;
  /* admin.css 的 `button { min-height: 34px }` 是元素选择器，会把 <button> 撑到 34px
     而同样写法的 <a> 只有 32px —— 同一个外框里两个按钮高度不同就是这么来的。 */
  min-height: 0;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
}
/* 工具栏控件只有一档尺寸：高度 32px、字号 13px。
   换肤期间各页分别落在 28 / 30 / 32 / 34 / 36px 与 12 / 12.5 / 13px，
   同一行里的「状态」框和「批量操作」框高度都不一致，这里统一收敛。 */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: .16s;
  white-space: nowrap;
}
.tool-btn svg { width: 14px; height: 14px; }
.tool-btn:hover { color: var(--text); border-color: var(--line-strong); }
.tool-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.tool-btn .cur { font-weight: 650; font-size: 12.5px; }
.tool-btn .caret { width: 13px; height: 13px; opacity: .65; transition: rotate .2s; }
.tool-btn[aria-expanded="true"] .caret { rotate: 180deg; }
.tool-divider { width: 1px; height: 18px; background: var(--line); margin: 0 3px; flex: none; }

.dd { position: relative; display: inline-flex; }
.dd-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 45;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-float);
  padding: 5px;
}
.dd-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: .14s;
}
.dd-menu button:hover { background: var(--surface-soft); color: var(--text); }
.dd-menu button.active { color: var(--accent); font-weight: 650; }
.radio { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.dd-menu button.active .radio { border-color: var(--accent); }
.dd-menu button.active .radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.batch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-soft);
  transition: .16s;
  user-select: none;
}
.batch-toggle svg { width: 14px; height: 14px; color: var(--accent); }
.batch-toggle:hover { background: var(--surface); color: var(--text); }
.batch-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.batch-toggle .track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--switch-track);
  position: relative;
  flex: none;
  transition: background .2s;
}
.batch-toggle .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--switch-thumb);
  transition: translate .2s;
}
.batch-toggle input:checked ~ .track { background: var(--accent); }
.batch-toggle input:checked ~ .track::after { translate: 14px 0; }

/* 二级栏（执行任务的日期条 / 抢券活动的分组条 / Worker 的地区条）统一成同一种构图：
   surface-soft 底 + 13px 内边距 + 32px 描边芯片，三种页面外高都是 59px。
   日期芯片原来是「浅底内嵌分段控件」（多一层 3px padding + 边框，比另两条高 8px），
   这里退掉那层壳，改成和 .activity-chip / .worker-region-tab 相同的描边芯片。 */
.date-bar { flex: 0 0 auto; padding: 13px var(--sp-6); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.date-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.date-tabs::-webkit-scrollbar { display: none; }
.date-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: none;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: .16s;
}
.date-tabs a:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); text-decoration: none; }
.date-tabs a.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.date-tabs time { font-family: var(--mono); font-size: 12.5px; }
.date-tabs .n {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  display: grid;
  place-items: center;
}
.date-tabs a.is-active .n { background: var(--accent-soft); color: var(--accent); }
.date-tabs .latest { font-size: 10.5px; color: var(--muted); }
.date-tabs-empty { padding: 4px 12px; color: var(--muted); font-size: 13px; }

.tasks-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: var(--sp-5) var(--sp-6); }
.tasks-content > .task-batch-bar { margin-bottom: var(--sp-4); }
/* fill-body 承接滚动；task-date-content 是批量模式的 JS 作用域锚点 */
.tasks-content > .fill-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-inline: 12px; }
@media (max-width: 900px) {
  .tasks-content > .fill-body { padding-inline: 8px; }
}

.time-group + .time-group { margin-top: 22px; }
.time-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.time-head h4 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 11px;
  border-radius: 999px;
  flex: none;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.time-head .count { font-size: 12.5px; color: var(--muted); flex: none; }
.time-head .line { flex: 1 1 auto; height: 1px; background: var(--line); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); gap: var(--sp-4); align-content: start; }
.card-grid .task-batch-card { min-height: 0; }

.task-batch-identity { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.task-batch-identity .ver {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  flex: none;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--mono);
}

/* 任务页沿用 server 分页，footer 复用概览页 .table-foot/.pager */

/* 执行任务页 · 批次详情：与 Worker 详情页同构——面板交给 .surface，
   原来靠 .task-detail-layout 的 calc(100vh - 178px) 撑高度，现在由填充模型提供。
   内部 .task-detail-heading / .task-detail-summary / .task-group-* 保持原样。 */
.task-detail-surface { overflow: hidden; }
.task-detail-date-bar { flex: 0 0 auto; }
/* 旧 .task-date-content 带卡片边框/圆角/背景与容器查询，.task-detail-content 带
   height:100%；外层已经是 .surface，这里的是显式复位，不是多余声明。 */
.task-detail-surface .task-date-content.task-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

@media (max-width: 900px) {
  .task-detail-surface { overflow: visible; }
  .task-detail-surface .task-date-content.task-detail-content { flex: 0 0 auto; height: auto; overflow: visible; }
}

/* ------------------------------------------------------------
   6. 抢券活动页（v8 换肤）：分段切换 + Store 分组 + 卡片栅格
   ------------------------------------------------------------ */
.activity-page-surface {
  height: auto;
  overflow: hidden;
}
.activity-toolbar { z-index: 4; }

.activity-segments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.activity-segments a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: .16s;
}
.activity-segments a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.activity-segments a.is-active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.activity-segments .n,
.activity-chip-tabs .n {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.activity-segments a.is-active .n,
.activity-chip.is-active .n { background: var(--accent-soft); color: var(--accent); }

.activity-page-surface .sign-filter-menu { min-width: 210px; border-radius: 11px; padding: 5px; }
.activity-page-surface .sign-filter-menu a { height: 32px; min-height: 32px; border-radius: 7px; font-size: 13px; }
.activity-page-surface .sign-filter-radio { width: 14px; height: 14px; border-color: var(--line-strong); }
.activity-page-surface .sign-filter-menu a.active .sign-filter-radio { border-color: var(--accent); background: transparent; box-shadow: none; }
.activity-page-surface .sign-filter-menu a.active .sign-filter-radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.activity-channel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-group-bar {
  flex: 0 0 auto;
  padding: 13px var(--sp-6);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.activity-chip-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.activity-chip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.activity-chip-wrap:has(.activity-chip.is-active) { border-color: var(--accent); background: var(--accent-soft); }
.activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: .16s;
}
/* 分组芯片外面还有一层 .activity-chip-wrap（承担分组下拉的边框），外层已有 1px 边框，
   内层芯片要少 2px，否则整条分组栏比别的二级栏高 2px。 */
.activity-chip-wrap .activity-chip { height: 30px; border: 0; border-radius: 0; background: transparent; }
.activity-chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); text-decoration: none; }
.activity-chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.activity-chip-action,
.activity-chip-add {
  position: static;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
/* 独立的「+ 分组」按钮和外层芯片同高，包在 .activity-chip-wrap 里的下拉箭头保持 28px。 */
.activity-chip-add { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.activity-chip-action svg,
.activity-chip-add svg { width: 13px; height: 13px; }
.activity-chip-action:hover,
.activity-chip-action:focus-visible,
.activity-chip-add:hover,
.activity-chip-add:focus-visible { border-color: var(--line-strong); background: var(--surface-soft); color: var(--text); outline: none; }
.activity-chip-action.danger:hover,
.activity-chip-action.danger:focus-visible { background: var(--danger-soft); color: var(--danger); }

.activities-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--sp-5) var(--sp-6);
}
.activities-content > .fill-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.activity-page-surface .activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  align-items: stretch;
  align-content: start;
  gap: var(--sp-3);
}
.activity-grid > .empty-state { grid-column: 1 / -1; min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; }
.activity-page-surface .activity-card,
.activity-page-surface .signature-card { border-radius: var(--radius-card); background: var(--surface-soft); }
.activity-page-surface .activity-card:hover,
.activity-page-surface .activity-card:focus-within,
.activity-page-surface .signature-card:hover,
.activity-page-surface .signature-card:focus-within { background: var(--surface-soft); box-shadow: var(--shadow-sm); }
.activity-page-surface .activity-grid .activity-card,
.activity-page-surface .activity-grid .signature-card { height: auto; }
.activity-page-surface .store-channel-frame.selection-mode [data-store-activity-card] { padding-left: 52px; }

@media (max-width: 900px) {
  .activity-page-surface { overflow: visible; }
  .activity-toolbar { align-items: stretch; }
  .activity-toolbar .scope-meta { width: 100%; }
  .activity-channel,
  .activities-content,
  .activities-content > .fill-body { flex: 0 0 auto; overflow: visible; }
  .activity-group-bar,
  .activities-content { padding: var(--sp-4); }
}
@media (max-width: 560px) {
  .activity-toolbar .tool-group,
  .activity-toolbar .activity-create { flex: 1 1 auto; }
  .activity-toolbar .activity-create { justify-content: center; }
  .activity-chip-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .activity-chip-tabs::-webkit-scrollbar { display: none; }
}

/* ------------------------------------------------------------
   7. Worker 节点页（v8 换肤）：状态工具栏 + 地区 chips + 节点工作区
   ------------------------------------------------------------ */
.worker-page-surface { overflow: hidden; }
.worker-toolbar { flex: 0 0 auto; }
.worker-toolbar-action { height: 32px; }
/* 美团工具条同样用「分段控件 + 一组动作按钮」的构图，动作组补上与其他页一致的外框，
   .sign-toolbar-control / .meituan-channel-create 压到同一档高度，否则
   它这一条比别页矮一截。（这组只在「用户账号」段存在：抽奖段没有任何动作按钮，
   容器跟着条件一起不渲染，否则会留下一个空的圆角外框。） */
.meituan-toolbar .sign-channel-toolbar-actions {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.meituan-toolbar .sign-channel-toolbar-actions > .sign-toolbar-control,
.meituan-toolbar .sign-channel-toolbar-actions > .meituan-channel-create {
  height: 32px;
  min-height: 0;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
}
/* 旧 .sign-filter-menu 规则（admin.css）与 .dd-menu 同特异性，靠加载顺序取胜，
   grid/gap/字号/圆角/单选圈尺寸仍会漏进来；下面是显式复位，不是多余声明。
   另：旧规则 .worker-channel-frame .sign-filter-menu 把菜单钉在 right:0，
   换肤后状态按钮在工具条最左，右对齐会被 .surface 的 overflow:hidden 裁掉，
   所以这里必须显式改回 left:0。 */
.worker-page-surface .sign-filter-menu { left: 0; right: auto; min-width: 210px; border-radius: 11px; padding: 5px; }
.worker-page-surface .sign-filter-menu button { height: 32px; min-height: 32px; border-radius: 7px; font-size: 13px; }
.worker-page-surface .sign-filter-radio { width: 14px; height: 14px; border-color: var(--line-strong); }
.worker-page-surface .sign-filter-menu button.active .sign-filter-radio { border-color: var(--accent); background: transparent; box-shadow: none; }
.worker-page-surface .sign-filter-menu button.active .sign-filter-radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
/* 地区条：左侧 chips 横向滚动，右侧固定放离线/在线入口。
   地区多的时候只有 chips 滚动，入口不会被挤出可视区。 */
.worker-region-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 13px var(--sp-6);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.worker-region-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.worker-region-tabs::-webkit-scrollbar { display: none; }
.worker-region-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: .16s;
}
.worker-region-tab:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-soft); text-decoration: none; }
.worker-region-tab.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.worker-region-tab b { min-width: 20px; display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 11px; }
.worker-region-tab.is-active b { background: var(--accent-soft); color: var(--accent); }
.worker-channel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-6) 0;
}
.worker-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--sp-5);
}
.worker-view-panel { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.worker-card-view[hidden], .worker-table-view[hidden] { display: none; }
.worker-card-view > .worker-card-list,
.worker-table-view > .worker-table-scroll { height: 100%; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.worker-card-view > .worker-card-list { padding: 0 2px 4px; }
/* grid-auto-rows 必须显式写 max-content：默认的 auto 会让卡片被 min-height:190px 定住，
   dl 里最后一行（状态 / 销毁时间）画到卡片框外，正好被下一行卡片的背景盖住 —— 等于看不见。
   实测：按内容算行高后卡片 190 → 281px，那一行才真正出现。
   （配套项：admin.css 的 .worker-card-body 用 flex: 1 1 auto 而不是 flex: 1，
   否则装 dl 的元素 basis 为 0，卡片算固有高度时把 dl 整个忽略掉。）
   别改成 align-items: start —— 行高仍是 190，卡片会溢出到下一行上去。 */
.worker-page-surface .worker-card-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); grid-auto-rows: max-content; align-content: start; gap: var(--sp-3); }
.worker-page-surface .worker-card { min-height: 190px; border-radius: var(--radius-card); background: var(--surface-soft); }
.worker-page-surface .worker-card:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.worker-page-surface .worker-table-scroll { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
/* 这条才是生效的那一条（比 admin.css 的 .worker-table 特异性高）。11 列内容实测需要
   1086px（24 字符的 CVM ID + 10px 左右内边距），取 1090 做下限：比它窄就让容器横向滚动，
   而不是把单元格挤到文字溢出。两处声明必须一致。 */
.worker-page-surface .worker-table { min-width: 1090px; }
.worker-page-surface .worker-batch-bar { bottom: 18px; }
.worker-page-surface .worker-pagination {
  flex: 0 0 auto;
  min-height: 56px;
  margin: 0 calc(var(--sp-6) * -1);
  border-top: 1px solid var(--line);
  padding: 13px var(--sp-6);
}
.worker-page-surface .worker-pagination .sign-pagination-total,
.worker-page-surface .worker-pagination .sign-pagination-size,
.worker-page-surface .worker-pagination .sign-pagination-controls { color: var(--muted); }

@media (max-width: 900px) {
  .worker-page-surface { overflow: visible; }
  .worker-toolbar { align-items: stretch; }
  .worker-toolbar .worker-toolbar-action { flex: 1 1 145px; justify-content: center; }
  /* 右侧簇（离线药丸 + 视图切换）统一交给 .push 推开。两个元素各自 margin-left:auto
     会平分剩余空间，把药丸甩到行中间。 */
  .worker-toolbar .worker-view-toggle { margin-left: 0; }
  .worker-channel,
  .worker-content,
  .worker-view-panel,
  .worker-card-view > .worker-card-list,
  .worker-table-view > .worker-table-scroll { flex: 0 0 auto; height: auto; overflow: visible; }
  .worker-channel { padding: var(--sp-4) var(--sp-4) 0; }
  .worker-region-bar { padding: 10px var(--sp-4); }
  .worker-page-surface .worker-pagination { margin: 0 calc(var(--sp-4) * -1); padding: 12px var(--sp-4); }
}
@media (max-width: 560px) {
  .worker-toolbar .tool-group { flex: 1 1 100%; }
  .worker-toolbar .worker-toolbar-action { flex: 1 1 0; min-width: 0; }
  .worker-toolbar .worker-toolbar-action span { overflow: hidden; text-overflow: ellipsis; }
  .worker-toolbar .worker-view-toggle { flex: 0 0 auto; }
}

/* ------------------------------------------------------------
   8. Worker 详情页（v8 换肤）：身份条 + 心跳日期 chips + 记录面板
   ------------------------------------------------------------ */
.worker-detail-surface { overflow: hidden; }
.worker-detail-toolbar { flex: 0 0 auto; }
.worker-detail-identity { min-width: 0; }
.worker-detail-identity h2 { margin: 0; font-size: 16px; font-weight: 650; }
.worker-detail-identity p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
/* 旧 .worker-detail-content 规则带 padding-left:18px / min-width 与窄屏 padding，
   下面的 padding 与 min-width 是显式复位，不是多余声明 */
.worker-detail-surface .worker-detail-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: var(--sp-5) var(--sp-6);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.worker-detail-surface .worker-execution-stats { margin: 0 0 var(--sp-4); }
.worker-detail-surface .worker-detail-tabs { margin-bottom: var(--sp-4); }
.worker-detail-surface .worker-detail-pagination {
  margin: var(--sp-4) calc(var(--sp-6) * -1) calc(var(--sp-5) * -1);
  border-top: 1px solid var(--line);
  padding: 12px var(--sp-6);
}
.worker-detail-surface .worker-detail-pagination .card-pagination { justify-content: flex-end; margin: 0; }

@media (max-width: 900px) {
  .worker-detail-surface { overflow: visible; }
  .worker-detail-surface .worker-detail-content { flex: 0 0 auto; overflow: visible; padding: var(--sp-4) var(--sp-4); }
  .worker-detail-surface .worker-detail-pagination { margin: var(--sp-4) calc(var(--sp-4) * -1) calc(var(--sp-4) * -1); padding: 12px var(--sp-4); }
  .worker-detail-toolbar { align-items: stretch; }
}

/* ------------------------------------------------------------
   9. 美团页（v8 换肤）：分段控件 + 用户账号表 / 抽奖卡片填充区
   旧 .meituan-channel-title 的 20px 标题随旧工具栏退场，说明文字回到 section-head。
   ------------------------------------------------------------ */
.meituan-surface { overflow: hidden; }
.meituan-surface .section-head .muted { font-size: 12.5px; }
.meituan-surface .fill-body > .signature-card-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
  scrollbar-gutter: stable;
  padding: 0 2px 4px;
}

@media (max-width: 900px) {
  .meituan-surface { overflow: visible; }
  .meituan-surface .fill-body,
  .meituan-surface .fill-body > .signature-card-list { flex: 0 0 auto; height: auto; overflow: visible; }
  .meituan-surface .tasks-toolbar { align-items: stretch; }
}

/* ------------------------------------------------------------
   10. 维护 / 设置 / 登录（v8 换肤）
   维护与设置各只有一个整页卡片，卡片自身承担内滚，故 .surface 放开 overflow-y。
   旧 .settings-layout 的 176px 侧栏退场，6 个设置分类改成顶部分段 tabs。
   ------------------------------------------------------------ */
.maintenance-surface {
  overflow-y: auto;
  scrollbar-gutter: stable;
}
/* 设置卡片内部分成「tabs 固定 + 内容区自滚」，卡片本身不需要滚动容器。 */
.section-note { margin: 0 0 var(--sp-4); color: var(--muted); font-size: 13px; }
.maintenance-surface form { margin: 0; }

.settings-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: .16s;
}
.settings-tabs a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.settings-tabs a.is-active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* 下面几条是对 admin.css 旧规则的显式复位（.settings-content 的 padding-left、
   .settings-form 的边框/底色/max-width），不是重复声明。 */
.settings-surface .settings-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: var(--sp-5) var(--sp-6);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.settings-surface .settings-form {
  max-width: 860px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.settings-surface .settings-form + .settings-form {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.settings-surface .settings-form .panel-header { margin-bottom: var(--sp-4); }
.settings-surface .settings-form .panel-header h2 { font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
/* 主按钮居中：admin.css 的 .settings-actions 本来就是 center，这条复位一度写成 flex-start，
   于是设置页的主按钮全贴在左边（散帅指出应与表单中线对齐）。这里只留对齐，间距仍用 v8 的 sp-4。 */
.settings-surface .settings-actions { justify-content: center; margin-top: var(--sp-4); }
.settings-surface .settings-release-facts { margin: 0; }

/* 登录页无顶栏：单卡片居中，圆角/阴影/标题按 v8 令牌 */
.login-page { background: var(--bg); }
.login-box { border-radius: var(--radius-shell); box-shadow: var(--shadow-card); padding: 28px; }
.login-box h1 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.login-box .brand { margin-bottom: 22px; }

@media (max-width: 900px) {
  .maintenance-surface,
  .settings-surface { overflow: visible; }
  .settings-surface .settings-content { flex: 0 0 auto; overflow: visible; padding: var(--sp-4); }
}

/* ------------------------------------------------------------
   11. 过渡期高度补偿（逐页换肤时逐个删除）
   旧布局没有顶栏，下列高度按 chrome ≈ 158~194px 人肉估算；
   顶栏新增 60px，统一再减去 var(--topbar-h)，避免列表页底部溢出。
   ------------------------------------------------------------ */
.activity-view-content[data-activity-view="requests"] { height: calc(100vh - 178px - var(--topbar-h)); }
.worker-label-view { min-height: min(680px, calc(100vh - 180px - var(--topbar-h))); }
.worker-label-sidebar { height: min(680px, calc(100vh - 180px - var(--topbar-h))); }
.worker-label-frame { height: min(680px, calc(100vh - 180px - var(--topbar-h))); }


/* ------------------------------------------------------------
   12. Sign 签名编辑页（signature-edit.html 三段式）：分段控件 + 各区填充
   原来三段各自是一个 .admin-workspace-frame 卡片（grid 三行），现在统一到
   surface + .section--fill，滚动体与 footer 由 shell 契约接管。
   ------------------------------------------------------------ */
.sign-editor-surface { overflow: hidden; }
.sign-editor-toolbar { flex: 0 0 auto; }
.sign-editor-surface > .section--fill { flex: 1 1 auto; min-height: 0; }
.sign-editor-surface .sign-section-head { flex: 0 0 auto; }
.sign-editor-surface .sign-section-footer { flex: 0 0 auto; }
/* 三段的滚动体：基础设置 / 执行设置是 .fill-body，抽奖段是 .sign-campaign-list */
.sign-editor-surface .sign-basic-content,
.sign-editor-surface .sign-execution-content,
.sign-editor-surface > .section--fill > .sign-campaign-list {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

@media (max-width: 900px) {
  .sign-editor-surface { overflow: visible; }
  .sign-editor-surface > .section--fill { flex: 0 0 auto; }
  .sign-editor-surface .sign-basic-content,
  .sign-editor-surface .sign-execution-content,
  .sign-editor-surface > .section--fill > .sign-campaign-list { overflow: visible; }
}
