/* r4（2026-10-15）超管 UI：问题 1 对象选择、问题 2 菜单排序、问题 3 / 4 页面管理。
   只加新的类名（obj- / ms- / pm- / ucp- / pnav-new / nav-new），不改 V9 已有选择器的规则，避免影响其他页面。 */

/* ---------- 新增标记 ---------- */
.pnav-new { font-style: normal; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 4px; background: #ffd27a; color: #4b3a12; font-weight: 700; margin-left: 2px; flex: none; }
.side-title .pnav-new { margin-left: 6px; }
.nav-new { margin-left: auto; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 4px; background: #fff1cc; color: #8a5a00; border: 1px solid #f0d9a2; white-space: nowrap; flex: none; }
.nav-item .nav-new + .nav-count { margin-left: 6px; }
.topnav .top-tools .ms-open { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ffffff2b; border-radius: 8px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.topnav .top-tools .ms-open:hover { background: #ffffff14; }
.topnav .top-tools .ms-open svg { width: 15px; height: 15px; }

/* ---------- 问题 1：对象选择 ---------- */
.obj-layout { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.obj-layout button { padding: 7px 12px; font-size: 12px; color: #4d5d73; background: #fff; border: 0; white-space: nowrap; }
.obj-layout button.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.obj-split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.obj-detail { min-width: 0; }
.obj-detail > .stats, .obj-detail > .grid-two, .obj-detail > .grid-even { margin-top: 0; }
.obj-picker { position: sticky; top: 0; margin-bottom: 20px; }
.obj-picker .panel-head h2 { font-size: 15px; }
.obj-total { font-size: 12px; color: var(--muted); white-space: nowrap; }
.obj-picker .panel-toolbar, .obj-drop .panel-toolbar { padding: 12px 14px; flex-wrap: wrap; }
.obj-picker .panel-toolbar .search, .obj-drop .panel-toolbar .search { flex: 1 1 100%; min-width: 0; }
.obj-picker .panel-toolbar .filters, .obj-drop .panel-toolbar .filters { flex-wrap: wrap; gap: 6px; }
.obj-recent { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); padding: 8px 14px 0; }
.obj-recent button { font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: #f7f9fc; color: #33445c; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-list { max-height: min(520px, calc(100vh - 380px)); min-height: 120px; overflow: auto; padding: 6px; }
.obj-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 9px; padding: 8px 10px; background: transparent; cursor: pointer; }
.obj-item:hover { background: #f5f8fc; }
.obj-item.on { background: var(--blue-soft); border-color: #c9d8fb; }
.obj-item strong { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.obj-item .mono { font-size: 12px; color: #4d5d73; }
.obj-item small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-item.obj-new { border-style: dashed; border-color: #c9d8fb; margin-bottom: 4px; }
.obj-none { padding: 24px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.obj-foot { padding: 8px 14px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.6; }
.obj-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; position: relative; }
.obj-bar .obj-recent { padding: 0; }
.obj-combo { display: inline-flex; align-items: center; gap: 10px; min-width: min(380px, 100%); max-width: 100%; border: 1px solid #d5deea; background: #fff; border-radius: 10px; padding: 8px 12px; text-align: left; }
.obj-combo > span { min-width: 0; overflow: hidden; }
.obj-combo-label { font-size: 11px; color: var(--muted); display: block; }
.obj-combo strong { font-size: 14px; color: var(--ink); }
.obj-combo .mono { font-size: 12px; color: #4d5d73; margin-left: 6px; }
.obj-combo svg { width: 16px; height: 16px; margin-left: auto; color: var(--muted); flex: none; }
.obj-drop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(440px, calc(100vw - 48px)); background: #fff; border: 1px solid #d5deea; border-radius: 12px; box-shadow: 0 18px 50px #15253b26; }
.obj-drop .obj-list { max-height: min(360px, calc(100vh - 360px)); }
.obj-current { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #c9d8fb; background: var(--blue-soft); color: #23427f; border-radius: 9px; padding: 4px 6px 4px 10px; font-size: 12px; white-space: nowrap; min-width: 0; max-width: 46%; overflow: hidden; flex: 0 1 auto; }
.obj-current b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.obj-current button { border: 0; background: #fff; color: var(--blue); border-radius: 6px; padding: 3px 8px; font-size: 12px; flex: none; }
.obj-current .obj-x { color: #78869a; background: transparent; padding: 3px 5px; }
.obj-who-panel { margin-bottom: 20px; }
.obj-who { display: flex; gap: 14px; align-items: center; padding: 16px 18px; flex-wrap: wrap; }
.obj-avatar { width: 44px; height: 44px; border-radius: 12px; background: #e8efff; color: #2c5fd4; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.obj-avatar.agent { background: #e9f7f1; color: #1d7f66; }
.obj-who-main { flex: 1; min-width: 200px; }
.obj-who-main h2 { margin: 0; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.obj-who-main h2 .mono { font-size: 13px; color: #4d5d73; font-weight: 500; }
.obj-who-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.obj-who-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.obj-scope { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4d5d73; background: #f5f8fc; border-top: 1px solid var(--line); padding: 8px 18px; }
.obj-scope svg { width: 14px; height: 14px; flex: none; }
.obj-scope.legacy { background: #fff7e7; color: #8a5a00; }
.obj-empty { text-align: center; padding: 48px 24px; }
.obj-empty-icon { width: 56px; height: 56px; border-radius: 16px; background: #eef4ff; color: var(--blue); display: inline-grid; place-items: center; margin-bottom: 12px; }
.obj-empty-icon svg { width: 26px; height: 26px; }
.obj-empty h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.obj-empty p { margin: 0 auto; max-width: 520px; color: var(--muted); line-height: 1.7; font-size: 13px; }

/* ---------- 问题 2：菜单排序 ---------- */
.modal.ms-modal { width: min(1000px, calc(100vw - 48px)); }
.ms-section { margin: 16px 0; }
.ms-section h3 { font-size: 14px; margin: 0 0 4px; color: var(--ink); }
.ms-section p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.ms-tops { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: var(--nav); border-radius: 10px; }
.ms-chip { display: inline-flex; align-items: center; gap: 4px; background: #24395a; color: #dbe5f3; border-radius: 8px; padding: 4px 4px 4px 8px; font-size: 13px; cursor: grab; user-select: none; border: 1px solid transparent; white-space: nowrap; }
.ms-chip.cur { background: #2c5fd4; color: #fff; }
.ms-chip.moved { border-color: #ffd27a; }
.ms-chip.ms-over { outline: 2px dashed #ffd27a; }
.ms-chip i { font-style: normal; font-size: 10px; color: #8fa3bf; margin-right: 2px; }
.ms-chip.cur i { color: #cfe0ff; }
.ms-chip button { border: 0; background: #ffffff1a; color: inherit; width: 22px; height: 22px; border-radius: 6px; font-size: 13px; line-height: 1; padding: 0; }
.ms-chip button:disabled { opacity: .3; }
.ms-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ms-groups button { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid #d5deea; background: #fff; color: #4d5d73; white-space: nowrap; }
.ms-groups button.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.ms-groups button.moved::after { content: ' •'; color: #c27c00; }
.ms-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 480px; }
.ms-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #fff; cursor: grab; }
.ms-list li:last-child { border-bottom: 0; }
.ms-list li.moved { background: #fffaf0; }
.ms-list li.ms-over { outline: 2px dashed #e2b75a; outline-offset: -2px; }
.ms-grip { color: #a7b3c4; font-size: 14px; letter-spacing: -2px; }
.ms-idx { width: 22px; color: var(--muted); font-size: 12px; text-align: right; }
.ms-name { flex: 1; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 6px; min-width: 0; }
.ms-name .nav-new { margin-left: 0; }
.ms-list button { border: 1px solid #d5deea; background: #fff; border-radius: 6px; width: 28px; height: 26px; padding: 0; color: #4d5d73; }
.ms-list button:disabled { opacity: .35; }
.ms-dirty { display: flex; align-items: center; gap: 8px; background: #fff7e7; color: #8a5a00; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.ms-dirty svg { width: 16px; height: 16px; flex: none; }
.ms-clean { color: var(--muted); font-size: 13px; padding: 8px 0; }
.ms-confirm { border: 1px solid #f0d9a2; background: #fffaf0; border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-size: 13px; color: #4b3a12; }
.ms-confirm .form-actions { margin-top: 10px; }
.ms-foot { position: sticky; bottom: -1px; z-index: 2; background: #fff; margin-top: 16px; padding-top: 10px; box-shadow: 0 -10px 12px -12px rgba(15, 23, 42, .25); }
.ms-foot .ms-confirm { margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.ms-foot .ms-confirm .form-actions { margin: 0; padding: 0; border: 0; }
.ms-actions { justify-content: space-between; margin-top: 0; }
.ms-actions > span { display: flex; gap: 10px; }

/* ---------- 问题 3 / 4：页面管理 ---------- */
.pm-draft { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed #e2b75a; background: #fffaf0; color: #6f4b00; border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; font-size: 13px; line-height: 1.6; }
.pm-draft svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.pm-draft b { white-space: nowrap; }
/* r5：联网模式的说明条（数据来自服务器、保存规则、用户端刷新时机） */
.pm-net { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfe6dc; background: #f3fbf7; color: #24563f; border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; font-size: 13px; line-height: 1.6; }
.pm-net svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: #2f8a5f; }
.pm-small { font-size: 12px; line-height: 1.6; }
.pm-under { margin: 10px 2px 0; }
.pm-links { margin: 4px 0 16px; }
.pm-ask { border-left: 3px solid #e2b75a; background: #fffcf4; padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; color: #4b3a12; margin: 0 0 18px; }
.pm-ask summary { cursor: pointer; font-weight: 600; }
.pm-ask ol { margin: 6px 0 0 18px; padding: 0; }
.pm-grid { align-items: start; }
.ucp { border: 1px solid #d6dfea; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #f4f7fb, #eef2f7); }
.ucp-head { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: #f7f9fc; border-bottom: 1px solid #dfe6ef; flex-wrap: wrap; }
.ucp-wordmark { font-size: 21px; font-weight: 600; color: #1d2b3f; letter-spacing: .2px; flex: none; }
.ucp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid #e3e9f1; }
.ucp-row:last-child { border-bottom: 0; }
.ucp-row-top { border: 0; padding: 0; flex: 1; min-width: 0; }
.ucp-row-label { font-size: 11px; color: #8a97a8; width: 34px; flex: none; }
.ucp-pill { display: inline-flex; align-items: center; gap: 3px; border-radius: 9px; padding: 2px 5px 2px 2px; border: 1px solid transparent; }
.ucp-pill > .ucp-name { border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: #33445c; position: relative; cursor: pointer; white-space: nowrap; }
.ucp-pill > .ucp-name:hover { background: #ffffffb3; }
.ucp-pill.cur { background: #fff; border-color: #dbe3ee; box-shadow: 0 1px 4px #15253b14; }
.ucp-pill.cur > .ucp-name { color: #0f1d30; font-weight: 600; }
.ucp-pill.cur > .ucp-name::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 1px; height: 2px; border-radius: 2px; background: #0065b3; }
.ucp-pill.off > .ucp-name { color: #9aa6b5; text-decoration: line-through; text-decoration-color: #c0c9d4; }
.ucp-pill.inherit > .ucp-name { color: #9aa6b5; }
.ucp-pill.diff { border-color: #e2b75a; border-style: dashed; }
.ucp-state { font-size: 10px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.ucp-state.off { background: #fdecec; color: #b5474b; }
.ucp-state.inherit { background: #f1f4f8; color: #8a97a8; }
.ucp-state.fixed { background: #e9f7f1; color: #1d7f66; }
.ucp-state.maint { background: #f1f4f8; color: #8a97a8; }
.ucp-state.diff { background: #fff1cc; color: #8a5a00; }
.ucp-crumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 16px; font-size: 12px; color: #5d6c80; background: #fbfcfe; border-top: 1px solid #e3e9f1; }
.ucp-crumb svg { width: 14px; height: 14px; }
.ucp-hint { margin-left: auto; }
.pm-switch { position: relative; width: 30px; height: 17px; border-radius: 999px; border: 0; padding: 0; background: #c3ccd8; flex: none; cursor: pointer; transition: background .15s; }
.pm-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: left .15s; }
.pm-switch[aria-checked="true"] { background: #1d9a7b; }
.pm-switch[aria-checked="true"]::after { left: 15px; }
.pm-switch:disabled { opacity: .5; filter: grayscale(1); cursor: not-allowed; }
.pm-switch.changed { box-shadow: 0 0 0 2px #e2b75a; }
.pm-tree-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.pm-tree { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; }
.pm-tree ul { list-style: none; margin: 0 0 0 9px; padding: 0 0 0 20px; border-left: 1px dashed #dbe3ee; }
.pm-node { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; font-size: 13px; }
.pm-node:hover { background: #f7f9fc; }
.pm-tw { width: 18px; height: 18px; border: 0; background: transparent; color: #78869a; padding: 0; font-size: 11px; flex: none; }
.pm-tw:disabled { visibility: hidden; }
.pm-label { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-label.off { color: #9aa6b5; text-decoration: line-through; text-decoration-color: #c0c9d4; }
.pm-label.inherit { color: #9aa6b5; }
.pm-sum { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pm-actionbar { z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: #ffffffeb; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 4px; }
.pm-actionbar.sticky { position: sticky; bottom: 0; border-color: #e2b75a; box-shadow: 0 -6px 24px #15253b0d; }
.pm-actionbar-text { margin-right: auto; font-size: 13px; color: #4d5d73; min-width: 0; }
.pm-gcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; padding: 16px 18px; align-items: start; }
.pm-mock { border: 1px solid #d6dfea; border-radius: 12px; overflow: hidden; background: #0f1d2c; color: #cfe3f1; font-size: 12px; }
.pm-mock-top { display: flex; gap: 12px; align-items: center; background: #f4f7fb; color: #33445c; padding: 8px 12px; border-bottom: 1px solid #dfe6ef; flex-wrap: wrap; }
.pm-mock-top b { font-size: 15px; color: #1d2b3f; }
.pm-mock-top span.on { background: #fff; border-radius: 6px; padding: 3px 8px; box-shadow: 0 1px 3px #15253b14; font-weight: 600; }
.pm-mock-notice { margin: 12px; background: #fff7e7; color: #6f4b00; border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; display: flex; gap: 6px; }
.pm-mock-notice svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.pm-mock-body { padding: 16px 12px 20px; text-align: center; color: #9fc4dc; }
.pm-mock-body span { color: #7fa6bf; font-size: 11px; }
.pm-sim { margin-top: 12px; }
.pm-sim select { max-width: 100%; }
.pm-steps { margin: 0; padding: 0 0 0 18px; font-size: 13px; line-height: 1.8; color: #33445c; }
.pm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pm-mode { text-align: left; border: 1.5px solid #d5deea; background: #fff; border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.pm-mode:hover { border-color: #9db6ee; }
.pm-mode.on { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px #3269e814; }
.pm-mode-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 14px; }
.pm-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b5c2d3; flex: none; }
.pm-mode.on .pm-radio { border-color: var(--blue); box-shadow: inset 0 0 0 3px #fff; background: var(--blue); }
.pm-mode p { margin: 6px 0 0 24px; font-size: 12px; color: #5d6c80; line-height: 1.6; }
.pm-userbadge { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 5px; background: #f1f4f8; color: #5d6c80; white-space: nowrap; }
.pm-userbadge.own { background: #fff1cc; color: #8a5a00; }
.pm-back { justify-content: flex-start; margin-top: 12px; align-items: center; }
.pm-ro-table tr.pm-lv1 td { font-weight: 600; background: #f7f9fc; }
.pm-ro-table tr.pm-lv3 td { color: #4d5d73; font-size: 12px; }
.pm-modal-table { max-height: 260px; overflow: auto; }

/* ---------- 顶部导航：r4 多了一级分类“页面管理”和“菜单排序”入口，1920 宽时仍要一排放下 ----------
   只在 1800–2100 宽时生效：顶部间距收紧几像素（“菜单排序”文字照常显示）；
   1800 以下沿用 V9 原来的横向滚动和左右箭头。 */
@media (min-width: 1800px) and (max-width: 2100px) {
  .desktop.v3 .topnav { gap: 14px; }
  .topnav .top-tools { gap: 8px; }
  .desktop.v3 .pnav-row { gap: 1px; }
}

/* 1800 宽以上仍放不下时（例如分类上有很多数字提醒），admin-pages.js 逐级加 fit-1 / fit-2 / fit-3 */
.topnav.fit-1 .owner-label span { display: none; }
.topnav.fit-2 .top-tools .ms-open { padding: 6px 8px; }
.topnav.fit-2 .top-tools .ms-open span { display: none; }
.topnav.fit-3 .pnav { padding-left: 5px; padding-right: 5px; }
/* 一排放不下、横向滚动时（admin-pages.js 加 nav-over / at-start / at-end）：两头 14px 渐隐，被切掉的半个字不再像乱码；滚到头的那一侧箭头调淡 */
.topnav.nav-over .pnav-row { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.topnav.nav-over.at-start .pnav-row { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%); }
.topnav.nav-over.at-end .pnav-row { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 100%); }
.topnav.nav-over.at-start .pnav-arrow[data-dir="-1"], .topnav.nav-over.at-end .pnav-arrow[data-dir="1"] { opacity: .35; }

/* ---------- 窗口较窄时 ---------- */
@media (max-width: 1500px) { .obj-split { grid-template-columns: 290px minmax(0, 1fr); gap: 16px; } .pm-gcard { grid-template-columns: 1fr; } }
@media (max-width: 1200px) { .obj-split { grid-template-columns: 1fr; } .obj-picker { position: static; } .obj-list { max-height: 300px; } .pm-modes { grid-template-columns: 1fr; } .obj-current { max-width: 60%; } }
/* r4：时间和日期在“资料”两列里分开显示（when() 输出 时间<small>日期</small>） */
.summary-row strong small { margin-left: 6px; font-weight: 400; font-size: 11px; color: #98a3b2; }
