/* Auth 模块列表页样式（从 fa-app-shell 提取，主色对齐 Orange 壳） */
:root {
  --fa-shell-primary: #ea580c;
  --fa-shell-border: #f0f0f0;
  --fa-list-zebra-bg: #f5f7fa;
  --fa-list-border: #e5e6eb;
  --fa-list-row-selected-bg: #fff7ed;
  --fa-list-header-bg: #f5f7fa;
  --fa-list-row-hover-bg: #eef0f4;
}
.fa-list-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fa-list-breadcrumb {
  font-size: 15px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.fa-list-breadcrumb a {
  color: #8c8c8c;
  text-decoration: none;
}

.fa-list-breadcrumb a:hover {
  color: var(--fa-shell-primary);
}

.fa-list-breadcrumb .fa-bc-sep {
  margin: 0 6px;
  color: #d9d9d9;
}

.fa-list-breadcrumb .fa-bc-active {
  color: #333;
}

.fa-list-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f1f1f;
  line-height: 1.4;
}

/* 统一列表页大标题（图二样式）：隐藏面包屑，显示页面标题 */
.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) > .fa-list-breadcrumb {
  display: none !important;
}

.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) > .fa-page-header-split,
.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) > div:has(> .fa-list-title),
.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) > .fa-list-title-wrap {
  display: block !important;
  margin-bottom: 4px;
}

.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) .fa-list-title {
  display: block !important;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  color: #1f1f1f;
  line-height: 1.4;
}

.fa-list-page.fa-list-page--with-title > .fa-list-title-wrap {
  display: block !important;
  margin-bottom: 4px;
}

