/* ==========================================================================
   超级通讯录、智能收件人、组织架构（参照 Microsoft 365 新版 Outlook，Fluent 2）
   前缀：ab- 通讯录 / sr- 智能收件人 / org- 组织架构
   ========================================================================== */

/* ---------- 整体：灰色画布上的圆角卡片 ---------- */
.ab-app { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--canvas); }
.ab-ribbon { padding-top: 8px; }
.ab-ribbon .ribbon-panel { align-items: center; margin-bottom: 8px; }
.ab-ribbon .ab-refresh .rb-label { display: none; }
.ab-panes { flex: 1; display: flex; gap: 8px; padding: 0 8px; min-height: 0; }
.ab-pane {
    background: var(--surface); border-radius: var(--radius-lg); min-height: 0; overflow: hidden;
    box-shadow: var(--shadow2, 0 0 2px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.14));
}

/* 搜索框（功能区右侧） */
.ab-search {
    display: flex; align-items: center; gap: 6px; height: 32px; width: 320px; padding: 0 6px 0 10px; margin-right: 4px;
    border-radius: var(--radius); background: var(--canvas); border: 1px solid transparent; transition: background .1s, border-color .1s;
}
.ab-search:focus-within { background: var(--surface); border-color: var(--colorNeutralStroke1, #d1d1d1); border-bottom: 2px solid var(--brand); }
.ab-search.on { background: var(--surface); border-color: var(--colorNeutralStroke1, #d1d1d1); }
.ab-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--fg1); }
.ab-search-clear { width: 24px; height: 24px; border: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; color: var(--fg3); cursor: pointer; }
.ab-search-clear:hover { background: var(--hover); color: var(--fg1); }

/* ---------- 左侧文件夹树 ---------- */
.ab-tree { width: 264px; flex: none; display: flex; flex-direction: column; padding: 8px 0 0; }
.ab-tree .pane-scroll { padding: 0 6px 8px; }
.ab-tree-sep { height: 1px; margin: 6px 8px; background: var(--colorNeutralStroke3, #f0f0f0); }
.ab-node {
    position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding-right: 6px; border-radius: var(--radius);
    color: var(--fg1); cursor: pointer; outline: none; user-select: none;
}
.ab-node.root { font-weight: 600; margin-top: 2px; }
.ab-node:hover { background: var(--hover); }
.ab-node:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.ab-node.active { background: var(--brand-soft); color: var(--brand-fg); }
.ab-node.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--brand); }
.ab-node-toggle { width: 20px; height: 20px; flex: none; border: 0; padding: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; cursor: pointer; }
.ab-node-toggle:hover { background: var(--colorSubtleBackgroundPressed, #e0e0e0); }
span.ab-node-toggle { cursor: inherit; }
span.ab-node-toggle:hover { background: transparent; }
.ab-node-name { flex: 1; min-width: 0; font-size: 14px; }
.ab-node:not(.root) .ab-node-name { font-weight: 400; }
.ab-node-count { font-size: 12px; color: var(--fg3); font-weight: 400; font-variant-numeric: tabular-nums; }
.ab-node.active .ab-node-count { color: var(--brand-fg); }
.ab-node-more { display: none; width: 24px; height: 24px; flex: none; border: 0; border-radius: var(--radius); background: transparent; place-items: center; color: var(--fg2); cursor: pointer; }
.ab-node:hover .ab-node-more, .ab-node.active .ab-node-more { display: grid; }
.ab-node:hover .ab-node-more + .ab-node-count, .ab-node:hover .ab-node-count:has(+ .ab-node-more) { display: none; }
.ab-node-more:hover { background: var(--colorSubtleBackgroundPressed, #e0e0e0); }
.ab-tree-foot { display: flex; gap: 6px; align-items: flex-start; padding: 10px 14px 12px; border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); font-size: 12px; line-height: 16px; color: var(--fg3); }
.ab-tree-foot svg { flex: none; margin-top: 1px; }

/* ---------- 中间表格 ---------- */
.ab-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-list-head { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px 0 16px; flex: none; flex-wrap: nowrap; overflow: hidden; }
.ab-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--fg3); font-size: 14px; white-space: nowrap; }
.ab-crumb-last { color: var(--fg1); font-size: 16px; font-weight: 600; }
.ab-count { font-size: 12px; color: var(--fg2); background: var(--canvas); border-radius: 10px; padding: 0 8px; line-height: 20px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.ab-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 2px 0 8px; border-radius: 12px; flex: none;
    background: var(--brand-soft); color: var(--brand-fg); font-size: 12px; max-width: 220px; white-space: nowrap; overflow: hidden;
}
.ab-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: inherit; cursor: pointer; flex: none; }
.ab-chip button:hover { background: rgba(15,108,189,.12); }
.ab-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg2); cursor: pointer; white-space: nowrap; flex: none; }
.ab-switch { width: 32px; height: 16px; border-radius: 8px; }
.ab-switch::after { width: 10px; height: 10px; top: 2px; left: 2px; }
.ab-switch:checked::after { transform: translateX(16px); }

