:root {
  --navy: #123a5e;
  --navy-dark: #0d2b46;
  --accent: #d98324;
  --text: #1c2733;
  --muted: #6b7f94;
  --line: #e3e8ee;
  --bg: #f4f6f9;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  /* 手机端任何元素横向溢出都会让浏览器整体缩放（页面缩成半屏、右侧留白），
     这里把横向溢出直接裁掉；用 clip 而不是 hidden，避免破坏顶栏的 sticky */
  overflow-x: clip;
  max-width: 100%;
}

.hidden { display: none !important; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 58, 94, 0.08);
}

/* 复选框 / 单选框恢复原生尺寸，避免被上面的 width:100% 拉成超宽元素 */
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: none;
  vertical-align: middle;
  accent-color: #123a5e;
}

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 10%, #1b4a75 0%, #0d2b46 45%, #081c2e 100%);
  padding: 40px 20px;
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(4, 16, 28, 0.4);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.brand-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.login-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 16px; }

.login-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 10px;
}

.login-tab {
  flex: 1;
  border: none;
  background: none;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: .15s;
}

.login-tab.is-active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15, 40, 66, .12); }

.login-pane { display: flex; flex-direction: column; gap: 16px; }

.login-links { display: flex; justify-content: center; margin-top: -4px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: var(--muted); letter-spacing: .3px; }

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  background: #fff;
  color: var(--navy);
  transition: .15s;
  white-space: nowrap;
}