.fa-list-title-wrap--with-actions {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 覆盖 .fa-list-page--with-title > .fa-list-title-wrap 的 display:block，标题左、操作按钮右 */
.fa-list-page.fa-list-page--with-title > .fa-list-title-wrap.fa-list-title-wrap--with-actions {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fa-list-title-wrap--with-actions .fa-list-title {
  margin: 0;
}

.fa-list-title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fa-list-page.fa-list-page--with-title > .fa-list-breadcrumb {
  display: none !important;
}

.fa-list-page.fa-list-page--with-title > .fa-list-toolbar {
  margin-top: 0;
}

.fa-list-page.fa-list-page--antd:has(> .fa-list-toolbar) > .fa-list-toolbar {
  margin-top: 0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.fa-list-desc {
  margin-top: 6px;
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.fa-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fa-list-border);
}
.fa-list-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fa-list-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.fa-list-toolbar-left > form {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

/* 工具栏左侧主操作按钮：统一高度，宽度随文字自适应 */
.fa-list-toolbar-left > .fa-btn-primary,
.fa-list-toolbar-left > .fa-btn-outline,
.fa-list-toolbar-left > .fa-btn-ghost,
.fa-list-toolbar-left > a,
.fa-list-toolbar-left > button,
.fa-list-toolbar-left > form {
  flex-shrink: 0;
}

.fa-list-toolbar-left > .fa-btn-primary,
.fa-list-toolbar-left > .fa-btn-outline,
.fa-list-toolbar-left > .fa-btn-ghost,
.fa-list-toolbar-left > a.fa-btn-primary,
.fa-list-toolbar-left > a.fa-btn-outline,
.fa-list-toolbar-left > button.fa-btn-primary,
.fa-list-toolbar-left > button.fa-btn-outline,
.fa-list-toolbar-left > form > button,
.fa-list-toolbar-left > form > .fa-btn-primary,
.fa-list-toolbar-left > form > .fa-btn-outline {
  height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

body.fa-fixedasset-shell .fa-btn-primary {
  background: #ea580c !important;
  border-color: #ea580c !important;
}

body.fa-fixedasset-shell .fa-btn-primary:hover:not(:disabled) {
  background: #c2410c !important;
  border-color: #c2410c !important;
}

.fa-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--fa-shell-primary);
  border: 1px solid var(--fa-shell-primary);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.fa-btn-primary:hover:not(:disabled) {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
}

.fa-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fa-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 80px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #dc2626;
  background: #fff;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}

.fa-btn-danger:hover:not(:disabled) {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #f87171;
}

.fa-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 审批区：同意 / 驳回按钮统一高度与最小宽度 */
.fa-fx-detail__body--document > section[class*="border-blue"] .flex.flex-wrap.gap-3 > .fa-btn-primary,
.fa-fx-detail__body--document > section[class*="border-blue"] .flex.flex-wrap.gap-3 > .fa-btn-danger,
.fa-fx-detail__body--document > section[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"],
.fa-fx-crud section.no-print[class*="border-blue"] .flex.flex-wrap.gap-3 > .fa-btn-primary,
.fa-fx-crud section.no-print[class*="border-blue"] .flex.flex-wrap.gap-3 > .fa-btn-danger,
.fa-fx-crud section.no-print[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 88px;
  padding: 0 14px !important;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1;
  border-radius: 6px;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
}

.fa-fx-detail__body--document > section[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"]:not(.fa-btn-primary),
.fa-fx-crud section.no-print[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"]:not(.fa-btn-primary) {
  color: #dc2626 !important;
  background: #fff !important;
  border: 1px solid #fca5a5 !important;
}

.fa-fx-detail__body--document > section[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"]:not(.fa-btn-primary):hover,
.fa-fx-crud section.no-print[class*="border-blue"] .flex.flex-wrap.gap-3 > button[type="submit"]:not(.fa-btn-primary):hover {
  color: #b91c1c !important;
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}

.fa-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 16px;
  color: #333;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.fa-btn-outline:hover:not(:disabled) {
  color: var(--fa-shell-primary);
  border-color: var(--fa-shell-primary);
}

.fa-list-toolbar-left .fa-btn-outline.text-red-700,
.fa-btn-outline.fa-btn-outline--danger {
  color: #cf1322;
  border-color: #ffa39e;
}

.fa-list-toolbar-left .fa-btn-outline.text-red-700:hover:not(:disabled),
.fa-btn-outline.fa-btn-outline--danger:hover:not(:disabled) {
  color: #a8071a;
  border-color: #ff7875;
}

.fa-btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fa-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 16px;
  color: #333;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  cursor: pointer;
  box-sizing: border-box;
}

.fa-btn-ghost:hover {
  color: var(--fa-shell-primary);
  border-color: var(--fa-shell-primary);
}

.fa-toolbar-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fa-toolbar-btn-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.fa-toolbar-btn-icon--filter {
  width: 18px;
  height: 18px;
}

.fa-toolbar-btn-icon--filter img {
  width: 18px;
  height: 18px;
}

.fa-toolbar-btn-icon--on-primary {
  width: 16px;
  height: 16px;
}

.fa-toolbar-btn-icon--on-primary img {
  width: 16px;
  height: 16px;
}

.fa-list-table-wrap {
  margin-top: 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--fa-shell-border);
  border-radius: 8px;
}

/* Ant Design 列表 bordered：外框 + 全网格线 + 斑马纹 */
.fa-list-table-wrap--antd {
  margin-top: 16px;
  border: none;
  border-radius: 8px;
  background: #fff;
  overflow-x: auto;
  overflow-y: auto;
  box-sizing: border-box;
}

.fa-list-table.fa-list-table--antd {
  border-collapse: separate;
  border-spacing: 0;
  border-top: 1px solid var(--fa-list-border);
  border-left: 1px solid var(--fa-list-border);
  overflow: visible;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.65);
  text-align: left;
  /* 与外层圆角衔接时避免直角戳出 */
  border-radius: 0;
}

.fa-list-table.fa-list-table--antd thead th {
  padding: 14px 16px !important;
  font-weight: 600 !important;
  color: rgba(0, 0, 0, 0.85) !important;
  background: var(--fa-list-header-bg) !important;
  border: none !important;
  border-right: 1px solid var(--fa-list-border) !important;
  border-bottom: 1px solid var(--fa-list-border) !important;
  vertical-align: middle;
  text-align: left;
}

/* 表头在滚动容器内纵向置顶（仅带 --antd 外框的列表，与 body.fa-fixedasset-shell 内纵向滚动配合） */
.fa-list-table-wrap--antd .fa-list-table.fa-list-table--antd thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.08);
}

