
/* [hidden] 守卫：作者样式 display 会覆盖 hidden 属性，必须显式兜底 */
[hidden] { display: none !important; }
/* 沐和数据 运营后台 — 浅色高密度管理态（附录 F.2/F.4）
   2026-09-16 重构：紧凑化（行高/间距收紧）+ 补缺失工具类（sm/input/field/empty/skel/pager）
   + 断点扩展（1600/1440/1180/900/768） */
* { box-sizing: border-box; }
body { margin: 0; background: var(--c-canvas); color: var(--c-text-1);
  font: 450 13px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
.num, .ad-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- 布局 ---- */
.ad-side { position: fixed; left: 0; top: 0; bottom: 0; width: 184px; background: var(--c-surface);
  border-right: 1px solid var(--c-border); display: flex; flex-direction: column; z-index: var(--z-sidebar, 100); }
.ad-side__brand { padding: 10px 12px; font-weight: 650; font-size: 13px; letter-spacing: -.01em;
  border-bottom: 1px solid var(--c-border); display: flex; align-items: center; }
.ad-side__brand img { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; margin-right: 7px; flex: none; }
.ad-side__brand em { font-style: normal; font-size: 10px; color: var(--c-text-3); margin-left: 4px; }
.ad-nav { flex: 1; overflow: auto; padding: 6px; }
.ad-nav__item { display: flex; align-items: center; height: 28px; padding: 0 8px; margin: 1px 0;
  border-radius: 5px; color: var(--c-text-2); cursor: pointer; user-select: none; font-size: 12.5px;
  transition: background var(--dur) var(--ease); }
.ad-nav__item:hover { background: var(--c-surface-sunken); color: var(--c-text-1); }
.ad-nav__item.is-active { background: var(--c-primary-200); color: var(--c-primary-500); font-weight: 600; }
.ad-nav__item.is-locked { color: var(--c-text-disabled); cursor: not-allowed; }
.ad-nav__group { font-size: 10px; letter-spacing: .08em; color: var(--c-text-3); padding: 10px 8px 3px; }
.ad-side__foot { padding: 8px 12px; border-top: 1px solid var(--c-border); font-size: 11px; }
.ad-side__foot a { color: var(--c-primary-500); text-decoration: none; }

.ad-main { margin-left: 184px; min-height: 100vh; }
.ad-topbar { position: sticky; top: 0; z-index: 200; height: 44px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--c-surface); border-bottom: 1px solid var(--c-border-strong); }
.ad-topbar strong { font-size: 14px; font-weight: 650; }
.ad-crumb { font-size: 11px; color: var(--c-text-3); margin-left: 8px; }
.ad-topbar__right { display: flex; align-items: center; gap: 8px; }
.ad-role { font-size: 11px; color: var(--c-text-2); display: flex; align-items: center; gap: 5px; }
.ad-select { height: 26px; border: 1px solid var(--c-border); border-radius: 4px; background: var(--c-surface);
  color: var(--c-text-1); font: 450 12px var(--font-sans); padding: 0 6px; }
.ad-user { font-size: 11px; color: var(--c-text-3); }
.ad-body { padding: 12px 14px 28px; max-width: 1760px; }

/* ---- KPI ---- */
.ad-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ad-kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card);
  padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; }
.ad-kpi .k { font-size: 11px; color: var(--c-text-3); }
.ad-kpi .v { font-size: 20px; font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ad-kpi .v small { font-size: 10.5px; font-weight: 500; color: var(--c-text-3); margin-left: 3px; }
.ad-kpi.is-warn .v { color: var(--c-warning); }
.ad-kpi.is-bad .v { color: var(--c-danger); }
.ad-kpi.is-ok .v { color: var(--c-success); }

/* ---- 面板 ---- */
.ad-panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); margin-bottom: 10px; }
.ad-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-bottom: 1px solid var(--c-border); font-weight: 600; font-size: 12.5px; min-height: 34px; }
.ad-panel__head .sub { font-size: 11px; color: var(--c-text-3); font-weight: 450; }
.ad-panel__body { padding: 10px 12px; }
.ad-panel--flush .ad-panel__body { padding: 0; }

/* ---- 按钮 ---- */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 11px;
  border-radius: 4px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-1);
  font: 550 12px var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: all var(--dur) var(--ease); }
