/* 权限管理板块：账号与权限一览、岗位权限对照。卡片、按钮沿用工作台已有样式，这里补名单、状态和对照表。 */
.ad-page { --ad-edge: #e3e7ee; --ad-ink: #1d2129; --ad-soft: #63718a; }

/* 汇总条 */
.ad-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, 170px)) minmax(240px, 1fr); gap: 14px; margin: 0 0 18px; }
.ad-stats > div { display: grid; align-content: space-between; gap: 12px; min-height: 92px; padding: 16px 20px; border: 1px solid var(--ad-edge); border-radius: 14px; background: #fff; }
.ad-stats dt { color: var(--ad-soft); font-size: 13px; }
.ad-stats dd { margin: 0; color: #243448; font-size: 28px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.ad-stats dd small { margin-left: 5px; color: #7b8697; font-size: 13px; font-weight: 400; }
.ad-stats .ad-who { background: linear-gradient(135deg, #effbff 0%, #fff 62%); border-color: #c7e9f5; }
.ad-stats .ad-who dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; line-height: 1.6; }
.ad-banner { margin: 0 0 16px; padding: 11px 16px; border: 1px solid #f3dcae; border-radius: 12px; color: #8a5a00; background: #fff9ec; font-size: 13px; line-height: 1.6; }

/* 标签与状态 */
.ad-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; color: #55637a; background: #f1f3f6; font-size: 12px; line-height: 1.7; white-space: nowrap; }
.ad-tag.owner { color: #7a4b00; background: #fff1d6; }
.ad-tag.admin { color: #0f5f88; background: #d7f5ff; }
.ad-tag.extra { color: #0f6f55; background: #e6f6f0; }
.ad-tag.changed { color: #b25e00; background: #fff4e5; }
.ad-muted { color: #a3abb7; font-size: 13px; }
.ad-pill { display: inline-flex; align-items: center; gap: 7px; color: #5b6676; font-size: 13px; white-space: nowrap; }
.ad-pill i { width: 7px; height: 7px; border-radius: 50%; background: #c5ccd3; }
.ad-pill.ok { color: #1c7a4d; } .ad-pill.ok i { background: #1eb36b; box-shadow: 0 0 0 3px rgb(30 179 107 / 14%); }
.ad-pill.wait i { background: #5fbee0; }
.ad-pill.warn { color: #9a6400; } .ad-pill.warn i { background: #f0a020; }
.ad-pill.stop { color: #b3382f; } .ad-pill.stop i { background: #e5484d; }
.ad-pill.off { color: #a3abb7; }

/* 名单 */
.ad-card { border: 1px solid var(--ad-edge); border-radius: 14px; background: #fff; overflow: hidden; }
.ad-table { overflow-x: auto; }
.ad-table table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 13px; color: #43444a; }
.ad-table thead th { height: 42px; padding: 0 16px; border-bottom: 1px solid var(--ad-edge); color: #526070; background: #f6f8fb; font-weight: 500; text-align: left; white-space: nowrap; }
.ad-table tbody td { height: 66px; padding: 10px 16px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.ad-table tbody tr:last-child td { border-bottom: 0; }
.ad-table tbody tr { cursor: pointer; transition: background .12s ease; }
.ad-table tbody tr:hover td { background: #fafbfd; }
.ad-table tr.is-off td:not(.ad-actions) { opacity: .62; }
.ad-table :is(th, td):first-child { padding-left: 22px; }
.ad-person { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.ad-person b { display: block; color: var(--ad-ink); font-size: 14px; font-weight: 600; }
.ad-person small { display: block; margin-top: 2px; color: #8a94a3; font-size: 12px; }
.ad-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; font-size: 14px; font-weight: 600; }
.ad-avatar.tone-a { color: #106792; background: #d7f5ff; } .ad-avatar.tone-b { color: #0f7a5c; background: #e3f6ef; }
.ad-avatar.tone-c { color: #a15c07; background: #fff1dc; } .ad-avatar.tone-d { color: #7b46c4; background: #f1e9ff; }
.ad-stack { display: grid; gap: 5px; justify-items: start; }
.ad-stack b { color: var(--ad-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ad-actions { white-space: nowrap; }
.ad-link { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; margin-right: 6px; border: 1px solid #dfe3ea; border-radius: 999px; color: #2c3a52; background: #fff; font-size: 13px; }
.ad-link:hover { border-color: #90d7ef; color: var(--blue); background: #ecfaff; }
.ad-link.primary { border-color: #b5e3f3; color: var(--blue); background: #e2f7ff; font-weight: 500; }
.ad-link.primary:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.ad-why { margin-left: 2px; font-size: 12px; }

/* 固定账号 */
.ad-fixed { display: grid; gap: 12px; margin-top: 18px; padding: 20px 22px; border: 1px dashed #d5dbe5; border-radius: 14px; background: #fbfcfe; }
.ad-fixed h2 { margin: 0 0 2px; color: #63718a; font-size: 13px; font-weight: 500; }
.ad-fixed div { display: grid; grid-template-columns: 82px 1fr; align-items: start; gap: 14px; }
.ad-fixed .ad-tag { justify-content: center; }
.ad-fixed p { margin: 0; color: #55637a; font-size: 13px; line-height: 1.7; }

/* 新增人员 */
.ad-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 24px 64px rgb(15 23 42 / 22%); color: var(--ad-ink); }
.ad-dialog::backdrop { background: rgb(15 23 42 / 32%); }
.ad-dialog form { display: grid; gap: 16px; padding: 26px 28px 24px; }
.ad-dialog h2 { margin: 0; font-size: 19px; font-weight: 650; }
.ad-dialog p { margin: -6px 0 2px; color: #74757c; font-size: 13px; line-height: 1.7; }
.ad-dialog label { display: grid; gap: 8px; color: #4e5969; font-size: 13px; }
.ad-dialog input { height: 42px; padding: 0 14px; border: 1px solid #dfe0e4; border-radius: 10px; color: var(--ad-ink); font: inherit; font-size: 14px; }
.ad-dialog input:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
.ad-error { min-height: 18px; color: #c9302c; font-size: 13px; }
.ad-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 岗位权限对照 */
.ad-legend { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0 0 16px; padding: 0; list-style: none; color: #63718a; font-size: 13px; }
.ad-legend li { display: flex; align-items: center; gap: 8px; }
.ad-matrix table { min-width: 720px; }
.ad-matrix thead th:not(:first-child), .ad-matrix tbody td { width: 96px; text-align: center; }
.ad-matrix tbody td { height: 48px; cursor: default; }
.ad-matrix tbody tr { cursor: default; }
.ad-matrix tbody th[scope=row] { height: 48px; padding: 8px 16px 8px 22px; border-bottom: 1px solid #eef1f5; color: var(--ad-ink); font-size: 14px; font-weight: 400; text-align: left; }
.ad-matrix tbody th[scope=row] span:first-child { margin-right: 10px; }
.ad-matrix tr.ad-group th { height: 38px; padding: 0 22px; border-bottom: 1px solid #eef1f5; color: #7b8697; background: #fbfcfe; font-size: 12px; font-weight: 500; text-align: left; }
.ad-yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--blue); }
.ad-yes svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.ad-no { color: #cfd4dc; }

@media (max-width: 900px) {
  .ad-stats { grid-template-columns: repeat(3, 1fr); }
  .ad-stats .ad-who { grid-column: 1 / -1; min-height: 0; }
  .ad-fixed div { grid-template-columns: 1fr; gap: 6px; }
  .ad-fixed .ad-tag { justify-self: start; }
}
@media (max-width: 560px) {
  .ad-stats { grid-template-columns: 1fr 1fr; }
  .ad-stats > div { min-height: 76px; padding: 13px 15px; }
}
/* 员工账号列表里的「金蝶业务员账户」「高德打卡名」两栏：一行写完，写不下的省略，鼠标停上去看全。 */
.ad-names { display: block; max-width: 168px; overflow: hidden; color: #1d2129; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ad-table table { min-width: 1040px; }


/* ---------- 员工账号（2026-12-03 照金聚诚做「新建账号」，12-04 改简约）----------
   负责人 12-04：「这个前端弄得简约，漂亮一点，不要这种密密麻麻的。」名单只列开了账号的人、不放大数字；弹窗只留几格，岗位一排三选一。
   字一律深色（负责人不要灰字，主次靠字号粗细）。只管员工账号这一页和账号设置页，权限管理页的样子不动。 */
.ad-accounts .ad-pill, .ad-accounts .ad-pill.off { color: #1d2129; }
.ad-accounts .ad-table tbody td { color: #1d2129; }
.ad-accounts .ad-table thead th { color: #1d2129; background: #fafbfc; }
.ad-accounts .ad-table table { min-width: 860px; }
.ad-toolbar { padding: 14px 22px; border-bottom: 1px solid var(--ad-edge); color: #1d2129; font-size: 14px; }
.ad-toolbar b { font-weight: 600; }
.ad-person-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ad-role-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #eaf4f9; color: #1d2129; font-size: 13px; line-height: 1; white-space: nowrap; }
.ad-login { font-weight: 500; }
.ad-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ad-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #1d2129; }
.ad-icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ad-icon-btn:hover { color: var(--blue); background: #ecf6fb; }
.ad-accounts .ad-actions { width: 150px; text-align: right; white-space: nowrap; }
.ad-accounts .ad-actions > * { vertical-align: middle; }
/* 行尾：停用、启用是两个字的小按钮；删账号的垃圾桶悬停才变红（负责人不要深色大色块）。 */
.ad-text-btn { height: 30px; margin-right: 4px; padding: 0 12px; border: 1px solid #e1e4ea; border-radius: 15px; background: #fff; color: #1d2129; font: inherit; font-size: 13px; cursor: pointer; }
.ad-text-btn:hover { border-color: var(--blue); color: var(--blue); }
.ad-icon-btn { border: 0; background: none; cursor: pointer; }
.ad-icon-btn.danger:hover { color: #d13c4f; background: #fdeeef; }
/* 删除账号弹窗：照金聚诚「彻底删除」，两栏写清什么没了、什么还在；不用大色块，只在小标题前点一个颜色。 */
.ad-purge-who { display: flex; align-items: baseline; gap: 10px; margin: -4px 0 0; color: #1d2129; font-size: 14px; }
.ad-purge-who b { font-size: 17px; font-weight: 650; }
.ad-purge-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 16px 0; border-top: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; }
.ad-purge-cols h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #1d2129; font-size: 14px; font-weight: 600; }
.ad-purge-cols h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1eb36b; }
.ad-purge-cols .gone h3::before { background: #d13c4f; }
.ad-purge-cols ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #1d2129; font-size: 13px; line-height: 1.6; }
.ad-danger { border-color: #d13c4f; background: #d13c4f; color: #fff; }
.ad-danger:hover:not(:disabled) { background: #b9303f; border-color: #b9303f; }
.ad-danger:disabled { border-color: #f0c2c8; background: #f4cdd2; color: #fff; cursor: not-allowed; }
@media (max-width: 560px) { .ad-purge-cols { grid-template-columns: minmax(0, 1fr); } }
.ad-empty { display: grid; justify-items: center; gap: 8px; padding: 72px 24px; border: 1px solid var(--ad-edge); border-radius: 14px; background: #fff; text-align: center; }
.ad-empty b { color: #1d2129; font-size: 17px; font-weight: 600; }
.ad-empty p { margin: 0; color: #1d2129; font-size: 14px; }

/* 新建账号弹窗、某位同事的账号设置页：标签在框上面，两格一排，留足空白。 */
.ad-create { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; border-radius: 20px; }
.ad-create form { gap: 20px; padding: 26px 30px 26px; }
.ad-create-head { display: flex; align-items: center; justify-content: space-between; }
.ad-create h2 { margin: 0; font-size: 20px; font-weight: 650; }
.ad-x { display: grid; place-items: center; width: 34px; height: 34px; margin-right: -8px; border: 0; border-radius: 10px; background: none; color: #1d2129; cursor: pointer; }
.ad-x:hover { background: #f2f4f7; }
.ad-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ad-form { display: grid; gap: 22px; max-width: 620px; margin-bottom: 18px; padding: 26px 28px; border: 1px solid var(--ad-edge); border-radius: 16px; background: #fff; }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.ad-field { display: grid; gap: 8px; min-width: 0; }
.ad-label { display: inline-flex; align-items: center; gap: 4px; color: #1d2129; font-size: 14px; font-weight: 500; }
.ad-field input:not([type=radio]):not([type=checkbox]) { width: 100%; height: 42px; padding: 0 14px; border: 1px solid #e1e4ea; border-radius: 10px; background: #fff; color: #1d2129; font: inherit; font-size: 14px; font-weight: 400; transition: border-color .14s, box-shadow .14s; }
.ad-field input:not([type=radio]):not([type=checkbox]):hover { border-color: #c9ced7; }
.ad-field input:not([type=radio]):not([type=checkbox]):focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
.ad-field input[readonly], .ad-field input[readonly]:not([type=radio]):not([type=checkbox]) { background: #f5f6f8; cursor: default; } /* 只读的灰底（原来被上面那条白底盖住了） */
.ad-field input.bad { border-color: #d13c4f; box-shadow: 0 0 0 3px rgb(209 60 79 / 12%); }
.ad-pw { position: relative; display: block; }
.ad-field .ad-pw input { padding-right: 46px; }
.ad-pw button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #1d2129; cursor: pointer; }
.ad-pw button:hover { background: #f2f4f7; }
.ad-pw svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ad-hint { margin-top: -6px; color: #1d2129; font-size: 13px; line-height: 1.7; }
.ad-hint button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; cursor: pointer; }
.ad-hint button:hover { text-decoration: underline; }
/* 岗位：一排三选一（照日志页时间段那一排）。 */
.ad-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 12px; background: #f0f2f5; }
.ad-seg label { position: relative; cursor: pointer; }
.ad-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ad-seg span { display: grid; place-items: center; height: 38px; border-radius: 9px; color: #1d2129; font-size: 14px; transition: background .14s, color .14s, box-shadow .14s; }
.ad-seg label:hover span { background: #e6e9ee; }
.ad-seg input:checked + span { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgb(15 23 42 / 10%); }
.ad-seg input:focus-visible + span { outline: 2px solid #b5d9ea; outline-offset: 1px; }
/* 金蝶销售人员、高德销售人员：两行一个样子，只有选了销售才出来；已选的小标签，后面一个「＋ 添加」。 */
.ad-links { display: grid; gap: 18px; }
.ad-create [hidden] { display: none !important; }
.ad-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; }
.ad-chip { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: 16px; background: #e6f3f9; color: #1d2129; font-size: 13.5px; font-weight: 500; }
.ad-chip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #1d2129; cursor: pointer; }
.ad-chip button:hover { background: #cfe6f1; }
.ad-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ad-pick .xs-trigger { width: auto; height: 32px; padding: 0 14px; border: 1px dashed #b9c6d3; border-radius: 16px; color: var(--blue); background: #fff; font-size: 13.5px; }
.ad-pick .xs-trigger:hover:not(:disabled) { border-color: var(--blue); background: #f2f9fc; }
.ad-pick .xs-value, .ad-pick .xs-value.dim { color: var(--blue); }
.ad-pick .xs-caret { display: none; }
.ad-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.ad-foot .ad-error { flex: 1; min-height: 0; }
/* 启用账号：一个开关。 */
.ad-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.ad-switch { position: relative; flex: none; width: 44px; height: 26px; }
.ad-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ad-switch i { position: absolute; inset: 0; border-radius: 13px; background: #c9cdd4; transition: background .16s ease; pointer-events: none; }
.ad-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / 20%); transition: transform .16s ease; }
.ad-switch input:checked + i { background: var(--blue); }
.ad-switch input:checked + i::after { transform: translateX(18px); }
.ad-switch input:focus-visible + i { outline: 2px solid #b5d9ea; outline-offset: 2px; }
/* 某位同事的账号设置页：上面的表单和下面「对应的业务名字」一样宽、左右对齐；那张卡片里的字也改深色（只在这一页）。 */
.ad-settings .ad-form, .ad-settings .team-links { max-width: 760px; }
.ad-settings .team-links-list dt, .ad-settings .team-links-item em, .ad-settings .team-links-nil, .ad-settings .team-links-group li span { color: #1d2129; }
@media (max-width: 560px) {
  .ad-grid { grid-template-columns: minmax(0, 1fr); }
  .ad-create form { padding: 22px 20px; }
  .ad-form { padding: 20px 18px; }
}
/* 手机上名单一人一张：第一行头像、名字、岗位，右边改账号的笔；下面一行登录名、手机号、金蝶账户、状态、微信挨着排，没有的不占地方。 */
@media (max-width: 640px) {
  .ad-accounts .ad-table { overflow: visible; }
  .ad-accounts .ad-table table { min-width: 0; }
  .ad-accounts .ad-table thead { display: none; }
  .ad-accounts .ad-table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 16px; border-bottom: 1px solid #eef1f5; }
  .ad-accounts .ad-table tbody tr:last-child { border-bottom: 0; }
  .ad-accounts .ad-table tbody td { display: block; height: auto; padding: 0; border: 0; font-size: 13.5px; }
  .ad-accounts .ad-table tbody td:empty { display: none; }
  .ad-accounts .ad-table tbody td:first-child { flex: 1 1 calc(100% - 52px); padding: 0; }
  .ad-accounts .ad-table tbody td.ad-actions { flex: none; width: auto; order: 0; }
  .ad-accounts .ad-table tbody td:not(:first-child):not(.ad-actions) { order: 1; }
  .ad-accounts .ad-names { max-width: none; }
  .ad-toolbar { padding: 12px 16px; }
}

/* 全部账号第二版（2026-12-05，负责人：「这些前端可否搞好看点，然后是微信助手那里能不能加上绿泡泡。」）：
   头像圆的（和账号设置一样）；状态只有停用了标红；绑了微信的前面一个绿泡泡；行尾停用、启用、改、删都是一样大的图标。 */
.ad-accounts .ad-table .ad-avatar { border-radius: 50%; }
.ad-accounts .ad-table tbody td { font-size: 14px; }
.ad-accounts .ad-person-line { flex-wrap: nowrap; white-space: nowrap; }
.ad-state { color: #1d2129; white-space: nowrap; }
.ad-state.off { color: #c9302c; }
.ad-wx { display: inline-flex; align-items: center; gap: 6px; color: #1d2129; white-space: nowrap; }
.ad-wx svg { width: 19px; height: 17px; stroke: none; }
.ad-accounts .ad-actions .ad-icon-btn + .ad-icon-btn { margin-left: 2px; }
/* 账号删过的档案：同事账号设置页只放一段说明 */
.ad-closed p { margin: 0; color: #1d2129; font-size: 14px; line-height: 1.7; }
.ad-closed .tool-btn { justify-self: start; }