.fa-list-table.fa-list-table--antd tbody td {
  padding: 14px 16px !important;
  border: none !important;
  border-right: 1px solid var(--fa-list-border) !important;
  border-bottom: 1px solid var(--fa-list-border) !important;
  vertical-align: middle;
  text-align: left;
  color: rgba(0, 0, 0, 0.65);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-variant-numeric: normal;
}

/* 列表数据行：中英数字统一字体与字色，不被 Tailwind font-mono / text-slate-* 拆成两种风格 */
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.font-mono,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.tabular-nums,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.font-medium,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.text-slate-900,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.text-slate-800,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.text-slate-700,
body.fa-fixedasset-shell .fa-list-table.fa-list-table--antd tbody td.text-slate-600 {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-variant-numeric: normal;
  color: rgba(0, 0, 0, 0.65);
}

/* 勾选列保持居中（首列且含 checkbox） */
.fa-list-table.fa-list-table--antd thead th.fa-th-check,
.fa-list-table.fa-list-table--antd tbody tr td:first-child:has(> input[type="checkbox"]) {
  text-align: center;
}

/* 斑马纹：奇数行白底，偶数行 #F5F7FA */
.fa-list-table.fa-list-table--antd tbody tr:nth-child(odd) td {
  background: #fff;
}

.fa-list-table.fa-list-table--antd tbody tr:nth-child(even) td {
  background: var(--fa-list-zebra-bg);
}

.fa-list-table.fa-list-table--antd tbody tr:nth-child(odd):not(.fa-row-selected):not(:has(input[type="checkbox"]:checked)):hover td {
  background: var(--fa-list-zebra-bg) !important;
}

.fa-list-table.fa-list-table--antd tbody tr:nth-child(even):not(.fa-row-selected):not(:has(input[type="checkbox"]:checked)):hover td {
  background: var(--fa-list-row-hover-bg) !important;
}

.fa-list-table.fa-list-table--antd tbody tr.fa-row-selected td,
.fa-list-table.fa-list-table--antd tbody tr:has(input[type="checkbox"]:checked) td {
  background: var(--fa-list-row-selected-bg) !important;
}

.fa-list-table.fa-list-table--antd tbody tr.fa-row-selected:hover td,
.fa-list-table.fa-list-table--antd tbody tr:has(input[type="checkbox"]:checked):hover td {
  background: var(--fa-list-row-selected-bg) !important;
}

/* 操作列：基础宽度与分隔线（始终） */
.fa-list-table.fa-list-table--antd thead th.fa-th-actions,
.fa-list-table.fa-list-table--antd thead tr th:last-child:not(.fa-th-check) {
  min-width: 200px;
  width: 200px;
  max-width: 280px;
  text-align: left;
  border-left: 1px solid var(--fa-list-border);
  box-sizing: border-box;
}

.fa-list-table.fa-list-table--antd tbody td.fa-col-actions {
  min-width: 200px;
  width: 200px;
  max-width: 280px;
  text-align: left;
  border-left: 1px solid var(--fa-list-border);
  display: table-cell !important;
  vertical-align: middle;
}