.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); }
.btn.ghost { border-color: #cfd9e3; color: var(--navy); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.danger { border-color: #f0c9c9; color: #b4232a; }
.btn.danger:hover { background: #fdf0f0; }
.btn.link { background: none; border: none; color: var(--muted); padding: 4px; font-size: 13px; text-decoration: underline; }
.btn.link.light { color: rgba(255, 255, 255, .6); }
.btn.block { width: 100%; padding: 12px; font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.login-error { color: #b4232a; font-size: 13px; min-height: 18px; }
.login-hint { color: #0e5a8a; font-size: 13px; min-height: 18px; }
.login-tip { font-size: 12px; color: #93a3b3; text-align: center; }
.claim-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.claim-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ---------- 主界面 ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 100%; }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; }

.side-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}

.side-mark img {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.side-title { font-size: 15px; font-weight: 700; }
.side-sub { font-size: 11px; color: rgba(255, 255, 255, .5); letter-spacing: 2px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  transition: .15s;
}

.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }

.side-foot { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; }
.side-user { font-size: 12px; color: rgba(255, 255, 255, .66); margin-bottom: 6px; word-break: break-all; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 30px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar h1 { font-size: 20px; margin: 0; color: var(--navy); }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.topbar-title { flex: none; min-width: 0; }
.topbar-actions { display: flex; gap: 10px; flex-shrink: 0; min-width: 0; }

.content { padding: 24px 30px 48px; min-width: 0; }

/* ---------- 卡片 / 统计 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 16px; margin-bottom: 22px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}

.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; color: var(--navy); margin-top: 6px; }
.stat-note { font-size: 12px; color: #a8b5c2; margin-top: 4px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title { font-size: 15px; font-weight: 600; color: var(--navy); }
.panel-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-tools select, .panel-tools input { width: auto; min-width: 140px; padding: 8px 10px; font-size: 13px; }

/* 手机端筛选折叠（桌面端：下拉直接平铺，按钮隐藏） */
.m-filters { display: contents; }
#m-filter-toggle { display: none; }

/* ---------- 手机端文件卡片（≤768px 时由 app.js 渲染） ---------- */
.m-files { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.m-file {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.m-file-top { display: flex; align-items: flex-start; gap: 8px; }
.m-file-name { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); word-break: break-word; }
.m-pick { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #123a5e; flex: none; }
.m-file-meta { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; word-break: break-word; }
.m-file-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.m-file-tags .badge { font-size: 11px; padding: 2px 8px; }
.m-file-foot { font-size: 12px; color: #93a3b3; margin-top: 6px; }
.m-file-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eef2f6; }
.m-file-ops .btn { padding: 7px 12px; font-size: 13px; }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 12px 20px;
  font-size: 13px;
  border-bottom: 1px solid #f2f5f8;
  vertical-align: middle;
}

th { background: #f8fafc; color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
tbody tr:hover { background: #fafcfe; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { padding: 5px 10px; font-size: 12px; margin-left: 6px; }
td.actions select { width: 104px; flex: none; min-width: 0; padding: 5px 8px; font-size: 12px; margin-left: 6px; vertical-align: middle; }
th.pick-cell, td.pick-cell { width: 40px; padding: 12px 0 12px 16px; text-align: left; }
th.pick-cell input, td.pick-cell input { width: 15px; height: 15px; cursor: pointer; accent-color: #123a5e; }

.file-title { font-weight: 600; color: var(--text); }
.file-code { font-size: 12px; color: var(--muted); margin-top: 3px; }

.member-no { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }

/* 成员头像 */
.member-cell { display: flex; align-items: center; gap: 8px; }
.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef2f7;
}
.member-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #7b8ea3;
  border: 1px solid #e2e9f0;
}
.member-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: #a6b4c2; font-size: 12px; }

/* 说明列：点击单元格就地编辑 */
.note-cell { min-width: 140px; }
.note-value {
  display: inline-block;
  min-width: 72px;
  padding: 3px 6px;
  border-radius: 6px;
  border-bottom: 1px dashed #c7d3e0;
  cursor: text;
  color: #34495e;
  line-height: 1.5;
  word-break: break-word;
}
.note-value:hover { background: #eef4fa; border-bottom-color: var(--navy); }
.note-value.is-empty { color: #a6b4c2; }
.note-input {
  width: 100%;
  min-width: 140px;
  padding: 5px 8px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  font: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 58, 94, .12);
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eef3f8;
  color: #40607d;
  white-space: nowrap;
}

.badge.warn { background: #fdf1e3; color: #b26818; }
.badge.ok { background: #e9f5ec; color: #2c7a41; }
.badge.muted { background: #f2f5f8; color: #93a3b3; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: #93a3b3;
  font-size: 13px;
}

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 40, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 50;
}

.modal {
  width: 640px;
  max-width: 100%;
  max-height: 88vh;
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px rgba(4, 16, 28, .35);
}

.modal.narrow { width: 500px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 { font-size: 16px; margin: 0; color: var(--navy); }

.modal-close {
  border: none; background: none; font-size: 22px; color: #b7c4d1; line-height: 1;
}

.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }

.hint { font-size: 12px; color: #93a3b3; margin-top: 6px; line-height: 1.5; }

.dropzone {
  border: 1px dashed #c8d5e2;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #fafcfe;
  cursor: pointer;
}

.dropzone strong { color: var(--navy); }
.dropzone input { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(15, 35, 55, .94);
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 90;
  max-width: 70vw;
  text-align: center;
}

/* 汉堡按钮与抽屉遮罩的基础样式（放在媒体查询之前，窄屏规则才能覆盖它） */
#mobile-nav-btn {
  display: none;
  border: none;
  background: none;
  padding: 6px 8px;
  margin-left: -6px;
  flex-shrink: 0;
  border-radius: 8px;
}
#sidebar-backdrop { display: none; }

/* ---------- ≤900px：侧栏统一改成抽屉 ----------
   以前这里把侧栏改成「静态置顶 + 导航横排」，结果是：
   ① 导航项被挤成竖排文字；② 输入框一聚焦（键盘弹出、视口变矮）就会命中横屏规则，
   菜单栏突然跳到页面顶部。现在任何窄屏都只保留抽屉一种形态。 */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  #mobile-nav-btn { display: block; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 84vw;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    box-shadow: 8px 0 30px rgba(6, 24, 44, .25);
  }
  .sidebar.open { transform: none; visibility: visible; }
  #sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(9, 24, 40, .45);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.sidebar-open #sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .side-nav { flex-direction: column; overflow-y: auto; overflow-x: hidden; }
  .nav-item { padding: 13px 14px; font-size: 15px; }
  .side-foot { padding-bottom: 10px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  /* 顶栏标题与动作按钮分两行：按钮再多也不会把标题挤成竖排、把页面撑宽 */
  .topbar { flex-wrap: wrap; align-items: center; gap: 8px; }
  .topbar-title { flex: 0 1 auto; min-width: 0; }
  .topbar-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    flex-shrink: 1;
    gap: 6px;
  }
  .topbar-actions .btn { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- 手机浏览器自适应（≤768px：全屏弹窗 + 触控优化） ---------- */
#mobile-nav-btn:active { background: #eef3f9; }
#mobile-nav-btn i {
  display: block;
  width: 20px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  position: relative;
}
#mobile-nav-btn i::before, #mobile-nav-btn i::after {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
#mobile-nav-btn i::before { top: -6px; }
#mobile-nav-btn i::after { top: 6px; }

@media (max-width: 768px) {
  body { -webkit-text-size-adjust: 100%; }

  /* 顶栏：汉堡按钮 + 吸顶，标题一行、动作按钮换行铺满 */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  #mobile-nav-btn { display: block; }
  .topbar h1 { font-size: 17px; white-space: nowrap; }
  .page-sub { display: none; }
  .topbar-title { flex: 0 1 auto; }

  /* 侧栏抽屉已在 ≤900px 统一处理，这里只留内容区适配 */
  .app { flex-direction: column; }

  /* 内容区 */
  .content { padding: 12px 10px 40px; }
  th, td { padding: 10px 12px; }
  td.actions .btn { padding: 7px 12px; font-size: 13px; margin-left: 6px; }
  td.actions select { padding: 7px 8px; font-size: 13px; }
  .panel { border-radius: 12px; margin-bottom: 14px; }
  .panel-head { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .panel-tools { width: 100%; gap: 8px; }
  .panel-tools .m-search { flex: 1 1 auto; min-width: 0 !important; }
  #m-filter-toggle { display: inline-flex; align-items: center; padding: 8px 12px; font-size: 13px; flex: none; }
  .m-filters { display: none; flex: 1 1 100%; grid-template-columns: 1fr 1fr; gap: 8px; }
  .m-filters.open { display: grid; }
  .m-filters select { width: 100%; min-width: 0 !important; }
  /* 动作按钮：整行铺开、允许换行，一屏内全部可见（不再横向溢出把页面撑宽） */
  .topbar-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
  }
  .topbar-actions .btn { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  /* 统计卡压缩成三列小卡，首屏给列表留更多空间 */
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 10px 12px; border-radius: 10px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 18px; margin-top: 2px; }
  .stat-note { display: none; }

  /* 弹窗全屏化 */
  .modal-mask { padding: 0; align-items: stretch; }
  .modal, .modal.narrow, .modal.wide {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal-body { flex: 1; padding: 16px 14px; }
  .modal-head { padding: 14px 16px; }
  .modal-foot { padding: 12px 14px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; min-width: 96px; }

  /* 表单 */
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .batch-defaults { grid-template-columns: 1fr 1fr; }
  .batch-drop { padding: 18px 12px; }
  .batch-name { max-width: 150px; }
  .batch-table-wrap { max-height: 50vh; }

  /* 登录页 */
  .login-wrap { padding: 18px 12px; align-items: flex-start; padding-top: 8vh; }
  .login-body { padding: 18px 16px 22px; }
  .brand { padding: 20px 16px; }
  .login-tip { padding: 0 8px; }

  /* 触控：按钮、输入、下拉加大热区 */
  .btn { padding: 10px 14px; }
  .btn.block { padding: 13px; }
  .tab { padding: 8px 14px; }
  .dist-tab, .dist-perm { padding: 8px 14px; }
  .dist-ops .btn, .ch-ops .btn { padding: 8px 12px; }

  /* 杂项 */
  .dg-box { padding: 20px 16px 18px; max-height: 100vh; }
  #desk-badge { display: none; }
  .toast { max-width: 88vw; bottom: calc(24px + env(safe-area-inset-bottom)); }
  .plm-run-row input { width: 100%; }
  .plm-token-row { flex-wrap: wrap; }
  .plm-token-row input { min-width: 0; }
}

/* 横屏矮屏（手机横着用）只压缩间距，不再把侧栏改成静态置顶。
   旧规则在「键盘弹起、视口变矮」时也会命中，导致一输入菜单栏就跳到页面上方。 */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .topbar { padding: 6px 12px; }
  .content { padding-top: 6px; }
  .sidebar { width: 76vw; max-width: 360px; }
}

/* ---------- 标签切换 ---------- */
.tabs { display: inline-flex; background: #eef2f7; border-radius: 9px; padding: 4px; gap: 4px; }
.tab {
  border: 0; background: transparent; color: #5a6b7d; font-size: 13px; font-weight: 500;
  padding: 7px 20px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.tab.active { background: #fff; color: #1d2b3a; box-shadow: 0 1px 3px rgba(23,43,66,.12); }
.tab:hover { color: #1d2b3a; }

/* ---------- 上传弹窗：自动识别 ---------- */
.recog {
  border: 1px solid #dbe6f4;
  margin-top: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #f2f7fd 100%);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 4px;
}

.recog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recog-title {
  font-size: 13px;
  font-weight: 600;
  color: #1b4f8f;
  letter-spacing: .3px;
}

.recog-title::before {
  content: "✦";
  margin-right: 5px;
  color: #2f7fe0;
}

.recog-status {
  font-size: 12px;
  color: #6b7c8f;
  flex: 1;
  min-width: 200px;
}

.recog-status.busy { color: #b7791f; }
.recog-status.ok { color: #1a7f4b; }
.recog-status.fail { color: #c0392b; }

.recog-again {
  font-size: 12px;
  padding: 4px 12px;
}

.recog-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }

.recog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #e6eef8;
  border-radius: 7px;
}

.recog-row.miss { background: #fffdf6; border-color: #f2e6c9; }

.recog-key { color: #6b7c8f; width: 64px; flex: none; }
.recog-value { color: #1d2b3a; font-weight: 500; flex: 1; word-break: break-all; }
.recog-row.miss .recog-value { color: #b08a3e; font-weight: 400; }

.recog-src {
  font-size: 11px;
  color: #2f7fe0;
  background: #eaf3ff;
  border-radius: 5px;
  padding: 2px 7px;
  flex: none;
}

.recog-take {
  border: 1px solid #c5dbf7;
  background: #fff;
  color: #1f66d2;
  font-size: 11.5px;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  flex: none;
  font-family: inherit;
}

.recog-take:hover { background: #eaf3ff; }

.recog-hint { font-size: 12px; color: #7e8d9d; padding: 2px 2px 0; }
.recog-warn { font-size: 11.5px; color: #b7791f; margin-top: 4px; line-height: 1.6; }

.field { position: relative; }

.field > span.field-badge {
  display: none;
  font-size: 11px;
  color: #1a7f4b;
  background: #e8f7ee;
  border: 1px solid #c6ebd5;
  border-radius: 5px;
  padding: 1px 7px;
  margin-top: 0;
  align-self: flex-start;
  letter-spacing: 0;
}

.field > span.field-badge.show { display: inline-block; }

input.auto-filled,
select.auto-filled {
  border-color: #b7e2c8 !important;
  background: #f6fdf9 !important;
  box-shadow: inset 0 0 0 1px rgba(26, 127, 75, .06);
}

/* ---------- 批量导入 ---------- */
.modal.wide { width: 1080px; }

.batch-drop {
  border: 1px dashed #c8d5e2;
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.batch-drop:hover,
.batch-drop.dragging { border-color: #1f66d2; background: #f2f7ff; }
.batch-drop-title { font-size: 14px; font-weight: 600; color: var(--navy); }
.batch-drop-sub { font-size: 12px; color: #93a3b3; margin-top: 6px; line-height: 1.6; }

.batch-defaults {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.batch-defaults .field span { font-size: 12px; }
.batch-defaults .field input,
.batch-defaults .field select { font-size: 12px; }

.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}

.batch-table-wrap {
  max-height: 42vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.batch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.batch-table th {
  position: sticky;
  top: 0;
  background: #f6f9fc;
  z-index: 1;
  padding: 9px 10px;
  text-align: left;
  font-size: 12px;
  color: #7c8b9c;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.batch-table td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.batch-table tr:last-child td { border-bottom: none; }
.batch-name {
  font-size: 12px;
  color: #3c4a59;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-size { font-size: 11px; color: #a6b4c2; margin-top: 2px; }
.batch-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
}
.batch-input:focus { outline: none; border-color: #7aa7e6; }
.batch-input.auto-filled { background: #f2f8ff; border-color: #cfe2fb; color: #1f4f86; }
.batch-status {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: #f1f4f8;
  color: #7c8b9c;
}
.batch-status.busy { background: #eef4ff; color: #1f66d2; }
.batch-status.ready { background: #eaf7ef; color: #1c7a45; }
.batch-status.ok { background: #e8f6ee; color: #1c7a45; }
.batch-status.warn { background: #fff4e5; color: #b26818; }
.batch-status.fail { background: #fdeaea; color: #b4232a; }
.batch-foot { align-items: center; }
.batch-progress { margin-right: auto; font-size: 12px; color: #6b7f94; }
.batch-input:disabled { background: #f7f9fb; color: #9aa9b8; border-color: #edf1f6; cursor: not-allowed; }
.batch-table tr.is-done td { background: #fbfdfc; }

/* ---------- 管理员角色 ---------- */
.nav-item.hidden { display: none; }

.side-name { font-size: 13px; font-weight: 600; color: #fff; }
.side-pos { font-size: 11px; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.role-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #e3edf8;
}
.role-badge.super { background: #f4c445; color: #3d2c00; font-weight: 600; }

.role-tip {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 9px;
  background: #f2f7ff;
  border: 1px solid #dbe8fa;
  color: #33587f;
  font-size: 12px;
  line-height: 1.8;
}
.role-tip b { color: #1f4f86; }

.badge.role-super { background: #fdf3d8; color: #8a6100; font-weight: 600; }

/* 成员多班组查看权限 */
.scope-cell { display: flex; flex-wrap: wrap; gap: 5px; }
.scope-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d9e6f5;
  color: #2b5b8c;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}
.scope-tag.scope-all { background: #fdf3d8; border-color: #f2e0ae; color: #8a6100; font-weight: 600; }

.team-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  font-size: 13px;
  color: #45607a;
}
.team-pick-actions { display: flex; gap: 14px; }
.team-pick-actions a { color: #2b6cb0; font-size: 12px; text-decoration: none; }
.team-pick-actions a:hover { text-decoration: underline; }

.team-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2eaf3;
  border-radius: 10px;
  background: #f9fbfd;
  max-height: 190px;
  overflow: auto;
}
.team-pick-list.muted-list { opacity: .55; }
.team-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe6f2;
  background: #fff;
  font-size: 13px;
  color: #2f4a63;
  cursor: pointer;
  user-select: none;
}
.team-pick input { accent-color: #123a5e; }
.team-pick:has(input:checked) { border-color: #123a5e; background: #eef4fb; color: #123a5e; font-weight: 600; }

/* 管理员权限分配 */
.perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  color: #55697d;
}
.perm-group { margin-top: 16px; }
.perm-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #8a9bad;
  margin-bottom: 8px;
}
.perm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  background: #fbfcfe;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.perm-row:hover { border-color: #c9dcef; background: #f5f9fe; }
.perm-row:has(input:checked) { border-color: #123a5e; background: #eef4fb; }
.perm-row input { margin-top: 3px; accent-color: #123a5e; }
.perm-body { display: flex; flex-direction: column; gap: 2px; }
.perm-name { font-size: 14px; font-weight: 600; color: #1e3448; }
.perm-desc { font-size: 12px; color: #7c8fa2; line-height: 1.5; }
.perm-lock {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf7e8;
  border: 1px solid #f0e4c3;
}
.perm-lock-title { font-size: 12px; font-weight: 700; color: #8a6100; margin-bottom: 6px; }
.perm-lock-item { font-size: 12px; color: #8a7040; line-height: 1.8; }
.side-perm { margin-top: 6px; font-size: 12px; color: #8fa3b6; }

/* ---- 成员头像编辑（管理端） ---- */
.member-avatar[data-avatar-member] { cursor: pointer; }
.member-avatar[data-avatar-member]:hover { outline: 2px solid rgba(18, 101, 155, 0.35); outline-offset: 1px; }

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #f7fafc;
  border: 1px solid #e6edf4;
  border-radius: 10px;
}

.avatar-edit-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eef2f7;
  border: 1px solid #e2e9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-edit-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}

.avatar-edit-letter {
  font-size: 24px;
  font-weight: 600;
  color: #7b8ea3;
}

.avatar-edit-side { min-width: 0; flex: 1; }

.avatar-edit-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.avatar-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }

/* 侧栏账号信息（已去掉头像，姓名/职位/角色靠左，退出登录靠右） */
.side-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
  position: relative;
}

.side-user-row .side-user {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.side-user-row .btn.link.light {
  flex-shrink: 0;
  font-size: 12px;
  opacity: .8;
}

.side-user-row .btn.link.light:hover { opacity: 1; }

/* 管理员账号列表头像 */
.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #e2e9f0;
  flex-shrink: 0;
}

.team-group-title {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  padding-left: 10px;
  border-left: 4px solid var(--navy);
}

.team-group-title:first-of-type {
  margin-top: 4px;
}

/* 分类树两级分组下拉 */
.panel-tools select optgroup {
  font-weight: 600;
  color: var(--navy);
}

.panel-tools select optgroup option {
  font-weight: normal;
  color: inherit;
}

/* ---------------- PLM 同步 ---------------- */

.plm-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
  border: 1px solid #e3e8ee;
  background: #fbfcfe;
  color: var(--text);
}
.plm-alert.warn { border-color: #f2ddbd; background: #fdf8f0; color: #8a5a11; }
.plm-alert.danger { border-color: #f3cfcf; background: #fdf3f3; color: #a52a2a; }

.plm-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plm-check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.plm-check input { width: 17px; height: 17px; margin: 0; }
.plm-proj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 18px; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, #fafbfc);
  max-height: 260px; overflow: auto;
}
.plm-proj-grid .plm-check { align-items: flex-start; line-height: 1.5; }
.plm-proj-grid .plm-check input { margin-top: 2px; flex: none; }

.plm-run-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.plm-run-row input { width: 210px; }

.plm-token-row { display: flex; gap: 10px; align-items: center; }
.plm-token-row input { flex: 1; font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 12.5px; letter-spacing: .4px; }

.plm-steps { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.plm-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.75; color: #3d4e60; }
.plm-step b {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: #eef3f9; color: var(--navy); font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.plm-step code, .plm-help code {
  background: #f2f5f8; border: 1px solid #e3e8ee; border-radius: 5px;
  padding: 1px 5px; font-size: 12px; color: #2f4a63;
}

td.plm-msg { color: var(--muted); font-size: 12.5px; max-width: 420px; }

.plm-help h3 { font-size: 14px; color: var(--navy); margin: 18px 0 8px; }
.plm-help h3:first-child { margin-top: 0; }
.plm-help p, .plm-help li { font-size: 13px; line-height: 1.85; color: #3d4e60; margin: 6px 0; }
.plm-help ul { padding-left: 20px; margin: 6px 0; }

.field textarea { resize: vertical; }

/* ---------- 全局加载反馈（顶部进度条 / 按钮加载态 / 运行进度条） ---------- */
#top-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 4000;
  background: linear-gradient(90deg, #2b78e4, #5ab0f5);
  box-shadow: 0 0 8px rgba(43, 120, 228, .5);
  transition: width .25s ease, opacity .35s ease;
  opacity: 0; pointer-events: none;
}
#top-progress.on { opacity: 1; }
#top-progress.indeterminate { width: 45% !important; animation: tp-slide 1.15s ease-in-out infinite; }
@keyframes tp-slide {
  0% { margin-left: -45%; }
  100% { margin-left: 100%; }
}

.btn.loading { pointer-events: none; opacity: .85; }
.btn.loading::before {
  content: ''; display: inline-block; width: 12px; height: 12px;
  margin-right: 6px; vertical-align: -2px;
  border: 2px solid rgba(110, 140, 175, .35); border-top-color: #2b78e4;
  border-radius: 50%; animation: btn-spin .7s linear infinite;
}
.btn.primary.loading::before { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.plm-runbar {
  margin: 14px 0 0; padding: 12px 14px;
  border: 1px solid #d6e5f8; border-radius: 10px; background: #f4f9ff;
}
.plm-runbar .row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 13px; color: #23496f;
}
.plm-runbar .row b { font-weight: 600; }
.plm-runbar .track { margin-top: 9px; height: 6px; background: #e0eaf6; border-radius: 999px; overflow: hidden; }
.plm-runbar .track > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #2b78e4, #57b1f3);
  border-radius: 999px; transition: width .45s ease;
}
.plm-runbar.indeterminate .track > i { width: 35% !important; animation: tp-slide 1.3s ease-in-out infinite; }
.plm-runbar .meta { margin-top: 7px; font-size: 12px; color: #5a7796; }
.plm-runbar.done { border-color: #cfe9da; background: #f3fbf7; }
.plm-runbar.fail { border-color: #f3d2d2; background: #fdf5f5; }
.plm-runbar.done .track > i { background: linear-gradient(90deg, #2e9e63, #5fc48d); }
.plm-runbar.fail .track > i { background: linear-gradient(90deg, #c05353, #e08a8a); }

/* ---------- 文件下发：待办概览 / 上传进度 ---------- */
.dist-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dist-stat {
  flex: 1 1 150px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.dist-stat span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.dist-stat b { display: block; margin-top: 6px; font-size: 22px; color: var(--navy); letter-spacing: .5px; }
.dist-stat.warn b { color: #b26818; }
.dist-stat.ok b { color: #1f8f4d; }

.dist-bar { height: 8px; background: #e8eef5; border-radius: 999px; overflow: hidden; }
.dist-bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #2b78e4, #57b1f3);
  border-radius: 999px; transition: width .4s ease;
}

.nav-badge {
  display: inline-block;
  min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 6px;
  border-radius: 9px;
  background: #d98324; color: #fff;
  font-size: 11px; text-align: center; vertical-align: middle;
}
.nav-badge.hidden { display: none !important; }

/* ---------- 文件下发：分步建单 ---------- */
.dist-step {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #dde7f0;
  font-size: 13px;
  color: #1c2733;
}
.dist-step:first-of-type { border-top: 0; }
.dist-step .hint { font-weight: 400; margin-left: 6px; }

/* ---------- 文件下发：状态筛选页签 / 历史记录 ---------- */
.dist-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.dist-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: #40607d;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.dist-tab:hover { border-color: #b9cfe2; color: var(--navy); }
.dist-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- 文件下发：超管权限下发开关 ---------- */
.dist-perm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: #40607d;
  cursor: pointer;
  user-select: none;
}
.dist-perm input { cursor: pointer; }

/* 桌面版右下角状态角标：版本号 + 资源点占用 + 检查更新（仅 window.MYDESK 存在时注入） */
#desk-badge {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 35, 52, 0.86);
  color: #e8eef5;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(10, 22, 36, 0.28);
  pointer-events: auto;
}
#desk-badge .db-ver { font-weight: 600; letter-spacing: 0.2px; }
#desk-badge .db-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #2e6da4;
  color: #fff;
  cursor: pointer;
}
#desk-badge .db-btn.db-apply { background: #1f8a4c; }
#desk-badge .db-btn:disabled { opacity: 0.6; cursor: default; }
#desk-badge .hidden { display: none; }

/* ---------------- 通道资源（超管）：水位进度条 + 手动切换 ---------------- */
.ch-group + .ch-group { margin-top: 18px; }
.ch-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px dashed #e6eef7; }
.ch-group .ch-row:first-of-type { border-top: none; }
.ch-id {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: #eef4fb; color: var(--navy); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ch-row.is-active .ch-id { background: var(--navy); color: #fff; }
.ch-main { flex: 1; min-width: 0; }
.ch-name { font-size: 13px; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-sub { font-weight: 400; color: #7d8fa3; font-size: 12px; }
.ch-meta { margin-top: 7px; font-size: 12px; color: #5a7796; display: flex; gap: 14px; flex-wrap: wrap; }
.ch-meta .ch-warn { color: #b26818; }
.ch-ops { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 150px; }
.ch-ops .btn { padding: 6px 12px; font-size: 12px; }
.ch-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: #5a7796; margin-top: 10px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------------- 桌面网关强制安装门禁 ---------------- */
#desk-gate {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(12, 28, 48, .58);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dg-box {
  width: 100%; max-width: 620px; background: #fff; border-radius: 16px;
  padding: 30px 34px 24px; box-shadow: 0 24px 70px rgba(6, 24, 44, .38);
  max-height: 92vh; overflow: auto;
}
.dg-icon { font-size: 34px; line-height: 1; }
.dg-box h2 { margin: 12px 0 8px; font-size: 20px; color: var(--navy); }
.dg-lead { margin: 0 0 18px; font-size: 13px; line-height: 1.9; color: #55677d; }
.dg-steps { border: 1px solid #e6eef7; border-radius: 12px; overflow: hidden; }
.dg-step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid #eef3fa; }
.dg-step:first-child { border-top: none; }
.dg-step i {
  width: 24px; height: 24px; border-radius: 50%; background: #eaf1fa; color: var(--navy);
  font-style: normal; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dg-step div { flex: 1; min-width: 0; }
.dg-step b { display: block; font-size: 13px; color: #1f2f42; }
.dg-step span { display: block; font-size: 12px; color: #7d8fa3; margin-top: 3px; line-height: 1.7; }
.dg-unc { margin-top: 12px; font-size: 12px; color: #5a7796; word-break: break-all; }
.dg-unc code { background: #f3f7fc; padding: 3px 6px; border-radius: 4px; }
.dg-status {
  margin-top: 16px; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #2e6da4; background: #f2f8ff; border-radius: 8px; padding: 10px 12px;
}
.dg-status.is-warn { color: #a5641a; background: #fdf6e9; }
.dg-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: dgPulse 1.2s ease-in-out infinite; }
@keyframes dgPulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.dg-ops { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dg-foot { margin-top: 14px; font-size: 12px; color: #93a4b6; line-height: 1.8; }

/* 拖拽排序：行首 ⠿ 手柄 */
.cell-handle { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-handle-main { min-width: 0; }
.drag-handle {
  flex: 0 0 auto;
  width: 22px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #b3c0cd;
  font-size: 15px;
  line-height: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: background .15s, color .15s;
}
.drag-handle:hover { background: #eef3f9; color: #5a6b7d; }
.drag-handle:active { cursor: grabbing; }
tr[data-sort-row][draggable="true"] { cursor: grabbing; }
tr[data-sort-row].dragging { opacity: .4; }
tr[data-sort-row].dragging td { background: #f2f6fc; }
tr[data-sort-row].drop-above td { box-shadow: inset 0 2px 0 0 #2f6fed; }
tr[data-sort-row].drop-below td { box-shadow: inset 0 -2px 0 0 #2f6fed; }