.ab-grid { flex: 1; overflow: auto; min-height: 0; outline: none; position: relative; border-top: 1px solid var(--colorNeutralStroke2, #e0e0e0); }

.ab-row {
    display: grid; align-items: center; height: 36px; min-width: max-content; position: relative;
    border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); cursor: default; user-select: none;
}
.ab-row:not(.ab-head):hover { background: var(--hover); }
.ab-row.selected { background: var(--brand-soft); }
.ab-row.selected:hover { background: var(--colorBrandBackground2Hover, #cfe4fa); }
.ab-row.focused::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.ab-head { position: sticky; top: 0; z-index: 2; height: 36px; background: var(--surface); border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0); }
.ab-cell { display: flex; align-items: center; gap: 8px; min-width: 0; height: 100%; padding: 0 10px; font-size: 13px; color: var(--fg1); overflow: hidden; }
.ab-cell.ab-name { font-weight: 600; font-size: 14px; }
.ab-cell .ellipsis { min-width: 0; }
.ab-cell.editing { padding: 0 3px; }
.ab-fill { padding: 0; }
.ab-check { justify-content: center; padding: 0; cursor: pointer; }
.ab-checkbox {
    width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--colorNeutralStrokeAccessible, #616161); display: grid; place-items: center;
    color: transparent; background: var(--surface); transition: opacity .1s; opacity: 0;
}
.ab-row:hover .ab-checkbox, .ab-row.selected .ab-checkbox, .ab-head .ab-checkbox, .ab-checkbox.on { opacity: 1; }
.ab-checkbox.on, .ab-checkbox.some { background: var(--brand); border-color: var(--brand); color: #fff; }
.ab-hcell { padding: 0 2px 0 4px; gap: 0; font-weight: 600; color: var(--fg2); }
.ab-hcell + .ab-hcell, .ab-check + .ab-hcell { box-shadow: inset 1px 0 0 transparent; }
.ab-hlabel { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 4px; padding: 0 6px; border: 0; background: transparent; border-radius: var(--radius); font: inherit; font-weight: 600; font-size: 13px; color: inherit; cursor: pointer; text-align: left; }
.ab-hlabel:hover { background: var(--hover); color: var(--fg1); }
.ab-hcell.sorted .ab-hlabel, .ab-hcell.filtered .ab-hlabel { color: var(--brand-fg); }
.ab-hmenu { width: 22px; height: 28px; flex: none; border: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; color: var(--fg3); cursor: pointer; opacity: 0; }
.ab-hcell:hover .ab-hmenu, .ab-hcell.filtered .ab-hmenu { opacity: 1; }
.ab-hmenu:hover { background: var(--hover); color: var(--fg1); }
.ab-inline {
    width: 100%; height: 28px; padding: 0 7px; font: inherit; font-size: 13px; color: var(--fg1); background: var(--surface);
    border: 1px solid var(--colorNeutralStroke1, #d1d1d1); border-bottom: 2px solid var(--brand); border-radius: var(--radius); outline: none;
    box-shadow: var(--shadow-card);
}
.ab-hl { background: #fff4ce; color: inherit; border-radius: 2px; padding: 0 1px; box-shadow: 0 0 0 1px #f9e2a0; }
.ab-tag { flex: none; font-size: 11px; font-weight: 400; line-height: 18px; padding: 0 6px; border-radius: 9px; background: var(--canvas); color: var(--fg3); }
.ab-src { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; background: var(--canvas); color: var(--fg2); }
.ab-src-personal { background: #ebf3fc; color: #0f6cbd; }
.ab-src-directory { background: #f1faf1; color: #0e700e; }
.ab-src-public { background: #fef6f1; color: #b44a0a; }
.ab-src-group { background: #f5f4fc; color: #4f43a8; }
.ab-skel { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 46px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-empty { position: sticky; left: 0; width: 100%; min-height: 360px; }

/* ---------- 右侧详情 ---------- */
.ab-detail { width: 340px; flex: none; display: flex; flex-direction: column; }
.ab-detail-scroll { flex: 1; overflow-y: auto; padding: 24px 20px 24px; animation: fl-fade .12s; }
.ab-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-hero .persona { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--colorNeutralStroke2, #e0e0e0); }
.ab-group-avatar { width: 72px; height: 72px; background: var(--brand-soft); }
.ab-hero-name { font-size: 20px; line-height: 28px; font-weight: 600; margin-top: 12px; word-break: break-word; }
.ab-hero-sub { font-size: 13px; color: var(--fg2); margin-top: 2px; }
.ab-hero-tags { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 8px; max-width: 100%; }
.ab-loc { font-size: 12px; color: var(--fg3); max-width: 180px; }
.ab-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.ab-section-title { font-size: 12px; font-weight: 600; color: var(--fg3); margin: 16px 0 6px; }
.ab-fields { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0; margin: 0; }
.ab-fields dt { color: var(--fg3); font-size: 13px; padding: 7px 0; }
.ab-fields dd { margin: 0; padding: 7px 0; font-size: 13px; word-break: break-all; border-bottom: 1px solid var(--colorNeutralStroke3, #f5f5f5); }
.ab-fields dt { border-bottom: 1px solid var(--colorNeutralStroke3, #f5f5f5); }
.ab-fields dd.empty { color: var(--fg4); }
.ab-fields a { color: var(--brand-fg); text-decoration: none; }
.ab-fields a:hover { text-decoration: underline; }
.ab-updated { margin-top: 10px; }
.ab-readonly-note { display: flex; gap: 6px; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-alt); color: var(--fg3); font-size: 12px; line-height: 18px; }
.ab-readonly-note svg { flex: none; margin-top: 1px; }
.ab-members { display: flex; flex-direction: column; }
.ab-member { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--colorNeutralStroke3, #f5f5f5); }
.ab-member-text { flex: 1; min-width: 0; font-size: 13px; }

/* 编辑面板 */
.ab-editor-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-editor-title { font-size: 16px; font-weight: 600; line-height: 22px; }
.ab-form { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.ab-form > label { font-size: 13px; color: var(--fg2); }
.ab-form .fl-input, .ab-form .fl-select { width: 100%; }
.ab-form textarea.fl-input { min-height: 64px; }
.ab-form-static { font-size: 13px; color: var(--fg1); padding: 6px 0; word-break: break-all; }
.ab-editor-foot { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }

/* ---------- 状态栏 ---------- */
.ab-status { flex: none; height: 32px; display: flex; align-items: center; gap: 10px; padding: 0 16px; font-size: 12px; color: var(--fg2); }
.ab-status b { font-weight: 600; color: var(--fg1); font-variant-numeric: tabular-nums; }
.ab-status-sep { width: 1px; height: 12px; background: var(--colorNeutralStroke1, #d1d1d1); }
.ab-status-path { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 右键菜单、筛选弹窗、对话框 ---------- */
.ab-ctx-overlay { position: fixed; inset: 0; z-index: 60; }
.ab-ctx, .ab-pop {
    position: fixed; z-index: 61; min-width: 220px; padding: 4px; background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-flyout); animation: fl-fade .08s; border: 1px solid var(--colorTransparentStroke, transparent);
}
.ab-ctx-item {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius);
    background: transparent; font: inherit; font-size: 14px; color: var(--fg1); text-align: left; cursor: pointer; white-space: nowrap;
}
.ab-ctx-item:hover:not(:disabled) { background: var(--hover); }
.ab-ctx-item:disabled { color: var(--fg4); cursor: default; }
.ab-ctx-item.on { background: var(--brand-soft); color: var(--brand-fg); }
.ab-ctx-blank { width: 16px; flex: none; }
.ab-ctx-sep { height: 1px; margin: 4px -4px; background: var(--colorNeutralStroke2, #e0e0e0); }
.ab-pop { width: 288px; padding: 8px; }
.ab-pop-title { font-size: 12px; font-weight: 600; color: var(--fg3); padding: 2px 10px 6px; }
.ab-pop-filter { padding: 4px 2px 0; }
.ab-pop-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: var(--radius); background: var(--canvas); margin-bottom: 6px; }
.ab-pop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.ab-pop-values { max-height: 240px; overflow-y: auto; border: 1px solid var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius); padding: 4px 0; }
.ab-pop-value { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; font-size: 13px; cursor: pointer; }
.ab-pop-value:hover { background: var(--hover); }
.ab-pop-value.all { font-weight: 600; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); margin-bottom: 2px; }
.ab-pop-value .ellipsis { flex: 1; }
.ab-pop-count { font-size: 12px; color: var(--fg3); font-variant-numeric: tabular-nums; }
.ab-pop-foot { display: flex; align-items: center; gap: 6px; padding-top: 8px; }

.ab-modal-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.4); animation: fl-fade .12s; }
.ab-modal {
    position: fixed; z-index: 71; left: 50%; top: 30%; transform: translate(-50%, -30%); width: 420px; max-width: calc(100vw - 32px);
    padding: 24px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow64, 0 0 8px rgba(0,0,0,.12), 0 32px 64px rgba(0,0,0,.14));
}
.ab-modal h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0 0 16px; }
.ab-modal-label { display: block; font-size: 14px; color: var(--fg2); margin-bottom: 6px; }
.ab-modal .fl-input { width: 100%; }
.ab-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* 显示字段 */
.ab-chooser-actions { display: flex; align-items: center; gap: 4px; margin: -4px 0 8px -8px; }
.ab-chooser { border: 1px solid var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius-lg); overflow: hidden; }
.ab-chooser-row { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-chooser-row:last-child { border-bottom: 0; }
.ab-chooser-row:hover { background: var(--hover); }
.ab-chooser-row label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--fg3); }
.ab-chooser-row.on label { color: var(--fg1); }
.ab-icon-btn { width: 28px; height: 28px; border: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; color: var(--fg2); cursor: pointer; }
.ab-icon-btn:hover:not(:disabled) { background: var(--colorSubtleBackgroundPressed, #e0e0e0); }
.ab-icon-btn:disabled { color: var(--fg4); opacity: .5; cursor: default; }

/* 导入 */
.ab-import-target { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 16px; }
.ab-import-target .fl-select { width: 100%; }
.ab-import-table { border: 1px solid var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius-lg); max-height: 400px; overflow: auto; font-size: 13px; }
.ab-import-head, .ab-import-line { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr 1fr 1.2fr; gap: 8px; padding: 0 12px; align-items: center; height: 34px; }
.ab-import-head { position: sticky; top: 0; background: var(--surface-alt); font-weight: 600; color: var(--fg2); border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0); }
.ab-import-line + .ab-import-line { border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-import-line.skipped { opacity: .45; }

/* ==========================================================================
   管理中心 › 组织架构
   ========================================================================== */
.org-tabs { display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0); }
.org-tab { position: relative; height: 40px; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--fg2); cursor: pointer; border-radius: var(--radius) var(--radius) 0 0; }
.org-tab:hover { color: var(--fg1); background: var(--hover); }
.org-tab.on { color: var(--fg1); font-weight: 600; }
.org-tab.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 2px; background: var(--brand); }
.org-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.org-tree-card { padding: 12px 8px 8px; position: sticky; top: 0; }
.org-card-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; }
.org-tree { max-height: calc(100vh - 360px); min-height: 200px; overflow-y: auto; }
.org-node { position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding-right: 8px; border-radius: var(--radius); cursor: pointer; font-size: 14px; color: var(--fg1); user-select: none; }
.org-node.root { padding-left: 10px; font-weight: 600; }
.org-node:hover { background: var(--hover); }
.org-node.active { background: var(--brand-soft); color: var(--brand-fg); }
.org-node.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--brand); }
.org-node.unassigned { color: var(--fg2); font-style: normal; }
.org-node .ellipsis { flex: 1; min-width: 0; }
.org-node-toggle { width: 20px; height: 20px; flex: none; border: 0; padding: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; cursor: pointer; }
button.org-node-toggle:hover { background: var(--colorSubtleBackgroundPressed, #e0e0e0); }
.org-node-count { font-size: 12px; color: var(--fg3); font-weight: 400; font-variant-numeric: tabular-nums; }
.org-node-count.warn { color: var(--warning); font-weight: 600; }
.org-tree-actions { display: flex; align-items: center; gap: 2px; padding: 8px 4px 0; margin-top: 8px; border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ab-icon-btn.danger:hover { color: var(--danger); }
.org-people-card { min-width: 0; }
.org-people-title { display: flex; align-items: center; gap: 8px; margin-right: 8px; }
.org-bulk-select { width: 200px; height: 28px; }
.org-table-wrap { max-height: calc(100vh - 300px); overflow: auto; }
.org-table th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.org-table td { padding: 8px 12px; font-size: 13px; }
.org-table .fl-table-primary { color: var(--fg1); }
.org-person { display: inline-flex; flex-direction: column; line-height: 18px; min-width: 0; }
.org-dept-cell { color: var(--fg2); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.org-cell { min-width: 70px; white-space: nowrap; }
.org-cell:hover { box-shadow: inset 0 0 0 1px var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius); }
.org-cell .ab-inline { min-width: 110px; }
.org-hidden td { color: var(--fg3); }
.org-hint { padding: 10px 2px 0; }
.org-editor-add { display: flex; gap: 8px; margin-bottom: 8px; }
.org-editor-add .fl-select { flex: 1; min-width: 0; }
.org-shared-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.org-stat { display: flex; flex-direction: column; min-width: 96px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface-alt); }
.org-stat-num { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--fg1); }
.org-shared-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.org-ad-source { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface-alt); }
.org-template { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.org-diff-summary { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.org-diff-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.org-diff-pill.add { background: #f1faf1; color: #0e700e; }
.org-diff-pill.upd { background: #ebf3fc; color: #0f6cbd; }
.org-diff-pill.same { background: var(--canvas); color: var(--fg3); }
.org-diff-pill.bad { background: #fdf3f4; color: #a4262c; }
.org-diff { border: 1px solid var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius-lg); max-height: calc(100vh - 380px); overflow: auto; }
.org-diff-head, .org-diff-row { display: grid; grid-template-columns: 76px 1.1fr 1fr 1.9fr; gap: 10px; align-items: center; padding: 6px 12px; font-size: 13px; }
.org-diff-head { position: sticky; top: 0; background: var(--surface-alt); font-weight: 600; color: var(--fg2); border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0); height: 34px; }
.org-diff-row + .org-diff-row { border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }

/* ==========================================================================
   写邮件 › 智能收件人
   ========================================================================== */
.compose-pick {
    height: 28px; padding: 0 6px; margin-left: -6px; border: 1px solid transparent; border-radius: var(--radius); background: transparent;
    font: inherit; color: var(--fg2); cursor: pointer; text-align: left; white-space: nowrap; width: auto; min-width: 52px;
}
.compose-pick:hover { background: var(--hover); color: var(--brand-fg); border-color: var(--colorNeutralStroke2, #e0e0e0); }
.compose-pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.sr-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.4); animation: fl-fade .12s; }
.sr-dialog {
    position: fixed; z-index: 81; top: max(24px, calc(50vh - 360px)); left: max(16px, calc(50vw - 560px));
    width: min(1120px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); min-width: 820px; min-height: 520px;
    max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); resize: both; overflow: hidden;
    display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow64, 0 0 8px rgba(0,0,0,.12), 0 32px 64px rgba(0,0,0,.14)); animation: sr-in .16s ease-out;
}
@keyframes sr-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.sr-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 24px; }
.sr-title > div:first-child { font-size: 20px; line-height: 28px; font-weight: 600; }
.sr-close { width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; color: var(--fg2); cursor: pointer; }
.sr-close:hover { background: var(--hover); color: var(--fg1); }
.sr-toolbar { display: flex; align-items: center; gap: 12px; padding: 0 24px 12px; }
.sr-field { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg2); white-space: nowrap; }
.sr-source { width: 220px; }
.sr-search { flex: 1; width: auto; margin: 0; }
.sr-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 0 24px; min-height: 0; }
.sr-list { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--colorNeutralStroke2, #e0e0e0); border-radius: var(--radius-lg); overflow: hidden; }
.sr-grid { flex: 1; overflow: auto; min-height: 0; outline: none; position: relative; }
.sr-grid:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.sr-row {
    display: grid; grid-template-columns: 22px minmax(170px, 1.2fr) minmax(170px, 1.4fr) minmax(110px, 1fr) minmax(80px, .7fr);
    align-items: center; height: 40px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); cursor: default; user-select: none; position: relative;
}
.sr-row:not(.sr-head-row):hover { background: var(--hover); }
.sr-row.selected { background: var(--brand-soft); }
.sr-row.selected:hover { background: var(--colorBrandBackground2Hover, #cfe4fa); }
.sr-row.focused::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.sr-row.member .sr-name { padding-left: 34px; }
.sr-row.member { background: var(--surface-alt); }
.sr-row.member.selected { background: var(--brand-soft); }
.sr-head-row { position: sticky; top: 0; z-index: 2; height: 36px; background: var(--surface-alt); font-weight: 600; color: var(--fg2); border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0); }
.sr-cell { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 8px; font-size: 13px; overflow: hidden; }
.sr-mark { padding: 0 0 0 8px; }
.sr-name { font-weight: 600; font-size: 14px; }
.sr-name-text { display: flex; flex-direction: column; min-width: 0; line-height: 17px; }
.sr-sub { font-size: 11px; font-weight: 400; color: var(--fg3); }
.sr-expand { width: 20px; height: 20px; flex: none; margin-left: -6px; border: 0; padding: 0; border-radius: var(--radius); background: transparent; display: grid; place-items: center; cursor: pointer; }
.sr-expand:hover { background: var(--colorSubtleBackgroundPressed, #e0e0e0); }
.sr-empty { min-height: 280px; }
.sr-list-foot { flex: none; display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; font-size: 12px; color: var(--fg2); border-top: 1px solid var(--colorNeutralStroke2, #e0e0e0); background: var(--surface-alt); }
.sr-legend { display: inline-flex; align-items: center; gap: 4px; color: var(--fg3); }
.sr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sr-dot.f0 { background: #0f6cbd; }
.sr-dot.f1 { background: #13a10e; }
.sr-dot.f2 { background: #8764b8; }

.sr-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sr-detail { flex: none; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface-alt); min-height: 150px; }
.sr-detail-top { display: flex; align-items: center; gap: 12px; }
.sr-group-avatar { width: 48px; height: 48px; background: var(--brand-soft); }
.sr-detail-text { min-width: 0; flex: 1; }
.sr-detail-name { font-size: 16px; font-weight: 600; line-height: 22px; }
.sr-detail-tags { display: flex; gap: 6px; margin-top: 4px; }
.sr-in { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; color: #fff; }
.sr-in-0 { background: #0f6cbd; } .sr-in-1 { background: #13a10e; } .sr-in-2 { background: #8764b8; }
.sr-detail-fields { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 8px; margin: 10px 0 0; font-size: 13px; }
.sr-detail-fields dt { color: var(--fg3); }
.sr-detail-fields dd { margin: 0; }
.sr-detail-empty { height: 120px; display: grid; place-items: center; font-size: 13px; }
.sr-expand-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--brand-fg); font: inherit; font-size: 13px; cursor: pointer; }
.sr-expand-link:hover { text-decoration: underline; }

.sr-target { flex: 1; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; min-height: 0; }
.sr-add {
    align-self: start; display: inline-flex; align-items: center; justify-content: space-between; gap: 4px; height: 32px; padding: 0 10px;
    border: 1px solid var(--colorNeutralStroke1, #d1d1d1); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 14px; font-weight: 600;
    color: var(--fg1); cursor: pointer;
}
.sr-add:hover:not(:disabled) { background: var(--hover); border-color: var(--colorNeutralStroke1Hover, #c7c7c7); }
.sr-add:disabled { color: var(--fg4); cursor: default; }
.sr-box {
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; padding: 5px; min-height: 0; overflow-y: auto; cursor: pointer;
    border: 1px solid var(--colorNeutralStroke1, #d1d1d1); border-radius: var(--radius); background: var(--surface); transition: border-color .1s, box-shadow .1s;
}
.sr-target.active .sr-box { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.sr-target.active .sr-add { border-color: var(--brand); color: var(--brand-fg); }
.sr-box-empty { color: var(--fg4); font-size: 12px; padding: 3px 4px; }
.sr-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 26px; max-width: 100%; padding: 0 2px 0 3px; border-radius: 13px; font-size: 13px;
    background: var(--canvas); border: 1px solid transparent;
}
.sr-chip-0 { background: #ebf3fc; } .sr-chip-1 { background: #f1faf1; } .sr-chip-2 { background: #f6f1fb; }
.sr-chip .ellipsis { max-width: 180px; }
.sr-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--fg3); cursor: pointer; flex: none; }
.sr-chip button:hover { background: rgba(0,0,0,.08); color: var(--fg1); }
.sr-foot { display: flex; align-items: center; gap: 8px; padding: 16px 24px 20px; }
.sr-ctx-overlay { z-index: 90; }
.sr-ctx { z-index: 91; }
.org-diff-detail { display: flex; flex-direction: column; font-size: 12px; line-height: 18px; color: var(--fg2); min-width: 0; }
.org-diff-detail .text-danger { color: var(--danger); }
.org-tree-empty { display: flex; gap: 8px; align-items: flex-start; margin: 8px 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-alt); color: var(--fg3); font-size: 12px; line-height: 18px; }