/* 操作列：仅横向溢出时右侧 sticky（避免表格未撑满时出现操作列与数据列之间的空白断层） */
.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd thead th.fa-th-actions,
.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd thead tr th:last-child:not(.fa-th-check) {
  position: sticky;
  right: 0;
  z-index: 15;
  background: var(--fa-list-header-bg) !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody td.fa-col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:nth-child(odd) td.fa-col-actions {
  background: #fff !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:nth-child(even) td.fa-col-actions {
  background: var(--fa-list-zebra-bg) !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:nth-child(odd):not(.fa-row-selected):not(:has(input[type="checkbox"]:checked)):hover td.fa-col-actions {
  background: var(--fa-list-zebra-bg) !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:nth-child(even):not(.fa-row-selected):not(:has(input[type="checkbox"]:checked)):hover td.fa-col-actions {
  background: var(--fa-list-row-hover-bg) !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr.fa-row-selected td.fa-col-actions,
.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:has(input[type="checkbox"]:checked) td.fa-col-actions {
  background: var(--fa-list-row-selected-bg) !important;
}

.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr.fa-row-selected:hover td.fa-col-actions,
.fa-list-table-wrap--antd.is-h-scroll .fa-list-table.fa-list-table--antd tbody tr:has(input[type="checkbox"]:checked):hover td.fa-col-actions {
  background: var(--fa-list-row-selected-bg) !important;
}

.fa-ant-table-min {
  min-width: 720px;
}

.fa-ant-table-wide {
  min-width: 960px;
}

.fa-ant-table-xl {
  min-width: 1120px;
}
.fa-list-table.fa-list-table--antd .fa-cell-status--ok {
  color: #52c41a;
}

.fa-list-table.fa-list-table--antd .fa-cell-status--off {
  color: rgba(0, 0, 0, 0.45);
}

.fa-code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  padding: 2px 6px;
  background: #f5f5f5;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
}

.fa-checkbox-antd {
  width: 16px;
  height: 16px;
  accent-color: var(--fa-shell-primary);
  cursor: pointer;
}

.fa-list-pagination--antd {
  margin-top: 20px;
}

.fa-list-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 0;
  font-size: 14px;
  color: #64748b;
}

.fa-list-pagination-left {
  flex-shrink: 0;
  color: #64748b;
}

.fa-list-pagination-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.fa-pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  box-sizing: border-box;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.fa-pg-btn:hover:not(.is-disabled) {
  color: var(--fa-shell-primary);
  border-color: var(--fa-shell-primary);
}

.fa-pg-btn.is-current {
  border-color: var(--fa-shell-primary);
  color: var(--fa-shell-primary);
  font-weight: 600;
  background: #fff7ed;
}

.fa-pg-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.fa-pg-size,
.fa-pg-jump-input {
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 14px;
  color: #334155;
  background: #fff;
  box-sizing: border-box;
}

.fa-pg-jump-input {
  width: 52px;
  text-align: center;
}

.fa-pagination-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 14px;
  color: #64748b;
}

/* 用户编辑 — 标签页 */
.fa-edit-user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
}

.fa-edit-user-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fa-edit-user-tab:hover {
  background: #f8fafc;
}

.fa-edit-user-tab.is-active {
  color: #fff;
  background: var(--fa-shell-primary);
  box-shadow: none;
}

.fa-edit-user-panel {
  display: block;
}

.fa-edit-user-panel.is-hidden {
  display: none;
}

.fa-fx-form .is-hidden {
  display: none !important;
}

/* Auth 表单页（Enterprise 等壳）：补全 fa-fx-form-shell 在 #enterprise-layout-body 下未覆盖的布局 */
#enterprise-layout-body.fa-fx-form-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

#enterprise-layout-body.fa-fx-form-layout .fa-fx-form,
#enterprise-layout-body.fa-fx-form-layout .fa-fx-form__form,
#enterprise-layout-body.fa-fx-form-layout .fa-fx-form__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
}

#enterprise-layout-body.fa-fx-form-layout .fa-fx-form__main {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 24px;
  box-sizing: border-box;
  background: #f0f2f5;
}

.fa-fx-form .fa-label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.fa-fx-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.25rem;
}

@media (min-width: 768px) {
  .fa-fx-form__grid:not(.fa-fx-form__grid--stack) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fa-fx-form__field-span3 {
  grid-column: 1 / -1;
}

.fa-fx-form__label-text {
  display: block;
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0.75);
  font-size: 1rem;
  line-height: 1.25rem;
}

.fa-fx-form__req {
  color: #ff4d4f;
  margin-right: 2px;
}

.fa-fx-form__card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 20px 22px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.fa-fx-form__card-title {
  margin: 0 0 1rem;
  padding-left: 10px;
  border-left: 4px solid #1890ff;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.35;
}

.fa-fx-form__card .fieldset {
  min-width: 0;
}

.fa-edit-user-dept-table .fa-edit-user-dept-row {
  cursor: pointer;
}

.fa-edit-user-dept-table .fa-edit-user-dept-row:hover {
  background: #f8fafc;
}

.fa-edit-user-dept-table .fa-edit-user-dept-radio {
  cursor: pointer;
}

.fa-dept-picker-field {
  position: relative;
  display: block;
}

.fa-dept-picker-input {
  width: 100%;
  padding-right: 2.75rem;
  cursor: pointer;
  background: #fff;
}

.fa-dept-picker-input:disabled {
  cursor: not-allowed;
  background: #f5f5f5;
}

