/* ============================================================================
   IURTC 筹备工作台 —— 业务管理台 / 账号设置 / 修改流水 样式
   设计令牌全部复用 app.css（禁止修改 app.css）；类名前缀：
   admin → .adm-* / .admin-*     account → .acct-*     audit → .aud-*
   竖屏适配：表格容器横向滚动、页签可横滑、筛选条可换行。
   ========================================================================== */

/* ============================================================================
   通用：管理台页面骨架
   ========================================================================== */
.admin-page .page-head > .col,
.audit-page .page-head > .col,
.account-page .page-head > .col { gap: 4px; }

.admin-page .page-head .eyebrow,
.audit-page .page-head .eyebrow,
.account-page .page-head .eyebrow { align-self: flex-start; }

.admin-tabs {
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs .tab { flex: none; }

.admin-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 顶栏式工具条（标题 + 统计 + 操作） */
.adm-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.adm-bar-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.adm-bar-info .strong { font-size: 14.5px; }
.adm-bar .spacer { flex: 1; }

/* 横向滚动表格容器 */
.admin-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.admin-scroll .tbl { min-width: 720px; }
.admin-tbl td { vertical-align: middle; }
.admin-tbl .chip { max-width: 100%; }

/* 人员单元格 */
.adm-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.adm-person .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-email { word-break: break-all; font-size: 12.5px; color: var(--ink-2); }
.adm-row-pending { background: var(--accent-wash); }
.adm-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-cell-clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-itembtn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }

/* 标签 chips / 色点 */
.adm-tagchips { display: flex; flex-wrap: wrap; gap: 4px; }
.adm-tag-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--muted);
}
.adm-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid var(--line);
}

/* 多选标签 */
.adm-tagpick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.adm-tagpick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.15s;
  user-select: none;
}
.adm-tagpick-item:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.adm-tagpick-item input { accent-color: var(--accent); margin: 0; }

/* 勾选行 */
.adm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface);
}
.adm-check input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.adm-check .hint { flex-basis: 100%; margin-left: 23px; }

/* 一次性邀请码 */
.adm-once-note {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--st-doing);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.55;
}
.adm-code {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 16px 10px;
  background: var(--surface-2);
  border: 1px dashed var(--accent-line);
  border-radius: var(--r);
  color: var(--accent);
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}

/* 提示 / 错误 / 成功 */
.adm-warn {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.55;
}
.adm-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger-line-soft);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.adm-error-title { color: var(--danger); font-weight: 700; font-size: 13px; }
.adm-error-msg { color: var(--ink-2); font-size: 12.5px; line-height: 1.55; word-break: break-word; }
.adm-error-hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
.adm-error .btn { margin-top: 6px; }
.adm-form-err { color: var(--danger); font-size: 12.5px; line-height: 1.5; min-height: 0; word-break: break-word; }
.adm-form-err:empty { display: none; }
.adm-form-ok { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.adm-form-ok:empty { display: none; }

/* 强制删除引用列表 */
.adm-refs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 8px;
}
.adm-ref { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.adm-ref > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 数据导出统计 */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.adm-stat { background: var(--surface); padding: 10px 12px; min-width: 0; }
.adm-stat .n { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.adm-stat .t { font-size: 12px; color: var(--ink-2); }
.adm-export-intro { font-size: 13px; color: var(--ink-2); }
.adm-export-intro p { margin-bottom: 4px; }
.adm-export-intro ul { padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* ============================================================================
   账号设置 /account
   ========================================================================== */
.acct-grid { min-width: 0; }
.acct-grid > aside { min-width: 0; }
.acct-grid > .col { min-width: 0; }
.acct-card-b { padding: 16px; }
.acct-identity { display: flex; align-items: center; gap: 12px; }
.acct-identity .avatar.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 18px; }
.acct-identity-main { min-width: 0; }
.acct-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.acct-identity-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.acct-info { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 13px; min-width: 0; }
.acct-info-label { flex: none; width: 82px; color: var(--muted); font-size: 12px; padding-top: 1px; }
.acct-info-value { color: var(--ink-2); word-break: break-word; min-width: 0; }
.acct-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.acct-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.acct-err { color: var(--danger); font-size: 12.5px; line-height: 1.5; word-break: break-word; }
.acct-err:empty { display: none; }
.acct-ok { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.acct-ok:empty { display: none; }

/* ============================================================================
   修改流水 /audit
   ========================================================================== */
.aud-filter-card .card-b { padding: 13px 16px; }
.aud-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.aud-filter-field { min-width: 150px; }
.aud-filter-field.aud-filter-grow { flex: 1 1 240px; }
.aud-filter-actions { padding-bottom: 1px; }

.aud-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.aud-summary .spacer { flex: 1; }

.aud-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.aud-tbl { min-width: 900px; }
.aud-tbl td { vertical-align: top; }

.aud-actor { display: flex; align-items: center; gap: 6px; min-width: 0; }
.aud-actor .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  min-width: 0;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: 7px;
  text-align: left;
  transition: 0.15s;
}
.aud-item:hover { background: var(--accent-soft); }
.aud-item-label {
  font-size: 12.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aud-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.aud-field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.aud-val {
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 12.5px;
  color: var(--ink-2);
}

.aud-snap-tr > td { background: var(--surface-2); padding: 12px 14px; }
.aud-snap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aud-snapshot {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.aud-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.aud-error { display: flex; flex-direction: column; align-items: flex-start; }

/* ============================================================================
   响应式（竖屏 / 小屏）
   ========================================================================== */
@media (max-width: 860px) {
  .adm-bar { align-items: flex-start; }
  .admin-scroll .tbl { min-width: 640px; }
  .adm-email { font-size: 12px; }
  .acct-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .admin-tabs { margin-bottom: 12px; }
  .aud-filters { flex-direction: column; align-items: stretch; gap: 9px; }
  .aud-filter-field { min-width: 0; width: 100%; }
  .aud-filter-actions { width: 100%; }
  .aud-filter-actions .btn { width: 100%; }
  .aud-summary { gap: 6px; }
  .aud-tbl { min-width: 760px; }
  .aud-val { max-width: 160px; }
  .adm-tagpick-item { font-size: 12px; }
  .adm-code { font-size: 22px; letter-spacing: 0.12em; }
  .acct-info-label { width: 70px; }
  .acct-identity .avatar.lg { width: 40px; height: 40px; font-size: 16px; }
}
