/* ==========================================================================
   联系人（对标 Outlook 网页版“人员”）
   左侧分类沿用邮件的 .folder-pane / .tree-item；其余以 ct- 为前缀
   ========================================================================== */
.contacts-app { flex: 1; display: flex; min-height: 0; }
.ct-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ct-panes { flex: 1; display: flex; min-height: 0; }

/* ---------- 左侧分类 ---------- */
.ct-nav .tree-item { height: 36px; }
.ct-nav-count { font-size: 12px; color: var(--fg3); padding: 0 6px; }
.ct-nav .tree-item.active .ct-nav-count { color: var(--fg1); }
.ct-nav-foot { display: flex; gap: 6px; align-items: flex-start; padding: 12px 16px 14px; border-top: var(--pane-border); line-height: 18px; }
.ct-nav-foot svg { flex: none; margin-top: 1px; }

/* ---------- 列表 ---------- */
.ct-list { width: 360px; flex: none; display: flex; flex-direction: column; border-right: var(--pane-border); background: var(--surface); min-height: 0; }
.ct-list-count { font-size: 12px; color: var(--fg3); background: var(--canvas); border-radius: 10px; padding: 0 8px; line-height: 20px; }
.ct-list-body { flex: 1; display: flex; min-height: 0; position: relative; }
.ct-scroll { padding-bottom: 12px; }
.ct-group { color: var(--brand-fg); font-size: 13px; padding: 12px 16px 4px 20px; border-bottom: 1px solid var(--colorNeutralStroke3, #f0f0f0); margin-bottom: 2px; }
.ct-item {
    display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px 0 16px; margin: 0 6px; border-radius: var(--radius);
    cursor: pointer; position: relative; outline: none;
}
.ct-item:hover { background: var(--hover); }
.ct-item:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.ct-item.active { background: var(--brand-soft); }
.ct-item.active::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--brand); }
.ct-item-text { flex: 1; min-width: 0; }
.ct-item-name { font-size: 14px; line-height: 20px; color: var(--fg1); }
.ct-item.active .ct-item-name { font-weight: 600; }
.ct-item-sub { font-size: 12px; line-height: 16px; color: var(--fg3); }