.fa-dept-picker-field__icon {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  pointer-events: none;
}

.fa-dept-picker-field__icon svg {
  width: 100%;
  height: 100%;
}

.fa-dept-picker-field__clear {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.fa-dept-picker-field__clear:hover {
  background: #f1f5f9;
  color: #334155;
}

.fa-dept-picker-field__clear.is-hidden {
  display: none;
}

.fa-edit-user-dept-modal__dialog {
  max-width: 640px;
  width: calc(100vw - 2rem);
}

.fa-edit-user-dept-modal__table-wrap {
  max-height: min(420px, 55vh);
  overflow: auto;
}

.fa-d-none {
  display: none !important;
}

.fa-shell-dropdown-divider {
  border-top: 1px solid #f0f0f0;
  padding-top: 6px;
  margin-top: 4px;
}

.fa-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  text-align: left;
}

.fa-list-table thead th {
  padding: 12px 16px;
  font-weight: 500;
  color: #333;
  background: var(--fa-list-header-bg);
  border-bottom: 1px solid var(--fa-list-border);
  white-space: nowrap;
}

.fa-list-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--fa-list-border);
  color: rgba(0, 0, 0, 0.65);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}

.fa-list-table:not(.fa-list-table--antd) tbody tr:nth-child(even) {
  background: var(--fa-list-zebra-bg);
}

.fa-list-table tbody tr:hover {
  background: var(--fa-list-zebra-bg);
}

.fa-list-table:not(.fa-list-table--antd) tbody tr:has(input[type="checkbox"]:checked) {
  background: var(--fa-list-row-selected-bg);
}

.fa-list-table.fa-list-table--antd tbody tr:hover {
  background: transparent;
}

.fa-list-table.fa-list-table--antd tbody tr:has(input[type="checkbox"]:checked) {
  background: transparent;
}

.fa-list-table .fa-col-actions {
  white-space: nowrap;
  vertical-align: middle;
}

.fa-list-table td.fa-col-actions {
  display: table-cell !important;
}

.fa-list-table td.fa-col-actions > * + *::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  margin: 0 10px;
  background: var(--fa-list-border);
  vertical-align: middle;
}

.fa-list-table .fa-col-actions a,
.fa-list-table .fa-col-actions form.inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0;
}

.fa-list-table .fa-link-edit {
  color: var(--fa-shell-primary);
  text-decoration: none;
  font-size: 16px;
}

.fa-list-table .fa-link-edit:hover {
  text-decoration: none;
}

.fa-list-table a.fa-link-neutral,
.fa-list-table .fa-link-neutral {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
  font-size: 16px;
}

.fa-list-table a.fa-link-neutral:hover,
.fa-list-table .fa-link-neutral:hover {
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
}

.fa-list-table .fa-link-danger {
  color: #ff4d4f;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
}

.fa-list-table .fa-link-danger:hover {
  text-decoration: none;
}

.fa-list-table .fa-col-actions form.inline {
  display: inline-flex;
  align-items: center;
}

.fa-list-table button.fa-link-edit {
  color: var(--fa-shell-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
}

.fa-list-table button.fa-link-edit:hover {
  text-decoration: none;
}

.fa-list-table .fa-link-info {
  color: var(--fa-shell-primary);
}

a.fa-link-info {
  color: var(--fa-shell-primary);
  text-decoration: none;
  font-size: 16px;
}

a.fa-link-info:hover {
  text-decoration: none;
}

button.fa-link-edit {
  color: var(--fa-shell-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
}

button.fa-link-edit:hover {
  text-decoration: none;
}

button.fa-link-danger {
  color: #ff4d4f;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
}

button.fa-link-danger:hover {
  text-decoration: none;
}

a.fa-link-edit {
  color: var(--fa-shell-primary);
  text-decoration: none;
  font-size: 16px;
}

a.fa-link-edit:hover {
  text-decoration: none;
}
.fa-filter-panel {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
}
/* 独立 fa-field（角色授权等筛选表单） */
.fa-field,
input.fa-field,
select.fa-field,
textarea.fa-field {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.625rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  background: #fff;
}

.fa-field:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px #fb923c;
}

select.fa-field {
  height: auto;
  min-height: 2.625rem;
  cursor: pointer;
}

/* 树形列表（权限树、组织树等） */
.fa-tree-hidden {
  display: none !important;
}

.fa-tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.25rem;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}