.ad-btn:hover:not(:disabled) { border-color: var(--c-border-strong); background: var(--c-surface-alt, #FAFBFC); }
.ad-btn:disabled { color: var(--c-text-disabled); border-color: var(--c-border); cursor: not-allowed; }
.ad-btn--primary { background: var(--c-primary-500); border-color: var(--c-primary-500); color: #fff; }
.ad-btn--primary:hover:not(:disabled) { background: var(--c-primary-600); }
.ad-btn--danger { background: var(--c-danger-bg); border-color: rgba(200,56,47,.35); color: var(--c-danger); }
.ad-btn--ghost { border-color: transparent; background: transparent; color: var(--c-text-2); }
/* 缺失补齐：小按钮（JS 内使用 37 次，此前无定义导致尺寸退化） */
.ad-btn--sm { height: 22px; padding: 0 8px; font-size: 11px; border-radius: 3px; }
.ad-btn--xs { height: 20px; padding: 0 6px; font-size: 10.5px; border-radius: 3px; }
.ad-btn--ok { border-color: #2E7D32; color: #1B5E20; }

/* ---- 表单（缺失补齐） ---- */
.ad-input, .ad-search { height: 26px; border: 1px solid var(--c-border); border-radius: 4px; background: var(--c-surface);
  color: var(--c-text-1); font: 450 12px var(--font-sans); padding: 0 8px; min-width: 90px; }
.ad-input:focus, .ad-search:focus { outline: none; border-color: var(--c-primary-500); box-shadow: var(--sh-focus); }
.ad-search { width: 190px; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--c-text-3); }
.field > input, .field > select { height: 26px; border: 1px solid var(--c-border); border-radius: 4px; padding: 0 8px; font-size: 12px; background: #fff; }

/* ---- 状态徽标（F.5） ---- */
.ad-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; }
.ad-tag--pending { background: var(--c-warning-bg); color: var(--c-warning); }
.ad-tag--ok { background: var(--c-success-bg); color: var(--c-success); }
.ad-tag--reject { background: var(--c-danger-bg); color: var(--c-danger); }
.ad-tag--off { background: #F0F2F5; color: var(--c-text-3); }
.ad-tag--doing { background: var(--c-info-bg); color: var(--c-info); }
.ad-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.ad-dot--ok { background: var(--c-success); }
.ad-dot--warn { background: var(--c-warning); }
.ad-dot--bad { background: var(--c-danger); }
.ad-dot--off { background: var(--c-text-disabled); }

/* ---- 高密度表格（30px 行高，紧凑化） ---- */
.ad-table-wrap { overflow: auto; max-height: 68vh; }
.ad-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.ad-table th { position: sticky; top: 0; z-index: 1; height: 30px; padding: 0 9px; text-align: left;
  background: var(--c-surface-alt, #FAFBFC); color: var(--c-text-2); font-size: 11.5px; font-weight: 600;
  border-bottom: 1px solid var(--c-border-strong); white-space: nowrap; }
.ad-table th.is-sort { cursor: pointer; user-select: none; }
.ad-table th.is-sort:hover { color: var(--c-primary-500); }
.ad-table td { height: 30px; padding: 0 9px; border-bottom: 1px solid var(--c-border-subtle); color: var(--c-text-2); white-space: nowrap; }
.ad-table td.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--c-text-1); }
.ad-table tbody tr:nth-child(even) { background: var(--c-surface-alt, #FAFBFC); }
.ad-table tbody tr:hover { background: #F0F4FA; }
.ad-table tbody tr.is-sel { background: var(--c-primary-200); }
.ad-table input[type="checkbox"] { accent-color: var(--c-primary-500); }

/* ---- 空状态 / 骨架（缺失补齐） ---- */
.ad-empty { padding: 26px 12px; text-align: center; color: var(--c-text-3); font-size: 12px; }
.ad-empty b { display: block; color: var(--c-text-2); font-size: 13px; margin-bottom: 3px; }
.ad-skel { padding: 10px 12px; display: grid; gap: 6px; }
.ad-skel i { display: block; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #EEF1F5 25%, #F6F8FA 37%, #EEF1F5 63%);
  background-size: 400% 100%; animation: ad-shimmer 1.2s infinite linear; }
@keyframes ad-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---- 分页（缺失补齐） ---- */
.ad-pager { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--c-border);
  font-size: 11.5px; color: var(--c-text-3); }
.ad-pager .sp { flex: 1; }
.ad-pager .ad-btn { height: 22px; padding: 0 8px; font-size: 11px; }
.ad-pager .cur { font-family: var(--font-mono); color: var(--c-text-2); }

/* ---- 筛选 chips ---- */
.ad-chips { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.ad-chip { height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-text-2); font: 550 11.5px var(--font-sans); cursor: pointer; }
.ad-chip.is-on { background: var(--c-primary-200); border-color: var(--c-primary-500); color: var(--c-primary-500); }

/* ---- 批量操作栏 ---- */
.ad-batchbar { position: fixed; left: 184px; right: 0; bottom: 0; z-index: 500; height: 44px;
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: var(--c-text-1); color: #fff; font-size: 12.5px; }
.ad-batchbar__gap { flex: 1; }
.ad-batchbar .ad-btn { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.ad-batchbar .ad-btn--primary { background: var(--c-primary-500); }
.ad-batchbar .ad-btn--danger { background: rgba(200,56,47,.85); border-color: transparent; color: #fff; }

/* ---- 抽屉 ---- */
.ad-mask { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 600; }
.ad-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 96vw;
  background: var(--c-surface); border-left: 1px solid var(--c-border); z-index: 601;
  box-shadow: var(--sh-xl); animation: ad-in var(--dur) var(--ease); display: flex; flex-direction: column; }
@keyframes ad-in { from { transform: translateX(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.ad-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
  border-bottom: 1px solid var(--c-border); }
.ad-drawer__body { padding: 14px 16px; overflow: auto; font-size: 12.5px; }

/* ---- 核验清单 ---- */
.ad-check { border: 1px solid var(--c-border); border-radius: var(--r-card); overflow: hidden; margin: 8px 0; }
.ad-check__item { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px;
  border-bottom: 1px solid var(--c-border-subtle); font-size: 12px; color: var(--c-text-2); }
.ad-check__item:last-child { border-bottom: 0; }
.ad-check__item .mark { font-weight: 700; flex: none; }
.ad-check__item .mark--ok { color: var(--c-success); }
.ad-check__item .mark--bad { color: var(--c-danger); }
.ad-check__item .mark--warn { color: var(--c-warning); }

/* ---- 弹窗 ---- */
.ad-modal-wrap { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 700; display: grid; place-items: center; }
.ad-modal { width: 420px; background: var(--c-surface); border-radius: var(--r-card); box-shadow: var(--sh-xl); overflow: hidden; }
.ad-modal__title { padding: 12px 16px; font-weight: 650; font-size: 13.5px; border-bottom: 1px solid var(--c-border); }
.ad-modal__body { padding: 14px 16px; font-size: 12.5px; color: var(--c-text-2); }
.ad-modal__body textarea, .ad-modal__body input { width: 100%; min-height: 66px; margin-top: 6px;
  border: 1px solid var(--c-border); border-radius: 4px; padding: 7px; font: 450 12.5px var(--font-sans); resize: vertical; }
.ad-modal__body textarea:focus { outline: none; border-color: var(--c-primary-500); box-shadow: var(--sh-focus); }
.ad-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--c-border); }

/* ---- Toast ---- */
.ad-toast { position: fixed; right: 16px; bottom: 56px; z-index: 900; background: var(--c-text-1); color: var(--c-canvas);
  border-radius: 4px; padding: 8px 12px; font-size: 12.5px; display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-md); }
.ad-toast button { border: 0; background: none; color: var(--c-primary-400); font-weight: 650; cursor: pointer; font-size: 12.5px; }

/* ---- 字典维护 ---- */
.ad-dict { display: grid; grid-template-columns: 232px 1fr; gap: 12px; align-items: start; }
.ad-tree { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 6px; }
.ad-tree__item { height: 28px; display: flex; align-items: center; padding: 0 9px; border-radius: 4px;
  color: var(--c-text-2); cursor: pointer; font-size: 12.5px; }
.ad-tree__item:hover { background: var(--c-surface-sunken); }
.ad-tree__item.is-active { background: var(--c-primary-200); color: var(--c-primary-500); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--c-primary-500); }
.ad-warnbar { background: var(--c-warning-bg); border-left: 3px solid var(--c-warning); border-radius: 4px;
  padding: 7px 10px; font-size: 12px; color: var(--c-text-2); margin-bottom: 10px; }

/* ---- 权限置灰（F.8） ---- */
[data-locked="1"] { opacity: .45; cursor: not-allowed; }

/* ---- 占位页 ---- */
.ad-ph { background: var(--c-surface); border: 1px dashed var(--c-border-strong); border-radius: var(--r-card);
  padding: 34px; text-align: center; color: var(--c-text-3); font-size: 12.5px; }
.ad-ph b { color: var(--c-text-2); }
.ad-funnel { display: flex; flex-direction: column; gap: 5px; }
.ad-funnel__row { display: grid; grid-template-columns: 86px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; color: var(--c-text-2); }
.ad-funnel__bar { height: 16px; border-radius: 3px; background: var(--c-primary-500); min-width: 2px; }
.ad-funnel__n { font-family: var(--font-mono); text-align: right; color: var(--c-text-1); }
.ad-alert { background: var(--c-danger-bg); border-left: 3px solid var(--c-danger); border-radius: 4px;
  padding: 7px 10px; font-size: 12px; color: var(--c-text-2); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ad-wcard { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--c-border-subtle); font-size: 12px; color: var(--c-text-2); }
.ad-wcard:last-child { border-bottom: 0; }
.ad-wcard .bar { height: 7px; background: var(--c-primary-200); border-radius: 4px; overflow: hidden; }
.ad-wcard .bar i { display: block; height: 100%; background: var(--c-primary-500); }

/* ---- 审计时间轴（F.4） ---- */
.ad-tl { position: relative; padding-left: 20px; }
.ad-tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--c-border); }
.ad-tl__item { position: relative; padding: 7px 0 10px; border-bottom: 1px solid var(--c-border-subtle); }
.ad-tl__item:last-child { border-bottom: 0; }
.ad-tl__dot { position: absolute; left: -19px; top: 12px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-primary-500); border: 2px solid var(--c-surface); }
.ad-tl__diff { margin-top: 5px; display: flex; flex-direction: column; gap: 2px; }
.ad-diff { display: flex; flex-direction: column; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; line-height: 1.5; }
.ad-diff__b { color: var(--c-danger); }
.ad-diff__a { color: var(--c-success); }

/* ---- F.4 状态机流转条 ---- */
.ad-flow { display: flex; align-items: center; padding: 12px 4px 4px; flex-wrap: wrap; }
.ad-flow--mini { padding: 2px 0; }
.ad-flow__step { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--c-text-2); }
.ad-flow__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-border-strong); background: #fff; flex: none; display: grid; place-items: center; font-size: 9px; color: #fff; line-height: 1; }
.ad-flow__step.is-done .ad-flow__dot { background: #17803D; border-color: #17803D; }
.ad-flow__step.is-now .ad-flow__dot { background: var(--c-primary-500); border-color: var(--c-primary-500); box-shadow: 0 0 0 3px rgba(31, 102, 214, .15); }
.ad-flow__link { width: 22px; height: 2px; background: var(--c-border-strong); margin: 0 5px; flex: none; }
.ad-flow__link.is-done { background: #17803D; }

/* ---- F.4 高级筛选构造器 ---- */
.ad-adv { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px dashed var(--c-border); background: #FAFBFC; }
.ad-adv label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--c-text-2); }
.ad-adv input, .ad-adv select { height: 26px; border: 1px solid var(--c-border); border-radius: 4px; padding: 0 8px; font-size: 12px; min-width: 110px; background: #fff; }
.ad-adv input:focus, .ad-adv select:focus { outline: none; border-color: var(--c-primary-500); box-shadow: var(--sh-focus); }
.ad-advchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 12px 0; }
.ad-advchips .chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; background: #EAF1FD; color: var(--c-primary-500); font-size: 11px; }
.ad-advchips .chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 13px; padding: 0; line-height: 1; }