/* 右侧 A–Z 快速跳转 */
.ct-jump { width: 22px; flex: none; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 6px 0; gap: 0; }
.ct-jump button {
    width: 20px; height: 18px; border: 0; padding: 0; background: transparent; border-radius: 3px; cursor: pointer;
    font: inherit; font-size: 10px; font-weight: 600; color: var(--brand-fg); line-height: 18px;
}
.ct-jump button:hover { background: var(--brand-soft); }
.ct-jump button.off { color: var(--colorNeutralForegroundDisabled, #bdbdbd); cursor: default; background: transparent; }

.ct-empty-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- 详情 ---------- */
.ct-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.ct-detail-scroll { flex: 1; overflow-y: auto; padding: 24px 32px 40px; animation: fl-fade .15s; }
.ct-empty-art { width: 96px; height: 96px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 8px; }

.ct-hero {
    display: flex; gap: 24px; align-items: flex-start; padding: 24px 28px; max-width: 920px;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.ct-hero .persona { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--colorNeutralStroke2, #e0e0e0); }
.ct-group-avatar { width: 96px; height: 96px; background: var(--brand-soft); }
.ct-hero-text { flex: 1; min-width: 0; }
.ct-hero-name { font-size: 24px; line-height: 32px; font-weight: 600; margin: 2px 0 2px; word-break: break-word; }
.ct-hero-role { font-size: 14px; color: var(--fg2); }
.ct-hero-dept { font-size: 13px; color: var(--fg3); }
.ct-hero-tags { margin-top: 8px; display: flex; gap: 6px; }
.ct-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }

.ct-badge {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px;
    background: var(--brand-soft); color: var(--brand-fg); white-space: nowrap;
}
.ct-badge.org { background: #f1faf1; color: #0e700e; }

.ct-link-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius);
    border: 1px solid var(--colorNeutralStroke1, #d1d1d1); color: var(--fg1); text-decoration: none; font-weight: 600; background: var(--surface);
}
.ct-link-btn:hover { background: var(--hover); border-color: var(--colorNeutralStroke1Hover, #c7c7c7); }

.ct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; max-width: 920px; }
.ct-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 16px 20px 12px; min-width: 0; }
.ct-card-wide { grid-column: 1 / -1; }
.ct-card h2 { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0 0 8px; }
.ct-row { display: flex; align-items: center; gap: 14px; padding: 8px 4px 8px 0; border-radius: var(--radius); position: relative; }
.ct-row + .ct-row { border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ct-row-icon { flex: none; }
.ct-row-body { flex: 1; min-width: 0; }
.ct-row-label { font-size: 12px; line-height: 16px; color: var(--fg3); }
.ct-row-value { display: block; font-size: 14px; line-height: 20px; color: var(--brand-fg); text-decoration: none; word-break: break-all; }
.ct-row-value:hover { text-decoration: underline; }
.ct-row-value.plain { color: var(--fg1); }
.ct-row-value.plain:hover { text-decoration: none; }
.ct-row-act {
    width: 28px; height: 28px; border: 0; border-radius: var(--radius); background: transparent; color: var(--fg3);
    cursor: pointer; display: grid; place-items: center; opacity: 0;
}
.ct-row:hover .ct-row-act, .ct-row-act:focus-visible { opacity: 1; }
.ct-row-act:hover { background: var(--hover); color: var(--brand-fg); }
.ct-none, .ct-hint { color: var(--fg3); font-size: 13px; padding: 6px 0; }
.ct-inline-link { border: 0; background: transparent; color: var(--brand-fg); cursor: pointer; font: inherit; padding: 0 2px; }
.ct-inline-link:hover { text-decoration: underline; }
.ct-note-text { white-space: pre-wrap; word-break: break-word; line-height: 22px; color: var(--fg1); padding-bottom: 6px; }

/* ---------- 编辑器 ---------- */
.ct-form { display: flex; flex-direction: column; gap: 4px; }
.ct-form-head { display: flex; align-items: center; gap: 16px; padding: 8px 0 16px; border-bottom: var(--pane-border); margin-bottom: 4px; }
.ct-form-preview { min-width: 0; }
.ct-form-preview-name { font-size: 18px; line-height: 24px; font-weight: 600; }
.ct-form-error { margin: 8px 0; }
.ct-form-section { padding: 10px 0 6px; }
.ct-form-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--fg1); }
.ct-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; min-width: 0; }
.ct-field > span { font-size: 13px; color: var(--fg2); }
.ct-field .fl-input { width: 100%; }
.ct-multi { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ct-multi-value { flex: 1; }
.ct-multi-type { width: 96px; flex: none; }
.fl-input.invalid { border-color: var(--danger); border-bottom: 2px solid var(--danger); }
.ct-invalid { color: var(--danger); font-size: 12px; margin: -4px 0 8px 2px; }
.ct-add {
    display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--brand-fg); cursor: pointer;
    font: inherit; padding: 4px 6px; margin-left: -6px; border-radius: var(--radius);
}
.ct-add:hover { background: var(--brand-soft); }
.ct-note { width: 100%; min-height: 96px; }

/* ---------- 导入 ---------- */
.ct-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
    padding: 28px 24px; margin-top: 8px; border: 1.5px dashed var(--colorNeutralStroke1, #d1d1d1); border-radius: var(--radius-lg); background: var(--surface-alt);
}
.ct-drop:hover, .ct-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.ct-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ct-drop-title { font-size: 15px; font-weight: 600; color: var(--fg1); word-break: break-all; }
.ct-import-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 8px; }
.ct-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--fg2); }
.ct-import-list { border: var(--pane-border); border-radius: var(--radius-lg); max-height: 420px; overflow-y: auto; }
.ct-import-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.ct-import-row + .ct-import-row { border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.ct-import-row.skipped { opacity: .5; }

@media (max-width: 1200px) {
    .ct-list { width: 300px; }
    .ct-detail-scroll { padding: 16px; }
}