.fa-tree-toggle:hover {
  background: #f1f5f9;
  color: #334155;
}

.fa-tree-toggle__icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.fa-tree-toggle.is-expanded .fa-tree-toggle__icon {
  transform: rotate(90deg);
}

.fa-tree-toggle-spacer {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.fa-tree-name-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.fa-tree-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fa-list-table--tree .fa-tree-name-cell {
  max-width: 28rem;
}

.fa-th-check,
.fa-cell-check {
  width: 2.75rem;
  text-align: center;
}

.fa-th-check input,
.fa-cell-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--fa-shell-primary);
  cursor: pointer;
}

/* 权限定义 / 角色授权 — 模块与分区 Tab */
.fa-auth-perm-module-tabs,
.fa-auth-perm-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fa-auth-perm-module-tabs__tab,
.fa-auth-perm-section-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #475569;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fa-auth-perm-module-tabs__tab:hover,
.fa-auth-perm-section-tabs__tab:hover {
  background: #f8fafc;
  text-decoration: none;
}

.fa-auth-perm-module-tabs__tab.is-active,
.fa-auth-perm-section-tabs__tab.is-active {
  color: #fff;
  background: var(--fa-shell-primary);
  box-shadow: none;
}

.fa-auth-perm-module-tabs__count,
.fa-auth-perm-section-tabs__count {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
}

.fa-auth-perm-module-tabs__tab.is-active .fa-auth-perm-module-tabs__count,
.fa-auth-perm-section-tabs__tab.is-active .fa-auth-perm-section-tabs__count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 角色授权页 */
.fa-role-perm-page > .fa-list-title-wrap {
  margin-bottom: 0.5rem;
}

.fa-role-perm-page > .fa-list-title-wrap--with-actions {
  margin-bottom: 0.75rem;
}

.fa-role-perm-role-bar {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, #f8fafc, #fff);
}

.fa-role-perm-role-bar__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.fa-role-perm-role-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #ffedd5;
  color: var(--fa-shell-primary);
}

.fa-role-perm-role-bar__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.fa-role-perm-role-bar__field {
  flex: 1 1 14rem;
  min-width: 0;
}

.fa-role-perm-role-bar__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.fa-role-perm-role-bar__select-wrap {
  position: relative;
  max-width: 28rem;
}

.fa-role-perm-role-bar__select {
  display: block;
  width: 100%;
  min-height: 2.625rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  background: #fff;
  appearance: none;
  cursor: pointer;
}

.fa-role-perm-role-bar__select:focus {
  outline: none;
  border-color: var(--fa-shell-primary);
  box-shadow: 0 0 0 1px var(--fa-shell-primary);
}

.fa-role-perm-role-bar__select-chevron {
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
  color: #94a3b8;
}

.fa-role-perm-role-bar__select-chevron svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.fa-role-perm-role-bar__summary {
  width: 100%;
  max-width: 18rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
}

@media (min-width: 1024px) {
  .fa-role-perm-role-bar__summary {
    width: 18rem;
    margin-left: auto;
  }
}

.fa-role-perm-role-bar__summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.fa-role-perm-role-bar__role-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #0f172a;
}

.fa-role-perm-role-bar__stat {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.fa-role-perm-role-bar__stat strong {
  color: var(--fa-shell-primary);
}

.fa-role-perm-role-bar__stat-total {
  color: #94a3b8;
}

.fa-role-perm-role-bar__progress {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #e2e8f0;
}

.fa-role-perm-role-bar__progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--fa-shell-primary);
  transition: width 0.3s ease;
}

.fa-role-perm-role-bar__hint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.875rem;
  color: #64748b;
}

.fa-role-perm-role-bar__tabs {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.fa-role-perm-empty {
  padding: 3rem 1rem;
  text-align: center;
}

.fa-role-perm-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #94a3b8;
}

.fa-role-perm-empty__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.fa-role-perm-empty__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

.fa-role-perm-empty__desc {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.fa-role-perm-form--has-footer {
  padding-bottom: 4.5rem;
}

.fa-role-perm-form__footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin: 0 -1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(4px);
}