/* ===== 站台库表格 ===== */
.rail-tbl { table-layout: fixed; width: 100%; }
.rail-tbl th, .rail-tbl td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.rail-tbl .col-note { white-space: normal !important; }
.rail-tbl .note-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }

/* ===== 响应式（1600 / 1440 / 1180 / 900 / 768） ===== */
@media (max-width: 1600px) { .ad-body { max-width: 1440px; } }
@media (max-width: 1440px) {
  .ad-kpis { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .ad-dict { grid-template-columns: 200px 1fr; }
}
@media (max-width: 1180px) {
  .ad-side { width: 52px; }
  .ad-main { margin-left: 52px; }
  .ad-batchbar { left: 52px; }
  .ad-side__brand { justify-content: center; padding: 10px 6px; }
  .ad-side__brand em, .ad-nav__group, .ad-side__foot { display: none; }
  .ad-nav__item { justify-content: center; padding: 0 4px; overflow: hidden; white-space: nowrap; }
  .ad-nav__item:hover { width: 184px; text-align: left; padding: 0 8px; background: var(--c-surface-alt, #F3F5F7); }
}
@media (max-width: 900px) {
  .ad-topbar { height: auto; min-height: 44px; flex-wrap: wrap; padding: 6px 10px; gap: 8px; }
  .ad-topbar__right { flex-wrap: wrap; gap: 6px; }
  .ad-search { width: 140px; }
  .ad-dict { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .ad-body { padding: 10px; }
  .ad-kpis { grid-template-columns: repeat(2, 1fr); }
  .ad-drawer { width: 100vw; }
  .ad-table-wrap { max-height: none; }
}
