/* 系统 · 账号与权限页样式（前缀 ac-）
 * 与 project.css 同一套做法：只补本页特有的类，通用件（.card/.row/.btn/.tag/.tabs）
 * 一律复用 app.css，不在这里重复定义。
 * 主色 #3B82F6 · 断点 768px
 */

.ac-loading { padding: 40px; text-align: center; color: var(--text-3); font-size: var(--fs-base); }
.ac-err { color: var(--danger); font-size: var(--fs-base); line-height: 1.8; }

/* ---------------- 轻提示 ---------------- */


/* ---------------- 弹层 ---------------- */

/* 遮罩样式（.ac-modal）已随 B7 退出：与公共 .wm-modal 逐值相同，由 app.css 接管 */
.ac-panel {
  width: 100%; max-width: 620px; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: var(--r-lg); padding: 20px;
}
.ac-panel h3 { margin: 0 0 8px; font-size: var(--fs-lg); font-weight: 500; }
.ac-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-panel .field select {
  width: 100%; padding: 10px 12px; font-size: var(--fs-md); font-family: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
}
.ac-panel .field select:focus { border-color: var(--brand); background: var(--card); }
.ac-sub { font-size: var(--fs-base); color: var(--text-3); margin-bottom: 14px; }
.ac-hint { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.7; margin-top: 12px; }
.ac-hint.top { margin: 0 0 14px; }
.ac-warn {
  font-size: var(--fs-base); line-height: 1.7; color: var(--warn); background: var(--warn-weak);
  border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 14px;
}
.ac-warn b { color: var(--warn); }
.ac-actions { display: flex; gap: 10px; margin-top: 18px; }
.ac-actions .btn { flex: 1; }

/* 危险操作按钮（删除 / 停用确认）—— 样式已收进 app.css 的 .btn.danger / .btn.ghost.danger，
   这里不再重复定义（同一件事写两遍，后加载的那份会悄悄覆盖前一份的 hover 色）。 */

/* ---------------- 工具条 ---------------- */

.ac-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.ac-tools input {
  flex: 1; min-width: 180px; max-width: 320px; padding: 8px 12px; font-size: var(--fs-base);
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.ac-tools input:focus { border-color: var(--brand); background: var(--card); }
.ac-tools-hint { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.6; }

/* ---------------- 列表行 ---------------- */

.ac-list { margin-top: 4px; }
.ac-row {
  display: grid;
  /* 列：账号 / 角色 / 数据范围 / 上次登录 / 操作 —— 「部门」列已于 2026-10-09 移除 */
  grid-template-columns: minmax(170px, 1.4fr) 1fr 1fr 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.ac-rolerow { grid-template-columns: minmax(170px, 1.4fr) 1fr .8fr 1.2fr auto; }
.ac-row:last-child { border-bottom: none; }
.ac-row.ac-off { opacity: .62; }

.ac-cell { min-width: 0; }
.ac-nm {
  font-size: var(--fs-md); font-weight: 500; line-height: 1.5;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ac-meta { color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; word-break: break-all; }
.ac-k { font-size: var(--fs-sm); color: var(--text-3); margin-bottom: 3px; }
.ac-v { font-size: var(--fs-base); overflow-wrap: anywhere; }
.ac-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------- 角色权限勾选 ---------------- */

.ac-pbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 12px;
}
.ac-pbar-t { font-size: var(--fs-base); color: var(--text-2); }
.ac-pcount { margin-left: auto; font-size: var(--fs-sm); color: var(--text-3); }

.ac-pgroup { margin-bottom: 14px; }
.ac-pgroup-t { font-size: var(--fs-sm); color: var(--text-3); margin-bottom: 8px; }
.ac-pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ac-pitem {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  font-size: var(--fs-base); line-height: 1.45; background: var(--card);
}
.ac-pitem:hover { border-color: var(--brand); }
.ac-pitem input { margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.ac-pitem span { display: block; min-width: 0; overflow-wrap: anywhere; }
.ac-pitem i {
  display: block; font-style: normal; color: var(--text-3);
  font-size: var(--fs-xs); margin-top: 2px;
}

/* ---------------- ORG 组织授权（城市 / BU 多选） ---------------- */

.ac-scope {
  margin-top: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg);
}
/* 显式写一条：将来若给 .ac-scope 加了 display，[hidden] 就会被覆盖掉 */
.ac-scope[hidden] { display: none; }
.ac-scope-note { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.7; margin-bottom: 10px; }
.ac-scope-note b { color: var(--text-2); }
.ac-scope-dim + .ac-scope-dim { margin-top: 12px; }
.ac-scope-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ac-scope-t { font-size: var(--fs-base); font-weight: 500; }
.ac-scope-n { font-size: var(--fs-sm); color: var(--text-3); margin-right: auto; }
.ac-scope-grid { grid-template-columns: repeat(3, 1fr); }
.ac-scope-grid .ac-pitem { padding: 6px 8px; font-size: var(--fs-sm); align-items: center; }
.ac-scope-grid .ac-pitem input { margin: 0; }
/* 城市有 47 个，全铺开会把弹层撑爆 —— 超过阈值走滚动 */
.ac-scope-grid.tall { max-height: 168px; overflow-y: auto; padding-right: 4px; }
.ac-meta.warn { color: var(--warn); }

/* ---------------- 临时密码展示 ---------------- */

.ac-pwbox {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px;
  background: var(--bg); margin-bottom: 14px;
}
.ac-pwrow {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.ac-pwrow:last-child { border-bottom: none; }
.ac-pwrow span { font-size: var(--fs-base); color: var(--text-2); flex: 0 0 72px; }
.ac-pwval { font-size: var(--fs-xl); letter-spacing: .5px; user-select: all; overflow-wrap: anywhere; }

/* ---------------- 手机端 ---------------- */

@media (max-width: 768px) {
  .ac-row, .ac-rolerow { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .ac-cell.ac-who, .ac-acts { grid-column: 1 / -1; }
  .ac-acts { justify-content: flex-start; }
  .ac-hide-sm { display: none; }
  .ac-panel { padding: 16px; max-height: 92vh; }
  .ac-grid2 { grid-template-columns: 1fr; gap: 0; }
  .ac-pgrid { grid-template-columns: 1fr; }
  .ac-scope-grid { grid-template-columns: 1fr 1fr; }
  .ac-scope-grid.tall { max-height: 200px; }
}