.fa-role-perm-advanced,
.fa-role-perm-policy-details {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #fff;
}

.fa-role-perm-advanced__summary,
.fa-role-perm-policy-details__summary {
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.fa-role-perm-advanced__body {
  padding: 0 0.875rem 0.875rem;
}

.fa-role-perm-advanced__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.fa-role-perm-advanced__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.fa-role-perm-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fa-role-perm-field--wide {
  grid-column: 1 / -1;
}

.fa-role-perm-field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.fa-role-perm-policy-scroll {
  max-height: min(280px, 35vh);
  overflow-y: auto;
  border-top: 1px solid #f1f5f9;
}

.fa-role-perm-type-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
}

.fa-role-perm-type-tag--group {
  color: #64748b;
  background: #f1f5f9;
}

.fa-role-perm-type-tag--page {
  color: #0369a1;
  background: #e0f2fe;
}

.fa-role-perm-type-tag--button {
  color: #7c3aed;
  background: #ede9fe;
}

.fa-role-perm-type-tag--api {
  color: #b45309;
  background: #fef3c7;
}

.fa-perm-transfer__badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
}

.fa-perm-transfer__badge--sync {
  color: #0369a1;
  background: #e0f2fe;
}

.fa-perm-transfer__badge--manual {
  color: #15803d;
  background: #dcfce7;
}

.fa-perm-transfer__badge--both {
  color: #7c2d12;
  background: #ffedd5;
}

/* 用户详情：样式在固定资产壳体里，Auth 壳未引入，标题会落回浏览器默认大号字 */
#enterprise-layout-body.fa-fx-detail-layout,
#fa-layout-body.fa-fx-detail-layout,
#orange-layout-body.fa-fx-detail-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #f0f2f5;
}

.fa-fx-detail {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
  background: #f0f2f5;
}

.fa-fx-detail__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 32px;
  flex-shrink: 0;
  padding: 12px 24px;
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.fa-fx-detail__header-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fa-fx-detail__header-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}

.fa-fx-detail__header-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-left: 48px;
}

.fa-fx-detail__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
}

.fa-fx-detail__back svg {
  width: 32px;
  height: 32px;
}

.fa-fx-detail__page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0059be;
  line-height: 1.35;
  white-space: nowrap;
}

.fa-fx-detail__subject {
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.4;
}

.fa-fx-detail__status-sep {
  flex-shrink: 0;
  width: 1px;
  height: 14px;
  margin: 0 4px;
  background: #e5e6eb;
}

.fa-fx-detail__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.75);
}

.fa-fx-detail__badge--use {
  color: #52c41a;
}

.fa-fx-detail__badge--plain {
  color: rgba(0, 0, 0, 0.45);
}

.fa-fx-detail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52c41a;
  flex-shrink: 0;
}

.fa-fx-detail__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.fa-fx-detail__icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.65);
  background: #f5f5f5;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}

.fa-fx-detail__icon-btn svg {
  width: 16px;
  height: 16px;
}

.fa-fx-detail__body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 24px;
  box-sizing: border-box;
}

.fa-fx-detail__card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 20px 22px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.fa-fx-detail__card-title {
  margin: 0 0 18px;
  padding-left: 10px;
  border-left: 4px solid #0059be;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.35;
}

.fa-fx-detail__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}

.fa-fx-detail__cell--span3 {
  grid-column: span 3;
}

.fa-fx-detail__cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fa-fx-detail__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.75);
}

.fa-fx-detail__box {
  display: flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.85);
  background: #fff;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  box-sizing: border-box;
  word-break: break-word;
}

.fa-fx-detail__box--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.fa-fx-detail .fa-cell-status--ok {
  color: #52c41a;
}

.fa-fx-detail .fa-cell-status--off {
  color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 960px) {
  .fa-fx-detail__header {
    grid-template-columns: 1fr auto;
  }

  .fa-fx-detail__header-center {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .fa-fx-detail__header-meta {
    margin-left: 24px;
  }
}

@media (max-width: 900px) {
  .fa-fx-detail__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fa-fx-detail__cell--span3 {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .fa-fx-detail__grid {
    grid-template-columns: 1fr;
  }

  .fa-fx-detail__cell--span3 {
    grid-column: span 1;
  }
}
