* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: #f5f5f5; overflow: hidden; color: #333; font-size: 13px; -webkit-font-smoothing: antialiased; }
.app-container { display: flex; flex-direction: column; height: 100vh; width: 100vw; }
.main-wrapper { display: flex; flex: 1; height: 100vh; overflow: hidden; }

/* Sidebar Nav */
.sidebar-nav { width: 54px; background-color: #2e3a47; display: flex; flex-direction: column; align-items: center; padding-top: 35px; flex-shrink: 0; color: #8f969c; height: 100%; -webkit-app-region: drag; }
.sidebar-nav .nav-item, .sidebar-nav .user-profile-small { -webkit-app-region: no-drag; }
.user-profile-small { margin-bottom: 25px; position: relative; cursor: pointer; }
.avatar-circle.small { width: 34px; height: 34px; border-radius: 4px; background-image: url('http://xccrm.yeluzsb.cn/logo.png'); background-size: cover; }
.online-status { position: absolute; bottom: -2px; right: -2px; width: 12px; height: 12px; background-color: #4caf50; border: 2px solid #2e3a47; border-radius: 50%; }
.main-menu { display: flex; flex-direction: column; width: 100%; gap: 5px; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; width: 100%; cursor: pointer; transition: all 0.2s; gap: 4px; position: relative; }
.nav-item:hover { color: #fff; }
.nav-item:hover .nav-icon { color: #fff; }
.nav-item.active { color: #4caf50; }
.nav-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: #8f969c; transition: color 0.2s; }
.nav-icon svg { width: 100%; height: 100%; }
.nav-item.active .nav-icon { color: #4caf50; }
.nav-text { font-size: 11px; transform: scale(0.95); }
.nav-bottom { margin-top: auto; width: 100%; padding-bottom: 15px; }

/* Customer Sidebar */
.customer-sidebar-toggle {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.customer-sidebar { width: 260px; background-color: #fff; border-right: 1px solid #e6e6e6; display: flex; flex-direction: column; flex-shrink: 0; height: 100%; padding-top: 15px; transition: width 0.2s ease; }
.customer-sidebar.hidden { width: 0; border-right: none; padding: 0; overflow: hidden; }
.create-customer-btn { margin: 0 15px 15px 15px; height: 36px; background-color: #00c853; color: #fff; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; transition: background-color 0.2s; font-weight: 500; }
.create-customer-btn:hover { background-color: #00e676; }
.plus-icon { font-size: 18px; font-weight: 300; }
.customer-categories { padding: 0 0 15px 0; }
.category-item { display: flex; align-items: center; padding: 10px 20px; cursor: pointer; transition: background-color 0.1s; }
.category-item:hover { background-color: #f5f5f5; }
.category-item.active { background-color: #e8f5e9; color: #4caf50; }
.category-icon { width: 18px; height: 18px; margin-right: 10px; display: flex; align-items: center; justify-content: center; color: #666; }
.category-icon svg { width: 100%; height: 100%; }
.category-item.active .category-icon { color: #4caf50; }
.category-name { flex: 1; font-size: 13px; }
.category-arrow { color: #ccc; font-size: 10px; }
.sidebar-divider { height: 1px; background-color: #f0f0f0; margin: 5px 15px; }
.customer-menu { padding: 10px 0 0 0; }
.menu-item { display: flex; align-items: center; padding: 10px 20px; cursor: pointer; transition: background-color 0.1s; }
.menu-item:hover { background-color: #f5f5f5; }
.menu-icon { width: 18px; height: 18px; margin-right: 10px; display: flex; align-items: center; justify-content: center; color: #666; }
.menu-icon svg { width: 100%; height: 100%; }
.menu-name { flex: 1; font-size: 13px; color: #333; }
.menu-arrow { color: #ccc; font-size: 10px; transition: transform 0.2s; }
.menu-arrow.expanded { transform: rotate(180deg); }
.menu-item.expandable { cursor: pointer; }
.menu-submenu { display: none; padding-left: 48px; padding-top: 5px; padding-bottom: 5px; animation: slideDown 0.2s ease-out; }
.menu-submenu.show { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.submenu-item { padding: 8px 0; font-size: 13px; color: #333; cursor: pointer; transition: all 0.1s; position: relative; }
.submenu-item:hover { color: #4caf50; }
.submenu-item.active { background-color: #f5f5f5; color: #333; padding-left: 10px; margin-left: -10px; border-radius: 2px; }
.org-tree { flex: 1; overflow-y: auto; padding: 0 0 10px 0; }
.org-header { display: flex; align-items: center; padding: 10px 20px; cursor: pointer; }
.org-icon { width: 18px; height: 18px; margin-right: 10px; display: flex; align-items: center; justify-content: center; color: #666; }
.org-icon svg { width: 100%; height: 100%; }
.org-name { flex: 1; font-size: 13px; color: #333; }
.org-arrow { color: #ccc; font-size: 10px; }
/* .org-content { padding-left: 10px; } */
.org-item { display: flex; align-items: center; padding: 10px 20px; cursor: pointer; }
.org-item:hover { background-color: #f5f5f5; }
.tree-toggle { width: 16px; font-size: 10px; color: #999; margin-right: 5px; }
.org-item.expanded { background-color: #e3f2fd; border-left: 3px solid #2196f3; padding-left: 12px; }
.org-company-icon { margin-right: 8px; font-size: 14px; color: #5c6bc0; }
.dept-icon { margin-right: 8px; font-size: 14px; color: #78909c; }
.org-children { padding-left: 0; }
.org-person { display: flex; align-items: center; padding: 6px 15px 6px 40px; cursor: pointer; transition: background-color 0.1s; }
.org-person:hover { background-color: #f5f5f5; }
.dept-children .org-person { padding-left: 40px; }
.org-dept, .org-sub-dept { display: flex; align-items: center; padding: 8px 15px 8px 25px; cursor: pointer; transition: background-color 0.1s; }
.org-dept:hover, .org-sub-dept:hover { background-color: #f5f5f5; }
.org-item-name { font-size: 13px; color: #333;flex: 1; }
.person-avatar { width: 24px; height: 24px; border-radius: 4px; margin-right: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: white; flex-shrink: 0; background-size: cover; background-position: center; }
.person-avatar.img-avatar { background-image: url('https://ui-avatars.com/api/?name=User&background=random&color=fff'); }
.person-avatar.text-avatar { background-color: #7c4dff; }
.person-avatar.text-avatar.pink { background-color: #ff4081; }
.person-avatar.text-avatar.blue { background-color: #448aff; }
.person-avatar.img-avatar.yang { background-image: url('https://ui-avatars.com/api/?name=Yang+XJ&background=random&color=fff'); }
.person-name { font-size: 13px; color: #333; }
.sub-dept-children .org-person { padding-left: 55px; }
.sidebar-bottom { display: none; }
.bottom-item { display: flex; align-items: center; padding: 10px 20px; cursor: pointer; }
.bottom-item:hover { background-color: #f5f5f5; }
.bottom-icon { width: 18px; height: 18px; margin-right: 10px; display: flex; align-items: center; justify-content: center; color: #666; }
.bottom-icon svg { width: 100%; height: 100%; }
.bottom-name { font-size: 13px; color: #666; }

/* 创建客户方式菜单 */
.create-menu {
    position: absolute;
    z-index: 2100;
    width: 229px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.create-menu-main {
    height: 48px;
    border: none;
    outline: none;
    background-color: #00c853;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.create-menu-main .plus-icon {
    font-size: 20px;
}
.create-menu-list {
    background-color: #fff;
    padding: 10px 0;
}
.create-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    cursor: pointer;
}
.create-menu-item:hover {
    background-color: #f5f5f5;
}
.create-menu-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background-color: #e8f5e9;
    color: #00c853;
    font-size: 16px;
}
.create-menu-text {
    font-size: 14px;
    color: #333;
}

/* Customer Header & Filter */
.customer-main { flex: 1; display: flex; flex-direction: column; background-color: #fff; overflow: hidden; }
.customer-header { 
    height: 45px; 
    min-height: 45px;
    flex-shrink: 0;
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    border-bottom: 1px solid #e6e6e6; 
    background-color: #fff; 
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-tabs { display: flex; gap: 20px; }
.header-tabs .tab { font-size: 14px; color: #666; cursor: pointer; padding: 10px 0; text-decoration: none; }
.header-tabs .tab.active { color: #4caf50; font-weight: 500; position: relative; }
.header-tabs .tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #4caf50; }
.header-search { flex: 1; display: flex; align-items: center; justify-content: center; max-width: 400px; margin: 0 auto; }
.history-icon { margin-right: 10px; color: #999; }
.header-search-input { width: 300px; height: 32px; border: 1px solid #e0e0e0; border-radius: 16px; padding: 0 15px; font-size: 13px; color: #333; outline: none; }
.header-search-input:focus { border-color: #4caf50; }
.header-controls { display: flex; margin-left: auto; gap:8px;}
.customer-page {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.customer-page.active {
    display: flex !important;
}
.customer-page:not(.active) {
    display: none !important;
}
.tag-page {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
.tag-page.active {
    display: flex !important;
}

/* 左侧主导航隐藏项 */
.nav-item.nav-hide {
    display: none;
}

/* 客户标签管理样式（按照 标签页.html 复刻） */
.tag-page .tag-management-container {
    padding: 20px;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Tab Header - 使用更具体的选择器避免冲突 */
#tagMainPage .tabs-header,
.tag-page .tabs-header {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
#tagMainPage .tab-item,
.tag-page .tab-item {
    padding: 0 0 12px 0;
    margin-right: 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    position: relative;
}
#tagMainPage .tab-item.active,
.tag-page .tab-item.active {
    color: #1890ff;
}
#tagMainPage .tab-item.active::after,
.tag-page .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1890ff;
}

/* Description - 使用更具体的选择器避免冲突 */
#tagMainPage .description,
.tag-page .description {
    margin-bottom: 16px;
    color: #999;
    font-size: 14px;
}
#tagMainPage .description a,
.tag-page .description a {
    margin-left: 5px;
    color: #1890ff;
    text-decoration: none;
    cursor: pointer;
}
#tagMainPage .description a:hover,
.tag-page .description a:hover {
    color: #40a9ff;
}

/* Main Panel - 使用更具体的选择器避免冲突 */
#tagMainPage .main-panel,
.tag-page .main-panel {
    display: flex;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    height: calc(100% - 53px);
}

/* Sidebar - 使用更具体的选择器避免与全局 sidebar 冲突 */
#tagMainPage .sidebar,
.tag-page .sidebar {
    width: 260px;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}
.tag-page .sidebar-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}
.tag-page .sidebar-title {
    font-weight: 500;
    color: #333;
    font-size: 16px;
}
.tag-page .btn-add-group {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 2px;
    transition: all 0.3s;
    cursor: pointer;
}
.tag-page .btn-add-group:hover {
    color: #1890ff;
    border-color: #1890ff;
}
.tag-page .group-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 5px;
}
.tag-page .group-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.2s;
    position: relative;
}
.tag-page .group-item:hover {
    background-color: #f5f5f5;
}
.tag-page .group-item.active {
    background-color: #e6f7ff;
    border-left-color: #1890ff;
}
.tag-page .folder-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    fill: currentColor;
    transition: color 0.3s;
}
.tag-page .group-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}
.tag-page .drag-handle {
    display: none;
    color: #999;
    font-size: 16px;
}
.tag-page .group-item:hover .drag-handle {
    display: block;
}

/* Content Area - 使用更具体的选择器避免冲突 */
#tagMainPage .content,
.tag-page .content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}
#tagMainPage .content-header,
.tag-page .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}
#tagMainPage .content-title,
.tag-page .content-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#tagMainPage .content-header a,
.tag-page .content-header a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}
#tagMainPage .content-header a:hover,
.tag-page .content-header a:hover {
    color: #1890ff;
}

/* Form Area - 使用更具体的选择器避免冲突 */
#tagMainPage .form-row,
.tag-page .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}
#tagMainPage .form-label,
.tag-page .form-label {
    width: 80px;
    color: #999;
    margin-right: 10px;
    text-align: left;
}
#tagMainPage .input-group,
.tag-page .input-group {
    display: flex;
}
#tagMainPage .form-input,
.tag-page .form-input {
    width: 320px;
    height: 32px;
    padding: 4px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 2px 0 0 2px;
    outline: none;
    transition: all 0.3s;
    font-size: 14px;
}
#tagMainPage .form-input:focus,
.tag-page .form-input:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.tag-page .btn-save {
    height: 32px;
    padding: 0 15px;
    background-color: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
    border-radius: 0 2px 2px 0;
    margin-left: -1px;
    cursor: pointer;
}
.tag-page .btn-save:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* Color Preview */
.tag-page .color-preview {
    width: 32px;
    height: 32px;
    background-color: #ff7875;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

/* Color Palette Popover */
.tag-page .color-palette-popover {
    position: absolute;
    top: 40px;
    left: 90px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 10px;
    width: 280px;
    z-index: 10;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-page .color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Radio Group - 使用更具体的选择器，确保单选按钮显示 */
#tagMainPage .radio-group,
.tag-page .radio-group {
    display: flex;
    align-items: center;
}
#tagMainPage .radio-label,
.tag-page .radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0;
}
#tagMainPage .radio-label input[type="radio"],
.tag-page .radio-label input[type="radio"] {
    margin-right: 6px;
    display: inline-block;
    width: auto;
    height: auto;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: radio;
    -moz-appearance: radio;
}

/* Tag Manager Area - 使用更具体的选择器 */
#tagMainPage .tag-manager,
.tag-page .tag-manager {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#tagMainPage .tag-toolbar,
.tag-page .tag-toolbar {
    background-color: #f7f8fa;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
#tagMainPage .btn-add-tag,
.tag-page .btn-add-tag {
    background: #fff;
    border: 1px solid #d9d9d9;
    padding: 5px 15px;
    font-size: 14px;
    color: #333;
    border-radius: 2px;
    cursor: pointer;
}
#tagMainPage .btn-add-tag:hover,
.tag-page .btn-add-tag:hover {
    color: #1890ff;
    border-color: #1890ff;
}
#tagMainPage .tag-toolbar a,
.tag-page .tag-toolbar a {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}
#tagMainPage .tag-toolbar a:hover,
.tag-page .tag-toolbar a:hover {
    color: #40a9ff;
}

/* Tags Container - 按照原始模板，只保留基本样式 */
#tagMainPage .tags-container,
.tag-page .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.tag-page .tag-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 5px 0 10px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 2px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.tag-page .tag-chip:hover {
    color: #1890ff;
    border-color: #1890ff;
}
.tag-page .tag-arrow {
    padding: 0 5px;
    margin-left: 4px;
    font-size: 12px;
    color: #ccc;
    transform: scale(0.8);
    display: flex;
    align-items: center;
    height: 100%;
}
.tag-page .tag-chip:hover .tag-arrow {
    color: #1890ff;
}
.tag-page .tag-arrow:hover {
    background-color: #f0f0f0;
    border-radius: 2px;
}

/* Tag Dropdown Menu */
.tag-page .tag-dropdown-menu {
    position: absolute;
    width: 140px;
    background: #fff;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 2px;
    border: 1px solid #f0f0f0;
    z-index: 100;
    display: none;
    padding: 4px 0;
}
.tag-page .tag-menu-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.tag-page .tag-menu-item:hover {
    background-color: #f5f5f5;
    color: #1890ff;
}
.tag-page .menu-icon {
    margin-right: 8px;
    font-size: 12px;
    width: 14px;
    text-align: center;
    color: #666;
}
.tag-page .tag-menu-item:hover .menu-icon {
    color: #1890ff;
}
.tag-page .menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* Batch Mode */
.tag-page .hidden {
    display: none !important;
}
.tag-page .batch-tag-item {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px 0 5px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 2px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}
.tag-page label.batch-tag-item input[type="checkbox"] {
    margin-right: 5px;
}

/* Footer Help */
.tag-page .footer-help {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
}
.tag-page .help-icon {
    color: #999;
    margin-right: 6px;
    font-size: 16px;
}
.tag-page .help-content {
    font-size: 12px;
    color: #999;
    line-height: 1.8;
}
.tag-page .help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Modal Styles - 确保标签页模态框样式优先级更高 */
#tagMainPage .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}
#tagMainPage .modal-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 520px;
    display: flex;
    flex-direction: column;
    height: auto;
}
.tag-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}
.tag-page .modal-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 520px;
    display: flex;
    flex-direction: column;
}
.tag-page .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.tag-page .modal-close {
    cursor: pointer;
    color: #999;
    font-size: 20px;
    line-height: 1;
}
.tag-page .modal-close:hover {
    color: #666;
}
.tag-page .modal-body {
    padding: 24px;
    font-size: 14px;
    color: #333;
    display: block;
}
.tag-page .modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}
.tag-page .btn-modal-cancel {
    background: #fff;
    border: 1px solid #d9d9d9;
    padding: 6px 15px;
    border-radius: 2px;
    color: #333;
    margin-right: 8px;
    cursor: pointer;
}
.tag-page .btn-modal-ok {
    background: #1890ff;
    border: 1px solid #1890ff;
    padding: 6px 15px;
    border-radius: 2px;
    color: #fff;
    cursor: pointer;
}
.tag-page .btn-modal-ok:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}
.tag-page .btn-modal-cancel:hover {
    color: #1890ff;
    border-color: #1890ff;
}
.tag-page .modal-input {
    width: 100%;
    height: 32px;
    border: 1px solid #d9d9d9;
    padding: 0 11px;
    border-radius: 2px;
    outline: none;
    margin-bottom: 10px;
}
.tag-page .modal-input:focus {
    border-color: #40a9ff;
}
.tag-page .input-hint {
    color: #999;
    font-size: 12px;
    margin-bottom: 20px;
    display: block;
}
.tag-page .import-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 20px;
}
.tag-page .import-table th,
.tag-page .import-table td {
    border: 1px solid #e8e8e8;
    padding: 8px 12px;
    text-align: left;
}
.tag-page .import-table th {
    background: #fafafa;
    font-weight: 500;
    color: #333;
}
.tag-page .import-table td {
    color: #666;
}

/* 客户导入弹框（复用标签页样式，但不受 tag-page 的 display 影响） */
#customerImportModal.tag-page {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
#customerImportModal.tag-page[style*="display: flex"],
#customerImportModal.tag-page[style*="display:flex"] {
    display: flex !important;
}

/* 同事页布局（基于 管理员列表.html） */
.colleague-page {
    flex: 1;
    display: none;
    flex-direction: row;
    background-color: #fff;
}
.colleague-page.active {
    display: flex;
}
.colleague-page .sidebar-list {
    width: 240px;
    background-color: #f7f8fa;
    border-right: 1px solid #e6e6e6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}
.colleague-page .search-section {
    padding: 12px;
    padding-top: 15px;
    display: flex;
    gap: 8px;
    background-color: #f7f8fa;
    position: relative;
}
.colleague-page .search-box {
    flex: 1;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    transition: border-color 0.2s;
}
.colleague-page .search-box:hover,
.colleague-page .search-box:focus-within {
    border-color: #4caf50;
}
.colleague-page .search-icon {
    width: 14px;
    height: 14px;
    color: #ccc;
    margin-right: 6px;
    display: flex;
}
.colleague-page .search-input {
    border: none;
    outline: none;
    font-size: 12px;
    width: 100%;
    color: #333;
}
.colleague-page .add-button {
    width: 28px;
    height: 28px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.colleague-page .add-button svg {
    width: 14px;
    height: 14px;
}
.colleague-page .company-header {
    padding: 8px 15px 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.colleague-page .count-badge {
    color: #bbb;
    font-size: 12px;
    font-weight: normal;
}
.colleague-page .colleagues-tree {
    flex: 1;
    overflow-y: auto;
}
.colleague-page .colleague-item,
.colleague-page .department-header {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background-color 0.1s;
}
.colleague-page .colleague-item:hover,
.colleague-page .department-header:hover {
    background-color: #ebedef;
}
.colleague-page .colleague-item.selected {
    background-color: #e5effd;
}
.colleague-page .colleague-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
    font-weight: 500;
}
.colleague-page .department-header {
    justify-content: flex-start;
}
.colleague-page .department-name {
    flex: 1;
}
.colleague-page .arrow {
    font-size: 10px;
    margin-right: 8px;
    color: #999;
    width: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.colleague-page .main-content {
    flex: 1;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    position: relative;
    padding-top: 100px;
    height: 100%;
}
.colleague-page .content-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 0 0;
    z-index: 100;
}
.colleague-page .content-header .header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap:8px;margin-right: 15px;
}
.colleague-page .profile-card {
    width: 420px;
}
.colleague-page .profile-main-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}
.colleague-page .profile-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    font-weight: 600;
}
.colleague-page .profile-name {
    font-size: 22px;
    font-weight: 600;
    color: #000;
}
.colleague-page .profile-title {
    font-size: 12px;
    color: #666;
}
.colleague-page .profile-path {
    font-size: 12px;
    color: #999;
}
.colleague-page .action-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}
.colleague-page .action-btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f6fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.colleague-page .action-btn-circle svg {
    width: 20px;
    height: 20px;
}
.colleague-page .info-list {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}
.colleague-page .info-row {
    display: flex;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
}
.colleague-page .info-label {
    width: 60px;
    color: #999;
    letter-spacing: 2px;
    margin-right: 20px;
}
.colleague-page .info-value {
    color: #333;
    font-weight: 500;
}
.colleague-page .settings-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}
.colleague-page .setting-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 13px;
}
.colleague-page .setting-label {
    width: 80px;
    color: #999;
    margin-right: 20px;
    flex-shrink: 0;
}
.colleague-page .setting-desc {
    margin-left: 100px;
    font-size: 12px;
    color: #ccc;
    margin-top: -10px;
    margin-bottom: 10px;
}
.filter-panel { 
    margin: 15px; 
    background-color: #fff; 
    border-bottom: 1px solid #e6e6e6; 
    flex-shrink: 0;
}
.view-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.view-left { display: flex; align-items: center; gap: 10px; }
.view-icon { color: #666; }
.view-text { font-size: 13px; color: #333; }
.custom-filter { font-size: 13px; color: #333; cursor: pointer; }
.view-right { display: flex; gap: 20px; }
.filter-type { font-size: 13px; color: #666; cursor: pointer; position: relative; padding-bottom: 5px; }
.filter-type.active { color: #333; font-weight: 500; position: relative; }
.filter-type.active::after { content: ''; position: absolute; bottom: -5px; left: 0; right: 0; height: 2px; background-color: #4caf50; }
.ai-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 11px; margin-right: 3px; }
.filter-conditions {
    background-color: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    padding: 12px 0 10px 0;
    /* margin: 4px 12px 0 12px; */
}
.filter-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 16px; font-size: 13px; color: #666; }
.filter-match-select { border: none; background: transparent; padding: 0 4px; font-size: 13px; color: #4285f4; cursor: pointer; font-weight: 500; }
.filter-select { height: 30px; border: 1px solid #e0e0e0; border-radius: 2px; padding: 0 25px 0 10px; font-size: 13px; color: #333; background-color: #fff; min-width: 100px; }
.filter-input { flex: 1; height: 30px; border: 1px solid #e0e0e0; border-radius: 2px; padding: 0 10px; font-size: 13px; color: #333; min-width: 200px; }
.filter-btn { background-color: #00c853; color: #fff; border: none; border-radius: 2px; padding: 6px 20px; font-size: 13px; cursor: pointer; margin: 0 20px 0 20px; }
.filter-btn:hover { background-color: #00e676; }
.add-condition { margin-left: auto; color: #666; cursor: pointer; font-size: 13px; border: 1px solid #e0e0e0; padding: 4px 10px; border-radius: 2px; }
.add-condition:hover { background-color: #f5f5f5; text-decoration: none; }
.filter-tip { font-size: 12px; color: #999; padding: 0 20px; display: inline-block; margin-top: 10px; }
.filter-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 0 16px; }
.filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    position: relative;
}
.filter-tag { display: inline-flex; align-items: center; padding: 4px 12px; background-color: #e8f5e9; color: #4caf50; border-radius: 2px; font-size: 13px; white-space: nowrap; }
.filter-select { min-width: 140px; }

.filter-value.owner-value-editable {
    cursor: text;
    outline: none;
    min-height: 1.2em;line-height: 30px;
}

.filter-value.owner-value-editable:focus {
    outline: 1px solid #1890ff;
    outline-offset: -1px;
}

.filter-value {
    flex: 1;
    height: 30px;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
    padding: 0 10px;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    background-color: #fff;
}
.filter-value:hover {
    border-color: #4caf50;
}
.filter-value-input {
    flex: 1;
    height: 30px;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
    padding: 0 10px;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.filter-value-input:focus {
    border-color: #4caf50;
}
.filter-value-input::placeholder {
    color: #999;
}
.filter-select.filter-select-trigger:hover { border-color: #4caf50; }

.filter-clear-icon,
.filter-remove-icon {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
    display: none;
}
.filter-remove-icon {
    right: 10px;
}
.filter-row:hover .filter-clear-icon,
.filter-row:hover .filter-remove-icon {
    display: inline;
}
.filter-clear-icon:hover,
.filter-remove-icon:hover {
    color: #666;
}
.help-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background-color: #e0e0e0; color: #999; font-size: 11px; cursor: help; margin-left: 5px; }
.results-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px 15px 0; margin-top: 15px; border-top: 1px solid #f0f0f0; }
.results-count { font-size: 13px; color: #333; }
.results-selected { display: flex; align-items: center; gap: 15px; }
.selected-count { font-size: 13px; color: #333; }
.batch-operations-wrapper { position: relative; }
.batch-operations-btn {
    padding: 6px 16px;
    background-color: #00c853;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.batch-operations-btn:hover {
    background-color: #00b14a;
}
.batch-operations-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    width: 220px;
    max-height: 500px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}
.batch-operations-dropdown[style*="position: fixed"] {
    position: fixed !important;
    max-height: calc(100vh - 20px);
}
.batch-operations-dropdown.show {
    display: block;
}
.batch-operations-dropdown[style*="position: fixed"] {
    position: fixed !important;
}
.batch-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}
.batch-cancel-btn {
    color: #00c853;
    cursor: pointer;
    font-size: 13px;
}
.batch-cancel-btn:hover {
    color: #00b14a;
    text-decoration: underline;
}
.batch-dropdown-body {
    max-height: 500px;
    overflow-y: auto;
}
.batch-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 13px;
    color: #333;
    position: relative;
    border-bottom: 1px solid #f5f5f5;
}
.batch-menu-item:last-child {
    border-bottom: none;
}
.batch-menu-item:hover {
    background-color: #f5f5f5;
}
.batch-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}
.batch-menu-text {
    flex: 1;
}
.batch-menu-arrow {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
    flex-shrink: 0;
}
.results-actions { display: flex; gap: 20px; }
.action-link { font-size: 13px; color: #4285f4; cursor: pointer; }
.action-link:hover { text-decoration: underline; }

/* 下拉面板：客户进展 & 标签选择 */
.filter-dropdown-panel {
    position: absolute;
    z-index: 1500;
    min-width: 480px;
    max-width: 720px;
    max-height: 420px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    display: none;
    overflow: hidden;
}
.filter-dropdown-panel[style*="flex-direction"] {
    display: flex;
}
.filter-dropdown-header {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-dropdown-header input {
    flex: 1;
    height: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 0 12px;
    font-size: 12px;
}
.filter-dropdown-body {
    padding: 10px 16px 14px 16px;
    max-height: 360px;
    overflow-y: auto;
    font-size: 13px;
}
.filter-dropdown-footer {
    flex-shrink: 0;
}
.filter-dropdown-section-title {
    font-weight: 500;
    margin-bottom: 8px;
}
.filter-dropdown-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-dropdown-option input {
    cursor: pointer;
}
.filter-dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tag-chip {
    padding: 6px 12px;
    border-radius: 3px;
    background-color: #f5f5f5;
    cursor: pointer;
    white-space: nowrap;
}
.filter-tag-chip.selected {
    background-color: #e8f5e9;
    color: #4caf50;
}

/* 标签面板中的分类块和筛选方式 */
.filter-tag-section {
    margin-bottom: 14px;
}
.filter-tag-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.filter-tag-section-title {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.filter-tag-section-title .section-arrow {
    font-size: 10px;
    color: #999;
}
.filter-tag-section-body {
    margin-left: 0;
}
.filter-mode {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}
.filter-mode-text {
    color: #333;
}
.filter-mode-dropdown {
    position: absolute;
    z-index: 1600;
    min-width: 120px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 6px 0;
    font-size: 13px;
    display: none;
}
.filter-mode-dropdown-item {
    padding: 6px 12px;
    cursor: pointer;
}
.filter-mode-dropdown-item:hover {
    background-color: #f5f5f5;
}

/* 添加过滤条件弹层 */
.filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
.filter-modal {
    width: 640px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}
.filter-modal-header {
    height: 44px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.filter-modal-title {
    font-size: 14px;
    font-weight: 500;
}
.filter-modal-close {
    cursor: pointer;
    font-size: 18px;
    color: #999;
}
.filter-modal-close:hover {
    color: #666;
}
.filter-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    font-size: 13px;
}
.filter-modal-section-title {
    font-weight: 500;
    margin-bottom: 10px;
}
.filter-modal-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}
.filter-modal-option input {
    cursor: pointer;
}
.filter-modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 10px 16px;
    text-align: right;
}
.filter-modal-btn {
    min-width: 70px;
    height: 30px;
    border-radius: 3px;
    border: 1px solid #d0d0d0;
    background-color: #fff;
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
}
.filter-modal-btn.primary {
    background-color: #00c853;
    border-color: #00c853;
    color: #fff;
}
.filter-modal-btn.primary:hover {
    background-color: #00b14a;
}

/* Table */
.data-table-container { 
    flex: 1 1 0;
    overflow-y: auto !important;
    overflow-x: auto; /* 改为auto，允许横向滚动，防止列宽被压缩 */
    min-height: 0;
    max-height: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding: 0 15px; 
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.data-table thead { background-color: #fafafa; position: sticky; top: 0; z-index: 10; }
.data-table th { padding: 12px 10px; text-align: left; font-weight: 500; color: #666; border-bottom: 1px solid #e6e6e6; white-space: nowrap; vertical-align: middle; }
.data-table td { padding: 12px 10px; vertical-align: middle; }
.data-table tbody tr { min-height: 56px; border-bottom: 1px solid #f0f0f0; }
.data-table tr:hover { background-color: #f9f9f9; }
.col-checkbox { width: 50px; text-align: center; }
.data-table th.col-checkbox, .data-table td.col-checkbox { text-align: center; padding: 12px 5px; }
.data-table td.col-checkbox input[type="checkbox"] { margin: 0; cursor: pointer; }
.col-more { width: 40px; text-align: center; padding: 12px 5px; }
.data-table th.col-more { padding: 12px 5px; }
.row-more-icon {
    display: none;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: absolute;
    width: 0;
    margin-top: -14px;
}
.data-row:hover .row-more-icon {
    display: inline-block;
}
.row-more-icon:hover {
    background-color: #f0f0f0;
    color: #333;
}
/* 列宽定义 - 表头和表体统一使用 */
.col-name { width: 150px; min-width: 30px; }
.col-major { width: 150px; min-width: 30px; }
.col-tools { width: 60px; min-width: 30px; text-align: center; }
.data-table th.col-tools, .data-table td.col-tools { text-align: center; }
.col-tags { min-width: 30px; }
.col-owner { width: 120px; min-width: 30px; }
.col-time { width: auto; min-width: 200px; }

/* 可调整列宽功能 */
.data-table th.resizable {
    position: relative;
    user-select: none;
}
.data-table th.resizable .th-content {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.data-table th.resizable .resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 1;
    background: transparent;
    transition: background-color 0.2s;
}
.data-table th.resizable .resizer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background-color: #f5f5f5;
    transition: background-color 0.2s;
}
.data-table th.resizable .resizer:hover {
    background-color: rgba(24, 144, 255, 0.1);
}
.data-table th.resizable .resizer:hover::before {
    background-color: #1890ff;
    width: 2px;
}
.data-table th.resizable .resizer.resizing {
    background-color: rgba(24, 144, 255, 0.1);
}
.data-table th.resizable .resizer.resizing::before {
    background-color: #1890ff;
    width: 2px;
}
.data-table th.resizable:last-child .resizer {
    display: none; /* 最后一列不需要调整器 */
}

/* 工具列样式 */
.row-tools { 
    vertical-align: middle; 
    text-align: center; 
}
.tools-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 4px; 
    width: 40px; 
    margin: 0 auto; 
}
.tool-icon { width: 16px; height: 16px; color: #999; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 2px; }
.tool-icon:hover { background-color: #f0f0f0; color: #333; }
.tool-icon svg { width: 14px; height: 14px; }

/* 客户名称列样式 */
.customer-name { 
    /* display: flex;  */
    align-items: center; 
    gap: 10px; 
}
.customer-name.clickable { cursor: pointer; }
.customer-name.clickable:hover { color: #4caf50; }
.customer-avatar { width: 32px; height: 32px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; background-color: #7c4dff; }
.customer-avatar.img-avatar { background-image: url('https://ui-avatars.com/api/?name=User&background=random&color=fff'); background-size: cover; }
.customer-avatar.text-avatar { background-color: #7c4dff; }
.customer-avatar.text-avatar.pink { background-color: #ff4081; }
.customer-avatar.text-avatar.blue { background-color: #448aff; }

/* 标签列样式 */
.tags-cell { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 4px; 
    align-items: center; 
}
.tag { display: inline-block; padding: 4px 12px; border-radius: 2px; font-size: 11px; white-space: nowrap; line-height: 1.4; }
.tag-orange { background-color: #ff9800; color: #fff; }
.tag-yellow { background-color: #ffc107; color: #333; }
.tag-red { background-color: #f44336; color: #fff; }
.tag-purple { background-color: #9c27b0; color: #fff; }
.tag-gray { background-color: #9e9e9e; color: #fff; }
.tag-blue { background-color: #2196f3; color: #fff; }
.tag-cyan { background-color: #00bcd4; color: #fff; }
.tag-green { background-color: #4caf50; color: #fff; }
.tag-teal { background-color: #009688; color: #fff; }
.tag-pink { background-color: #e91e63; color: #fff; }
.owner-cell { 
    font-size: 13px; 
    color: #333; 
}
.time-cell { 
    font-size: 12px; 
    color: #333; 
    position: relative; 
    padding-right: 35px;
}
.time-cell-content { 
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.time-note { 
    color: #999; 
    font-size: 11px; 
    line-height: 1.2;
}
.activity-view-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.data-row:hover .activity-view-icon {
    display: flex;
}
.activity-view-icon:hover {
    background-color: #f0f0f0;
    color: #333;
}
.activity-view-icon svg {
    width: 16px;
    height: 16px;
}
.table-footer { 
    height: 40px; 
    min-height: 40px;
    max-height: 40px;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex !important; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
    background-color: #fafafa; 
    border-top: 1px solid #e6e6e6; 
    visibility: visible !important;
    opacity: 1 !important;
}
.footer-left { font-size: 12px; color: #999; display: flex; align-items: center; gap: 5px; }
.update-time { cursor: pointer; display: flex; align-items: center; gap: 5px; }
.footer-right { display: flex; align-items: center; gap: 15px; font-size: 12px; color: #666; }
.record-count { color: #666; }
.page-info { cursor: pointer; color: #666; }
.page-nav { cursor: pointer; color: #999; display: flex; gap: 5px; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-overlay.show { display: flex; animation: modalFadeIn 0.2s ease-out; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-container { width: 980px; max-width: 95vw; height: 85vh; max-height: 800px; background-color: #fff; border-radius: 4px; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.2); animation: modalSlideIn 0.2s ease-out; }
@keyframes modalSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.customer-detail-modal { width: 1200px; max-width: 95vw; height: 90vh; max-height: 900px; position: relative; transition: transform 0.1s ease-out; }
.customer-detail-modal .modal-header { cursor: grab; user-select: none; }
.customer-detail-modal .modal-header:active { cursor: grabbing; }
.modal-header { height: 48px; background-color: #fff; border-bottom: 1px solid #e6e6e6; display: flex; justify-content: space-between; align-items: center; padding: 0 0 0 20px; flex-shrink: 0; }
.modal-title { font-size: 14px; font-weight: 500; color: #333; }
.modal-header-actions { display: flex; align-items: center; height: 100%; }
.modal-icon { width: 40px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: background-color 0.1s; }
.modal-icon:hover { background-color: #f0f0f0; }
.modal-icon.modal-close:hover { background-color: #e81123; color: white; }
.modal-icon svg { width: 16px; height: 16px; }
.modal-divider { width: 1px; height: 20px; background-color: #e0e0e0; margin: 0 5px; }
.modal-nav-icon { width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: background-color 0.1s; font-size: 16px; font-weight: 300; }
.modal-nav-icon:hover { background-color: #f0f0f0; }
.phone-icon { color: #4caf50; }
.phone-icon:hover { background-color: #e8f5e9; }
.phone-icon svg { width: 18px; height: 18px; }
.modal-body { flex: 1; display: flex; overflow: hidden; }
.customer-detail-body { display: flex; overflow: hidden; gap: 0; }
/* 左侧详情区域 */
.profile-left {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}
/* 顶部工具栏 */
.profile-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.nav-btn-group {
    display: flex;
    gap: 10px;
}
.nav-btn {
    width: 32px;
    height: 32px;
    background: #f7f8fa;
    border-radius: 4px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}
.nav-btn:hover {
    background: #e6f7ff;
    color: #1890ff;
    border-color: #1890ff;
}
/* Profile Header - 客户详情弹窗内 */
.customer-detail-modal .profile-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
    display: block;
    margin-bottom:0;
}
.header-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.user-info {
    display: flex;
    gap: 15px;
}
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffccc7 0%, #ff7875 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 28px;
    font-weight: 500;
    flex-shrink: 0;
}
.user-details h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}
.user-meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}
/* 状态条 - 客户详情弹窗内 */
.customer-detail-modal .status-container {
    position: relative;
    display: inline-block;
}
.customer-detail-modal .status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #1890ff;
    cursor: pointer;
}
.customer-detail-modal .progress-bar {
    width: 150px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    gap: 1px;
}
.customer-detail-modal .progress-segment {
    height: 100%;
    flex: 1;
    background: #d9d9d9;
}
.customer-detail-modal .progress-segment.active {
    background: #00b96b;
}
.customer-detail-modal .status-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 120px;
    display: none;
    padding: 5px 0;
    margin-top: 5px;
    background: #fff;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
.customer-detail-modal .status-item {
    padding: 8px 15px;
    cursor: pointer;
    color: #333;
    font-size: 13px;
}
.customer-detail-modal .status-item:hover {
    background: #f5f5f5;
    color: #1890ff;
}
/* 操作按钮组 - 客户详情弹窗内 */
.customer-detail-modal .action-group {
    display: flex;
    gap: 10px;
}
.customer-detail-modal .action-wrapper {
    position: relative;
}
.customer-detail-modal .icon-btn.danger {
    color: #ff4d4f;
}
.customer-detail-modal .icon-btn.danger:hover {
    background-color: #fff1f0;
}
.customer-detail-modal .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #f0f2f5;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 18px;
}
.customer-detail-modal .icon-btn:hover {
    background: #e8e8e8;
}
.customer-detail-modal .icon-btn.primary {
    background: #00c853;
    color: #fff;
}
.customer-detail-modal .icon-btn.primary:hover {
    background: #00a844;
}
.customer-detail-modal .icon-btn.magic {
    border: 1px solid #00b96b;
    color: #00b96b;
    background: #fff;
}
.customer-detail-modal .icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
/* 弹窗样式 - 客户详情弹窗内 */
.customer-detail-modal .phone-popup {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: 15px;
    display: none;
    text-align: center;
    background: #fff;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
.customer-detail-modal .phone-popup::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}
.customer-detail-modal .action-menu {
    position: absolute;
    top: 110%;
    right: 0;
    width: 140px;
    display: none;
    padding: 5px 0;
    background: #fff;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
.customer-detail-modal .menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #333;
    font-size: 13px;
}
.customer-detail-modal .menu-item:hover {
    background: #f5f5f5;
    color: #1890ff;
}
/* 标签区域 - 客户详情弹窗内 */
.customer-detail-modal .tag-area {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.customer-detail-modal .tag {
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    color: #fff;
    cursor: default;
}
.customer-detail-modal .tag-red {
    background: #ff7875;
}
.customer-detail-modal .tag-purple {
    background: #9254de;
}
.customer-detail-modal .tag-green {
    background: #73d13d;
}
.customer-detail-modal .tag-blue {
    background: #40a9ff;
}
.customer-detail-modal .tag-btn {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.customer-detail-modal .tag-btn:hover {
    color: #1890ff;
    border-color: #1890ff;
}
/* Nav Tabs - 客户详情弹窗内 */
.customer-detail-modal .nav-tabs {
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid #e8e8e8;
    margin-top: 10px;
    flex-shrink: 0;
}
/* Nav Tabs - 客户详情弹窗内 */
.customer-detail-modal .nav-tabs .nav-item {
    padding: 12px 0;
    margin-right: 24px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    position: relative;
    display: block;
    width: auto;
    height: auto;
}
.customer-detail-modal .nav-tabs .nav-item.active {
    color: #00b96b;
}
.customer-detail-modal .nav-tabs .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00b96b;
}
/* 客户信息卡片 */
.info-card {
    padding: 20px;
    flex: 1;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.card-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-percent {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}
.card-actions {
    display: flex;
    gap: 10px;
}
.action-icon {
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.action-icon:hover {
    background: #f5f5f5;
    color: #1890ff;
}
.action-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
/* 视图样式 */
.info-body.simple .field-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
}
.info-body.simple .field-label {
    width: 100px;
    color: #999;
}
.info-body.simple .field-value {
    flex: 1;
    color: #333;
}
.info-body.simple .basic-info-title {
    padding: 10px 0;
    font-weight: 500;
    cursor: pointer;
    color: #333;
}
.info-body.expanded {
    border: 1px solid #e8e8e8;
    border-bottom: none;
    margin-top: 10px;
}
.info-body.expanded .field-row {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
}
.info-body.expanded .field-label {
    width: 120px;
    background: #f7f8fa;
    padding: 10px 15px;
    color: #666;
    border-right: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
}
.info-body.expanded .field-value {
    flex: 1;
    padding: 10px 15px;
    color: #333;
    min-height: 42px;
    display: flex;
    align-items: center;
    background: #fff;
}
.info-body.expanded .basic-info-title {
    padding: 10px 0;
    font-weight: bold;
    font-size: 15px;
    color: #333;
}
.info-body.editing .field-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.info-body.editing .field-label {
    width: 100px;
    color: #666;
    text-align: left;
}
.info-body.editing .field-input-wrap {
    flex: 1;
}
.info-body.editing .basic-info-title {
    padding: 0 0 15px 0;
    font-weight: bold;
    font-size: 15px;
    color: #333;
}
.form-input {
    width: 100%;
    height: 32px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 0 10px;
    outline: none;
    transition: all 0.2s;
}
.form-input:focus {
    border-color: #00b96b;
    box-shadow: 0 0 0 2px rgba(0, 185, 107, 0.2);
}
.radio-group {
    display: flex;
    gap: 20px;
}
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.radio-label input {
    margin-right: 6px;
}
.required {
    color: #ff4d4f;
    margin-left: 4px;
}
.star-rating .filled {
    color: #faad14;
}
.star-rating .empty {
    color: #e8e8e8;
}
.star-rating-edit {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.star-rating-edit input[type="radio"] {
    display: none;
}
.star-rating-edit .star-label {
    font-size: 20px;
    cursor: pointer;
    color: #e8e8e8;
    transition: color 0.2s;
    user-select: none;
}
.star-rating-edit .star-label.filled {
    color: #faad14;
}
.star-rating-edit input[type="radio"]:checked ~ .star-label,
.star-rating-edit .star-label:hover,
.star-rating-edit input[type="radio"]:checked + .star-label ~ .star-label {
    color: #faad14;
}
.star-rating-edit input[type="radio"]:not(:checked) + .star-label:hover ~ .star-label {
    color: #e8e8e8;
}
.edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    margin-top: 10px;
}
.btn {
    padding: 6px 20px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
}
.btn-cancel {
    background: #fff;
    border-color: #d9d9d9;
    color: #333;
}
.btn-submit {
    background: #00b96b;
    color: #fff;
}
/* 右侧动态区域 */
/* 右侧动态区域 - 客户详情弹窗内 */
.customer-detail-modal .activity-right {
    width: 420px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e8e8e8;
    flex-shrink: 0;
}
.customer-detail-modal .right-tabs {
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}
.customer-detail-modal .rt-item {
    padding: 15px 0;
    margin-right: 25px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
}
.customer-detail-modal .rt-item.active {
    color: #00b96b;
    border-bottom: 2px solid #00b96b;
}
.customer-detail-modal .activity-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: #fbfbfb;
}
/* 输入框区域 - 客户详情弹窗内 */
.customer-detail-modal .input-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.customer-detail-modal .input-area {
    width: 100%;
    border: none;
    resize: none;
    height: 60px;
    outline: none;
    margin-bottom: 10px;
    font-size: 13px;
}
.customer-detail-modal .input-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.customer-detail-modal .btn-post {
    background: #00b96b;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
}
.customer-detail-modal .follow-up-setting {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    position: relative;
}
/* 筛选区域 - 客户详情弹窗内 */
.customer-detail-modal .filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.customer-detail-modal .filter-left {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #1890ff;
    align-items: center;
}
.customer-detail-modal .filter-trigger {
    cursor: pointer;
}
.customer-detail-modal .trigger-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
/* 右侧弹窗样式 - 客户详情弹窗内 */
.customer-detail-modal .date-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    display: none;
    padding: 5px 0;
    background: #fff;
    margin-top: 5px;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
.customer-detail-modal .operator-dropdown {
    position: absolute;
    top: 100%;
    left: -96px;
    width: 160px;
    display: none;
    padding: 10px;
    background: #fff;
    margin-top: 5px;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}

/* 跟进记录弹框里的操作人下拉：紧贴按钮右下方 */
.follow-up-panel .operator-dropdown {
    position: absolute;
    /* top: 100%; */
    right: 0;
    left: auto;
    width: 160px;
    display: none;
    padding: 10px;
    background: #fff;
    margin-top: 5px;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}

/* 创建客户弹窗右侧标签展示 */
.customer-detail-modal .tag-badge,
#createCustomerModal .tag-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #f5f5f5;
    color: #666;
    font-size: 12px;
    margin: 0 6px 6px 0;
}
.customer-detail-modal .search-filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    display: none;
    padding: 10px;
    background: #fff;
    margin-top: 5px;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
/* 弹窗内部样式 - 客户详情弹窗内 */
.customer-detail-modal .date-option {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.customer-detail-modal .date-option:hover {
    background: #f5f5f5;
    color: #1890ff;
}
.customer-detail-modal .op-search,
.follow-up-panel .op-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 5px;
    margin-bottom: 5px;
    outline: none;
    font-size: 13px;
}
.customer-detail-modal .op-item,
.follow-up-panel .op-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 13px;
}
.follow-up-panel .op-item:hover {
    background-color: #f5f5f5;
}
.follow-up-panel .op-item input[type="checkbox"] {
    margin: 0;
}
.customer-detail-modal .sf-header {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
}
.customer-detail-modal .sf-input-wrap {
    border: 1px solid #00b96b;
    border-radius: 2px;
    padding: 4px;
    display: flex;
    margin-bottom: 10px;
}
.customer-detail-modal .sf-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 12px;
}
.customer-detail-modal .sf-list {
    max-height: 200px;
    overflow-y: auto;
}
.customer-detail-modal .sf-item {
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
/* 时间轴 - 客户详情弹窗内 */
.customer-detail-modal .timeline-item {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.customer-detail-modal .tl-icon {
    width: 24px;
    height: 24px;
    text-align: center;
    color: #999;
    flex-shrink: 0;
}
.customer-detail-modal .tl-content {
    flex: 1;
    font-size: 12px;
}
.customer-detail-modal .tl-header {
    color: #999;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}
.customer-detail-modal .tl-box {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    color: #333;
}
/* 标签模态框 */
.tag-modal {
    width: 800px;
    height: 500px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}
.tm-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tm-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.tm-sidebar {
    width: 160px;
    background: #f7f8fa;
    border-right: 1px solid #eee;
    overflow-y: auto;
}
.tm-cat {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 13px;
}
.tm-cat.active {
    background: #fff;
    color: #333;
    font-weight: 500;
    border-left: 3px solid #1890ff;
}
.tm-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.tm-tag-item {
    display: inline-block;
    margin: 0 10px 10px 0;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
}
.tm-tag-item.active {
    background: #ff4d4f;
    color: #fff;
}
/* 通用弹窗阴影 */
.popover-shadow {
    background: #fff;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
    border: 1px solid #eee;
    z-index: 1000;
}
.hidden {
    display: none !important;
}
.customer-profile-section { width: 400px; flex-shrink: 0; border-right: 1px solid #e6e6e6; overflow-y: auto; background-color: #fafafa; }
.customer-profile-card { padding: 20px; }
.profile-header { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.profile-avatar-large { width: 72px; height: 72px; border-radius: 12px; background-size: cover; flex-shrink: 0; }
.customer-avatar-large { width: 60px; height: 60px; border-radius: 4px; flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-name { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 8px; }
.follow-up-info { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.follow-up-person { color: #666; }
.follow-up-status { display: flex; align-items: center; gap: 5px; color: #4caf50; }
.status-check { color: #4caf50; }
.status-arrow { color: #999; font-size: 10px; }
.progress-bar-container { width: 200px; height: 6px; background-color: #e0e0e0; border-radius: 3px; display: flex; overflow: hidden; flex-shrink: 0; }
.progress-segment { height: 100%; }
.progress-segment.green { background-color: #4caf50; width: 25%; }
.progress-segment.gray { background-color: #e0e0e0; width: 25%; border-left: 1px solid #fff; }
.follow-up-status-row { display: flex; align-items: center; gap: 10px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #e6e6e6; }
.add-tag-btn { padding: 4px 12px; border: 1px dashed #d9d9d9; background: transparent; color: #666; border-radius: 2px; font-size: 12px; cursor: pointer; }
.add-tag-btn:hover { border-color: #4caf50; color: #4caf50; }
.profile-tabs { display: flex; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid #e6e6e6; }
.profile-tab { padding: 10px 0; font-size: 13px; color: #666; cursor: pointer; position: relative; }
.profile-tab.active { color: #4caf50; font-weight: 500; }
.profile-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background-color: #4caf50; }
.profile-content { padding-top: 10px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 13px; color: #333; }
.section-title-main { font-size: 15px; font-weight: 600; color: #333; }
.section-header-right { display: flex; align-items: center; gap: 15px; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.section-action-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; background-color: #f5f5f5; transition: all 0.2s; }
.section-action-icon:hover { background-color: #e0e0e0; color: #333; }
.section-action-icon svg { width: 14px; height: 14px; }
.completeness { color: #999; font-size: 12px; }
.info-section { margin-top: 10px; }
.section-title { font-size: 13px; color: #666; cursor: pointer; }
.section-arrow { color: #4caf50; font-size: 12px; }
.info-row { display: flex; margin-bottom: 12px; font-size: 13px; align-items: center; min-height: 22px; }
.info-label { width: 100px; color: #999; flex-shrink: 0; display: flex; align-items: center; gap: 3px; font-size: 13px; line-height: 1.5; padding-right: 10px; }
.info-value { color: #333; flex: 1; font-size: 13px; line-height: 1.5; word-break: break-word; }
.star { color: #ddd; font-size: 16px; }
.star.filled { color: #ff9800; }
.customer-activity-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; background-color: #fff; }
.activity-tabs { display: flex; gap: 20px; padding: 5px 10px; border-bottom: 1px solid #e6e6e6; background-color: #fff; }
.activity-tab { font-size: 13px; color: #666; cursor: pointer; padding: 5px 0; }
.activity-tab.active { color: #4caf50; font-weight: 500; border-bottom: 2px solid #4caf50; }
.activity-input { padding: 20px; border-bottom: 1px solid #e6e6e6; }
.follow-up-input { width: 100%; min-height: 80px; border: 1px solid #d9d9d9; border-radius: 4px; padding: 10px; font-size: 13px; resize: vertical; margin-bottom: 10px; }
.follow-up-input:focus { outline: none; border-color: #4caf50; }
.input-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.attach-icon { font-size: 18px; color: #999; cursor: pointer; }
.post-btn { padding: 6px 20px; background-color: #4caf50; color: #fff; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; }
.post-btn:hover { background-color: #43a047; }
.next-follow-up { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.checkbox-label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.date-input { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 2px; font-size: 12px; }
.date-arrow { color: #999; font-size: 10px; }
.activity-filters { display: flex; align-items: center; gap: 15px; padding: 10px 20px; border-bottom: 1px solid #e6e6e6; background-color: #fafafa; }
.filter-tab { font-size: 13px; color: #666; cursor: pointer; padding: 5px 0; }
.filter-tab.active { color: #4caf50; font-weight: 500; border-bottom: 2px solid #4caf50; }
.filter-controls { margin-left: auto; display: flex; gap: 15px; font-size: 12px; color: #666; flex-flow: row-reverse;align-items: center;}
.filter-controls span { cursor: pointer; }
.filter-icon { cursor: pointer; }
.activity-timeline { flex: 1; overflow-y: auto; padding: 20px; }
.timeline-item { margin-bottom: 30px; position: relative; }
.timeline-date { 
    font-size: 13px; 
    font-weight: 500; 
    color: #333; 
    margin-bottom: 15px; 
    margin-top: 20px;
}
.timeline-date:first-child {
    margin-top: 0;
}
.timeline-content { border-left: 1px solid #e0e0e0; margin-left: 8px; padding-left: 20px; }
.timeline-entry { 
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f0f0f0; 
    position: relative; 
    padding-left: 30px;
}
.timeline-entry:last-child { border-bottom: none; }
.entry-icon { 
    position: absolute; 
    left: 0; 
    top: 0; 
    width: 20px; 
    height: 20px; 
    background-color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 2; 
    border-radius: 50%; 
    border: 1px solid #e0e0e0;
}
.entry-icon svg { 
    width: 12px; 
    height: 12px; 
}
.icon-green { 
    color: #4caf50; 
    border-color: #4caf50;
}
.icon-gray { 
    color: #999; 
    border-color: #e0e0e0;
}
.entry-header {
    position: relative;
    position: relative; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 8px; 
    font-size: 13px; 
    line-height: 1.5;
}
.entry-author { 
    color: #4caf50; 
    font-weight: 500; 
}
.entry-action { 
    color: #666; 
}
.entry-time { 
    color: #999; 
    margin-left: auto; 
    font-size: 12px;
    margin-right: 25px; /* 为编辑按钮留出空间 */
}
.entry-edit-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
}
.timeline-entry:hover .entry-edit-btn {
    opacity: 1;
}
.entry-edit-btn:hover {
    background-color: #f0f0f0;
    color: #1890ff;
}
.comment-icon { color: #999; font-size: 14px; margin-left: 5px; }
.entry-content-box { 
    background-color: #f7f8fa; 
    padding: 12px 15px; 
    border-radius: 4px; 
    margin-top: 8px; 
    font-size: 13px; 
    color: #333; 
    line-height: 1.6; 
}
.tag-change-section {
    margin-bottom: 12px;
}
.tag-change-section:last-child {
    margin-bottom: 0;
}
.tag-change-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 500;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-chip {
    display: inline-block;
    padding: 2px 8px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}


/* Create Customer Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-overlay.show { display: flex; animation: modalFadeIn 0.2s ease-out; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-container { width: 980px; max-width: 95vw; height: 85vh; max-height: 800px; background-color: #fff; border-radius: 4px; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.2); animation: modalSlideIn 0.2s ease-out; }
@keyframes modalSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { height: 48px; background-color: #fff; border-bottom: 1px solid #e6e6e6; display: flex; justify-content: space-between; align-items: center; padding: 0 0 0 20px; flex-shrink: 0; }
.modal-title { font-size: 14px; font-weight: 500; color: #333; }
.modal-title span { margin-left: 0; }
.modal-header-actions { display: flex; align-items: center; height: 100%; }
.modal-icon { width: 40px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: background-color 0.1s; }
.modal-icon:hover { background-color: #f0f0f0; }
.modal-icon.modal-close:hover { background-color: #e81123; color: white; }
.modal-icon svg { width: 16px; height: 16px; }
.refresh-icon { color: #999; }
.modal-divider { width: 1px; height: 20px; background-color: #e0e0e0; margin: 0 5px; }
.modal-nav-icon { width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: background-color 0.1s; font-size: 16px; font-weight: 300; }
.modal-nav-icon:hover { background-color: #f0f0f0; }
.phone-icon { color: #4caf50; }
.phone-icon:hover { background-color: #e8f5e9; }
.phone-icon svg { width: 18px; height: 18px; }
.modal-body { flex: 1; display: flex; overflow: hidden; }
.modal-form-section { flex: 1; padding: 20px 30px; overflow-y: auto; border-right: 1px solid #f0f0f0; }
.form-section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; cursor: pointer; }
.section-toggle { font-size: 10px; color: #999; }
.section-title { font-size: 14px; font-weight: 500; color: #333; }
.form-fields { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; align-items: flex-start; }
.form-label { width: 100px; font-size: 13px; color: #666; padding-top: 8px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.form-label.required::after { content: "*"; color: #f44336; margin-left: 2px; }
.help-icon { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background-color: #e0e0e0; color: #999; font-size: 10px; cursor: help; }
.edit-icon { color: #4285f4; font-size: 12px; cursor: pointer; }
.form-input-wrapper { flex: 1; }
.form-input { width: 100%; height: 36px; border: 1px solid #d9d9d9; border-radius: 2px; padding: 0 12px; font-size: 13px; color: #333; transition: border-color 0.2s; }
.form-input:hover { border-color: #b3b3b3; }
.form-input:focus { outline: none; border-color: #4caf50; }
.form-input::placeholder { color: #bbb; }
.form-select { width: 100%; height: 36px; border: 1px solid #d9d9d9; border-radius: 2px; padding: 0 12px; font-size: 13px; color: #333; background-color: #fff; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.radio-group { display: flex; align-items: center; gap: 30px; padding-top: 8px; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: #333; }
.radio-label input[type="radio"] { display: none; }
.radio-custom { width: 16px; height: 16px; border: 1px solid #d9d9d9; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.radio-label input[type="radio"]:checked + .radio-custom { border-color: #4caf50; }
.radio-label input[type="radio"]:checked + .radio-custom::after { content: ""; width: 8px; height: 8px; background-color: #4caf50; border-radius: 50%; }
.phone-input { display: flex; gap: 0; }
.country-code { display: flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid #d9d9d9; border-right: none; border-radius: 2px 0 0 2px; background-color: #fafafa; height: 36px; }
.flag { font-size: 16px; }
.code-select { border: none; background: transparent; font-size: 13px; color: #333; cursor: pointer; outline: none; padding-right: 5px; }
.phone-input .form-input { border-radius: 0 2px 2px 0; }
.modal-tags-section { width: 200px; padding: 20px; background-color: #fafafa; flex-shrink: 0; }
.tags-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.tags-title { font-size: 14px; color: #333; }
.tags-add { font-size: 13px; color: #4285f4; cursor: pointer; }
.tags-add:hover { text-decoration: underline; }
.tags-content { min-height: 20px; }
.modal-footer { height: 60px; border-top: 1px solid #e6e6e6; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; background-color: #fafafa; flex-shrink: 0; }
.footer-left { display: flex; align-items: center; gap: 15px; }
.footer-label { font-size: 13px; color: #666; }
.footer-select { height: 32px; border: 1px solid #d9d9d9; border-radius: 2px; padding: 0 30px 0 12px; font-size: 13px; color: #333; background-color: #fff; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.footer-right { display: flex; gap: 10px; }
.btn { height: 36px; padding: 0 25px; border-radius: 2px; font-size: 14px; cursor: pointer; transition: all 0.2s; border: none; }
.btn-primary { background-color: #4caf50; color: #fff; }
.btn-primary:hover { background-color: #43a047; }
.btn-secondary { background-color: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-secondary:hover { border-color: #4caf50; color: #4caf50; }

/* 分组选择弹窗样式 */
#tagMainPage #modalGroupSelect .group-select-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

#tagMainPage #modalGroupSelect .group-select-item:hover {
    background-color: #f5f5f5;
}

#tagMainPage #modalGroupSelect .group-select-item:last-child {
    border-bottom: none;
}

#tagMainPage #modalGroupSelect .group-select-item span:first-child {
    font-size: 16px;
}

/* 分组拖拽排序样式 */
#tagMainPage .group-item {
    cursor: move;
    user-select: none;
}

#tagMainPage .group-item.dragging {
    opacity: 0.5;
    background-color: #f0f0f0;
}

#tagMainPage .group-item .drag-handle {
    cursor: grab;
    user-select: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#tagMainPage .group-item:hover .drag-handle {
    opacity: 1;
}

#tagMainPage .group-item:active .drag-handle {
    cursor: grabbing;
}

/* 跟进情况右侧弹窗 */
.follow-up-panel {
    position: fixed;
    right: -600px;
    bottom: 0;
    width: 481px;
    height: 94vh;
    background-color: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.15);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.follow-up-panel.show {
    right: 0;
}
.follow-up-panel-header {
    height: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e6e6e6;
    background-color: #fff;
}
.follow-up-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.follow-up-panel-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
}
.follow-up-panel-close:hover {
    background-color: #f0f0f0;
    color: #333;
}
.follow-up-panel-close svg {
    width: 18px;
    height: 18px;
}
.follow-up-panel-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.follow-up-panel-body .activity-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    border-bottom: 1px solid #e6e6e6;
    background-color: #fafafa;
    flex-shrink: 0;
}
.follow-up-panel-body .activity-tab {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}
.follow-up-panel-body .activity-tab.active {
    color: #00c853;
    font-weight: 500;
}
.follow-up-panel-body .activity-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #00c853;
}
.follow-up-panel-body .filter-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #666;
}
.follow-up-panel-body .filter-controls span {
    cursor: pointer;
}
.follow-up-panel-body .filter-icon {
    font-size: 14px;
}
.follow-up-panel-body .activity-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 添加跟进记录弹窗（复用通用 modal 样式） */
#addFollowupModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#addFollowupModal .modal-dialog.small {
    width: 520px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}
#addFollowupModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
#addFollowupModal .modal-title {
    font-size: 16px;
    font-weight: 500;
}
#addFollowupModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
}
#addFollowupModal .modal-close:hover {
    color: #333;
}
#addFollowupModal .modal-body {
    padding: 16px;
    font-size: 14px;
    display: block;
}
#addFollowupModal .modal-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

/* 编辑跟进记录弹窗样式 */
#editFollowupModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#editFollowupModal .modal-dialog.small {
    /* width: 560px; */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: modalSlideIn 0.2s ease-out;
}
#editFollowupModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
#editFollowupModal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
#editFollowupModal .modal-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#editFollowupModal .modal-close:hover {
    color: #333;
    background: #f0f0f0;
}
#editFollowupModal .modal-body {
    padding: 20px;display: block;
}
#editFollowupModal .edit-followup-info {
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}
#editFollowupModal .textarea-wrapper {
    position: relative;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s;
}
#editFollowupModal .textarea-wrapper:focus-within {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
#editFollowupModal .followup-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    padding-bottom: 32px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    border: none;
    outline: none;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
#editFollowupModal .followup-textarea::placeholder {
    color: #bfbfbf;
}
#editFollowupModal .char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #999;
    background: #fff;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
}
#editFollowupModal .char-count.warning {
    color: #ff9800;
}
#editFollowupModal .char-count.error {
    color: #f44336;
}
#editFollowupModal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
}
#editFollowupModal .btn {
    min-width: 80px;
    height: 36px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}
#editFollowupModal .btn-cancel {
    background: #fff;
    border-color: #d9d9d9;
    color: #333;
}
#editFollowupModal .btn-cancel:hover {
    border-color: #1890ff;
    color: #1890ff;
}
#editFollowupModal .btn-submit {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}
#editFollowupModal .btn-submit:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}
#editFollowupModal .btn-submit:active {
    background: #096dd9;
    border-color: #096dd9;
}
#editFollowupModal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 共享客户弹窗样式 */
.share-customer-modal {
    width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.scm-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}
.scm-header span:last-child {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.scm-header span:last-child:hover {
    color: #333;
}
.scm-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}
.scm-selected-info {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}
.scm-form-group {
    margin-bottom: 20px;
}
.scm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.scm-select-wrapper {
    position: relative;
    z-index: 10001;
    width: 100%;
}
.scm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.scm-input:focus {
    border-color: #1890ff;
}
.scm-select-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10004;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    width: auto;
    box-sizing: border-box;
}
.scm-search-box {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.scm-search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.scm-person-list {
    padding: 8px 0;
}
.scm-group-item {
    margin-bottom: 4px;
}
.scm-group-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
}
.scm-group-header:hover {
    background-color: #f5f5f5;
}
.scm-expand-icon {
    width: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}
.scm-group-icon {
    margin-right: 8px;
    font-size: 14px;
}
.scm-group-name {
    font-size: 14px;
    color: #333;
}
.scm-person-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
}
.scm-person-item:hover {
    background-color: #f5f5f5;
}
.scm-person-checkbox {
    margin-right: 8px;
}
.scm-person-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e6f7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
}
.scm-person-name {
    font-size: 14px;
    color: #333;
}
.scm-selected-persons {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.scm-selected-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    font-size: 12px;
    color: #1890ff;
}
.scm-remove-tag {
    margin-left: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.scm-remove-tag:hover {
    color: #ff4d4f;
}
.scm-share-type {
    display: flex;
    gap: 10px;
}
.scm-type-item {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.scm-type-item:hover {
    border-color: #1890ff;
}
.scm-type-item.active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}
.scm-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
div#customerImportModal .modal-container {
    height: auto;
}

/* ========================================
   组织架构页面样式
   ======================================== */
.structure-page {
    display: none;
    flex: 1;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.structure-page.active {
    display: flex;
}

/* ========================================
   客户管理页面样式
   ======================================== */
.customer-manage-page {
    display: none;
    flex: 1;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.customer-manage-page.active {
    display: flex;
}

/* 客户管理页面内的标签管理容器 */
.customer-manage-page .structure-tab-content {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.customer-manage-page .structure-tab-content.active {
    display: flex;
}

.customer-manage-page .tag-management-container {
    padding: 20px;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customer-manage-page .description {
    margin-bottom: 16px;
    color: #999;
    font-size: 14px;
}
.customer-manage-page .description a {
    margin-left: 5px;
    color: #1890ff;
    text-decoration: none;
    cursor: pointer;
}
.customer-manage-page .description a:hover {
    text-decoration: underline;
}

.customer-manage-page .main-panel {
    display: flex;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.customer-manage-page .sidebar {
    width: 260px;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}
.customer-manage-page .sidebar-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}
.customer-manage-page .sidebar-title {
    font-weight: 500;
    color: #333;
    font-size: 16px;
}
.customer-manage-page .btn-add-group {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}
.customer-manage-page .btn-add-group:hover {
    color: #1890ff;
    border-color: #1890ff;
}
.customer-manage-page .group-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 5px;
}
.customer-manage-page .group-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.customer-manage-page .group-item:hover {
    background-color: #f5f5f5;
}
.customer-manage-page .group-item.active {
    background-color: #e6f7ff;
    border-left-color: #1890ff;
}
.customer-manage-page .folder-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    fill: currentColor;
    transition: color 0.3s;
}
.customer-manage-page .group-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}
.customer-manage-page .drag-handle {
    display: none;
    color: #999;
    font-size: 16px;
}
.customer-manage-page .group-item:hover .drag-handle {
    display: block;
}

.customer-manage-page .content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.customer-manage-page .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
.customer-manage-page .content-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.customer-manage-page .content-header a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}
.customer-manage-page .content-header a:hover {
    color: #ff4d4f;
}

.customer-manage-page .form-area {
    /* margin-bottom: 20px; */
}
.customer-manage-page .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.customer-manage-page .form-label {
    width: 80px;
    color: #666;
    font-size: 14px;
}
.customer-manage-page .input-group {
    display: flex;
}
.customer-manage-page .form-input {
    width: 200px;
    height: 32px;
    padding: 4px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 2px 0 0 2px;
    font-size: 14px;
}
.customer-manage-page .form-input:focus {
    border-color: #1890ff;
    outline: none;
}
.customer-manage-page .btn-save {
    height: 32px;
    padding: 0 15px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    font-size: 14px;
}
.customer-manage-page .btn-save:hover {
    background: #40a9ff;
}

.customer-manage-page .color-preview {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    background-color: #1890ff;
    cursor: pointer;
    border: 1px solid #d9d9d9;
}

.customer-manage-page .radio-group {
    display: flex;
    gap: 20px;
}
.customer-manage-page .radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}
.customer-manage-page .radio-label input[type="radio"] {
    margin-right: 6px;
    display: inline-block;
    width: auto;
    height: auto;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: radio;
    -moz-appearance: radio;
}

.customer-manage-page .tag-manager {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.customer-manage-page .tag-toolbar {
    background-color: #f7f8fa;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.customer-manage-page .btn-add-tag {
    background: #1890ff;
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}
.customer-manage-page .btn-add-tag:hover {
    background: #40a9ff;
}
.customer-manage-page .tag-toolbar a {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}
.customer-manage-page .tag-toolbar a:hover {
    text-decoration: underline;
}

.customer-manage-page .tags-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

/* 标签芯片样式 */
.customer-manage-page .tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 2px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e8e8e8;
}
.customer-manage-page .tag-chip:hover {
    background: #e6f7ff;
    border-color: #1890ff;
}
.customer-manage-page .tag-chip .tag-arrow {
    margin-left: 8px;
    color: #999;
    cursor: pointer;
    font-size: 12px;
}
.customer-manage-page .tag-chip .tag-arrow:hover {
    color: #1890ff;
}

/* 批量模式下的标签项 */
.customer-manage-page .batch-tag-item {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px 0 5px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 2px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}
.customer-manage-page .batch-tag-item:hover {
    background: #f5f5f5;
}
.customer-manage-page .batch-tag-item input[type="checkbox"] {
    margin-right: 8px;
}

.customer-manage-page .tag-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 2px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}
.customer-manage-page .tag-item:hover {
    background: #e6f7ff;
}
.customer-manage-page .tag-item .tag-menu-trigger {
    margin-left: 8px;
    color: #999;
    cursor: pointer;
}
.customer-manage-page .tag-item .tag-menu-trigger:hover {
    color: #1890ff;
}

.customer-manage-page .footer-help {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 2px;
    margin-top: 16px;
}
.customer-manage-page .help-icon {
    width: 16px;
    height: 16px;
    background: #faad14;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}
.customer-manage-page .help-list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

/* 标签下拉菜单 */
.customer-manage-page .tag-dropdown-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    min-width: 120px;
}
.customer-manage-page .tag-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.customer-manage-page .tag-menu-item:hover {
    background: #f5f5f5;
}
.customer-manage-page .menu-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 4px 0;
}

/* 颜色选择器弹出框 */
.customer-manage-page .color-palette-popover {
    position: fixed;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1000;
    display: none;
    width: 298px;
}
.customer-manage-page .color-palette-popover.show {
    display: block;
}

/* 颜色选择器选项 */
.customer-manage-page .color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    display: inline-block;
    margin: 2px;
}
.customer-manage-page .color-option:hover {
    border-color: #1890ff;
    transform: scale(1.1);
}

/* 模态框样式 */
.customer-manage-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.customer-manage-page .modal-overlay.show {
    display: flex;
}
.customer-manage-page .modal-container {
    background: #fff;
    border-radius: 4px;
    width: 400px;
    max-width: 90%;
    height: auto;
}
.customer-manage-page .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
}
.customer-manage-page .modal-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
}
.customer-manage-page .modal-close:hover {
    color: #333;
}
.customer-manage-page .modal-body {
    padding: 24px;display: block;
}
.customer-manage-page .modal-input {
    width: 100%;
    height: 32px;
    padding: 4px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
}
.customer-manage-page .modal-input:focus {
    border-color: #1890ff;
    outline: none;
}
.customer-manage-page .input-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}
.customer-manage-page .modal-footer {
    padding: 10px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.customer-manage-page .btn-modal-cancel {
    padding: 6px 15px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}
.customer-manage-page .btn-modal-cancel:hover {
    border-color: #1890ff;
    color: #1890ff;
}
.customer-manage-page .btn-modal-ok {
    padding: 6px 15px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}
.customer-manage-page .btn-modal-ok:hover {
    background: #40a9ff;
}

/* 导入表格样式 */
.customer-manage-page .import-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.customer-manage-page .import-table th,
.customer-manage-page .import-table td {
    border: 1px solid #e8e8e8;
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
}
.customer-manage-page .import-table th {
    background: #fafafa;
    font-weight: 500;
}

/* 隐藏元素 */
.customer-manage-page .hidden {
    display: none !important;
}

/* 顶部切换栏 */
.structure-top-header {
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0;
}
.structure-tabs {
    display: flex;
    gap: 30px;
}
.structure-tab {
    font-size: 15px;
    color: #666;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.structure-tab:hover {
    color: #409EFF;
}
.structure-tab.active {
    color: #409EFF;
    border-bottom-color: #409EFF;
}

/* 标签页内容 */
.structure-tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}
.structure-tab-content.active {
    display: flex;
}

/* 左侧部门树侧边栏 */
.structure-sidebar {
    width: 260px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background: #fff;
    flex-shrink: 0;
}
.structure-sidebar-header {
    padding: 10px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    background: #f9f9f9;
}
.structure-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #eef0f4;
    border-radius: 4px;
    padding: 0 10px;
    height: 32px;
}
.structure-search-box .search-icon {
    width: 16px;
    height: 16px;
    color: #999;
    margin-right: 6px;
}
.structure-search-box .search-icon svg {
    width: 100%;
    height: 100%;
}
.structure-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #333;
}
.structure-search-input::placeholder {
    color: #999;
}
.structure-add-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f4;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #606266;
    font-size: 18px;
    font-weight: 300;
    transition: background 0.2s;
}
.structure-add-btn:hover {
    background: #e0e3e8;
}

/* 部门树 */
.structure-tree {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}
.structure-tree-node {
    user-select: none;
}
.structure-tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
    position: relative;
}
.structure-tree-item:hover {
    background-color: #f5f7fa;
}

.structure-tree-item-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.structure-tree-menu {
    position: relative;
    opacity: 0;
    transition: opacity 0.2s;
}

.structure-tree-item:hover .structure-tree-menu {
    opacity: 1;
}

.structure-tree-menu-btn {
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 2px;
    color: #666;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s;
}

.structure-tree-menu-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.structure-tree-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 120px;
    display: none;
}

.structure-tree-dropdown.show {
    display: block;
}

.structure-tree-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.structure-tree-dropdown-item:last-child {
    border-bottom: none;
}

.structure-tree-dropdown-item:hover {
    background-color: #f8f9fa;
}

/* 添加部门弹窗样式 */
#addDeptModal .modal-dialog {
    width: 650px;
    max-width: 95%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#addDeptModal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

#addDeptModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

#addDeptModal .modal-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    border-radius: 4px;
    transition: all 0.2s;
}

#addDeptModal .modal-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

#addDeptModal .modal-body {
    padding: 24px 20px;
    flex: 1;
    display: block;
}

#addDeptModal .form-row {
    margin-bottom: 20px;
}

#addDeptModal .form-row:last-child {
    margin-bottom: 0;
}

#addDeptModal .form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#addDeptModal .form-input,
.dept-select-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#addDeptModal .form-input:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

#addDeptModal .form-input::placeholder {
    color: #bfbfbf;
}

#addDeptModal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
}

#addDeptModal .btn {
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

#addDeptModal .btn-cancel {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}

#addDeptModal .btn-cancel:hover {
    background: #f5f5f5;
    border-color: #b7b7b7;
}

#addDeptModal .btn-submit {
    background: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
}

#addDeptModal .btn-submit:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 移动员工模态框中的已选员工样式 */
#moveEmployeeModal .selected-employees {
    max-height: 100px;
    overflow-y: auto;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px;
    background: #f5f5f5;
    min-height: 40px;
}

#moveEmployeeModal .selected-employee-item {
    display: inline-block;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px;
    font-size: 12px;
}

/* 员工操作按钮样式 */
.structure-toolbar .structure-btn {
    margin-right: 8px;
}

.structure-toolbar .structure-btn:disabled {
    background: #f5f5f5;
    color: #bfbfbf;
    cursor: not-allowed;
}

.structure-toolbar .structure-btn.danger {
    background: #ff4d4f;
    border-color: #ff4d4f;
    color: white;
}

.structure-toolbar .structure-btn.danger:hover:not(:disabled) {
    background: #ff7875;
    border-color: #ff7875;
}

.structure-toolbar .structure-btn.success {
    background: #52c41a;
    border-color: #52c41a;
    color: white;
}

.structure-toolbar .structure-btn.success:hover:not(:disabled) {
    background: #73d13d;
    border-color: #73d13d;
}

/* 员工状态样式 */
.structure-col-status {
    width: 80px;
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-normal {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-badge.status-disabled {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffb3b3;
}

.row-disabled {
    background-color: #fafafa;
    opacity: 0.7;
}

.row-disabled td {
    color: #999;
}

/* 员工管理模态框样式 */
#createEmployeeModal .modal-dialog,
#importEmployeeModal .modal-dialog,
#moveEmployeeModal .modal-dialog,
#editEmployeeModal .modal-dialog {
    width: 650px;
    max-width: 95%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#createEmployeeModal .modal-header,
#importEmployeeModal .modal-header,
#moveEmployeeModal .modal-header,
#editEmployeeModal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#createEmployeeModal .modal-title,
#importEmployeeModal .modal-title,
#moveEmployeeModal .modal-title,
#editEmployeeModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

#createEmployeeModal .modal-close,
#importEmployeeModal .modal-close,
#moveEmployeeModal .modal-close,
#editEmployeeModal .modal-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    color: #999;
}

#createEmployeeModal .modal-close:hover,
#importEmployeeModal .modal-close:hover,
#moveEmployeeModal .modal-close:hover,
#editEmployeeModal .modal-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

#createEmployeeModal .modal-body,
#importEmployeeModal .modal-body,
#moveEmployeeModal .modal-body,
#editEmployeeModal .modal-body {
    padding: 24px 20px;
    flex: 1;
    display: block;
}

#createEmployeeModal .form-row,
#importEmployeeModal .form-row,
#moveEmployeeModal .form-row,
#editEmployeeModal .form-row {
    margin-bottom: 20px;
}

#createEmployeeModal .form-row:last-child,
#importEmployeeModal .form-row:last-child,
#moveEmployeeModal .form-row:last-child,
#editEmployeeModal .form-row:last-child {
    margin-bottom: 0;
}

#createEmployeeModal .form-label,
#importEmployeeModal .form-label,
#moveEmployeeModal .form-label,
#editEmployeeModal .form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#createEmployeeModal .form-input,
#importEmployeeModal .form-input,
#moveEmployeeModal .form-input,
#editEmployeeModal .form-input,
#createEmployeeModal .dept-select-input,
#importEmployeeModal .dept-select-input,
#moveEmployeeModal .dept-select-input,
#editEmployeeModal .dept-select-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

#createEmployeeModal .form-input:focus,
#importEmployeeModal .form-input:focus,
#moveEmployeeModal .form-input:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

#createEmployeeModal .form-input::placeholder,
#importEmployeeModal .form-input::placeholder,
#moveEmployeeModal .form-input::placeholder {
    color: #bfbfbf;
}

#createEmployeeModal .modal-footer,
#importEmployeeModal .modal-footer,
#moveEmployeeModal .modal-footer,
#editEmployeeModal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#createEmployeeModal .modal-btn-cancel,
#importEmployeeModal .modal-btn-cancel,
#moveEmployeeModal .modal-btn-cancel,
#editEmployeeModal .modal-btn-cancel {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

#createEmployeeModal .modal-btn-cancel:hover,
#importEmployeeModal .modal-btn-cancel:hover,
#moveEmployeeModal .modal-btn-cancel:hover,
#editEmployeeModal .modal-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #b7b7b7;
}

#createEmployeeModal .modal-btn-confirm,
#importEmployeeModal .modal-btn-confirm,
#moveEmployeeModal .modal-btn-confirm,
#editEmployeeModal .modal-btn-confirm {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #1890ff;
    border-radius: 4px;
    font-size: 14px;
    background: #1890ff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

#createEmployeeModal .modal-btn-confirm:hover,
#importEmployeeModal .modal-btn-confirm:hover,
#moveEmployeeModal .modal-btn-confirm:hover,
#editEmployeeModal .modal-btn-confirm:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 角色组多选框样式 */
.role-select-wrapper select[multiple] {
    min-height: 100px;
    height: auto !important;
    resize: vertical;
    padding: 8px 12px;
}

.role-select-wrapper select[multiple]:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.role-select-wrapper select[multiple] option {
    padding: 5px 8px;
    font-size: 14px;
    color: #333;
}

.role-select-wrapper select[multiple] option:checked {
    background: #1890ff;
    color: #fff;
}

/* 员工导入特有的下拉按钮样式 */
#importEmployeeModal .modal-btn-download {
    background: #1890ff;
    color: white;
    border: 1px solid #1890ff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

#importEmployeeModal .modal-btn-download:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 表单提示文本样式 */
.form-tip {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

/* 部门选择下拉框样式 */
.dept-select-wrapper {
    position: relative;
    width: 100%;
}

/* 员工模态框中的部门选择样式 */
#employeeDeptSelectDropdown,
#importDeptSelectDropdown,
#moveDeptSelectDropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
    min-width: 590px;
    display: none;
}

#employeeDeptSelectInput,
#importDeptSelectInput,
#moveDeptSelectInput {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

#employeeDeptSelectInput .dept-select-text,
#importDeptSelectInput .dept-select-text,
#moveDeptSelectInput .dept-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#employeeDeptSelectInput .dept-select-arrow,
#importDeptSelectInput .dept-select-arrow,
#moveDeptSelectInput .dept-select-arrow {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    transition: transform 0.3s;
}

#employeeDeptSelectInput.active .dept-select-arrow,
#importDeptSelectInput.active .dept-select-arrow,
#moveDeptSelectInput.active .dept-select-arrow {
    transform: rotate(180deg);
}

.dept-select-input {
    padding-right: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dept-select-input:hover {
    border-color: #40a9ff;
}

.dept-select-input.active {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.dept-select-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dept-select-arrow {
    font-size: 12px;
    color: #bfbfbf;
    transition: transform 0.2s;
}

.dept-select-input.active .dept-select-arrow {
    transform: rotate(180deg);
}

.dept-select-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
    min-width: 590px;
}

.dept-select-dropdown.show {
    display: block;
}

.dept-tree-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.dept-tree-item:last-child {
    border-bottom: none;
}

.dept-tree-item:hover {
    background-color: #f5f7fa;
}

.dept-tree-item.selected {
    background-color: #e6f7ff;
    color: #1890ff;
}

.dept-tree-item .dept-tree-arrow {
    margin-right: 8px;
    font-size: 12px;
    color: #bfbfbf;
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
}

.dept-tree-item .dept-tree-arrow.expanded {
    transform: rotate(90deg);
}

.dept-tree-item .dept-tree-arrow.empty {
    visibility: hidden;
}

.dept-tree-item .dept-tree-icon {
    margin-right: 6px;
    font-size: 14px;
}

.dept-tree-item .dept-tree-label {
    flex: 1;
}
.structure-tree-item.selected {
    background-color: #eef6ff;
    color: #409EFF;
}
.structure-tree-item.selected .structure-tree-icon {
    color: #409EFF;
}
.structure-tree-arrow {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: #999;
    font-size: 10px;
    transition: transform 0.2s;
}
.structure-tree-arrow.expanded {
    transform: rotate(90deg);
}
.structure-tree-arrow.empty {
    visibility: hidden;
}
.structure-tree-icon {
    margin-right: 6px;
    color: #8c9fa9;
    font-size: 14px;
}
.structure-tree-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.structure-tree-count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}
.structure-tree-children {
    display: none;
    padding-left: 20px;
}
.structure-tree-children.expanded {
    display: block;
}

/* 角色列表 */
.structure-role-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}
.structure-role-item {
    padding: 0 20px;
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
    position: relative;
}
.structure-role-item:hover {
    background-color: #f5f7fa;
}
.structure-role-item.active {
    background-color: #fff;
    color: #409EFF;
    border-right: 2px solid #409EFF;
}
.structure-role-icon {
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}
.structure-role-icon.orange {
    color: #faad14;
}
.structure-role-icon.blue {
    color: #409EFF;
}
.structure-role-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.structure-role-menu-btn {
    display: none;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.structure-role-item:hover .structure-role-menu-btn {
    display: block;
}
.structure-role-menu-btn:hover {
    background-color: #e6e6e6;
    color: #333;
}
.structure-role-dropdown {
    position: fixed;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 140px;
    padding: 4px 0;
    border: 1px solid #e6e6e6;
}
.structure-role-dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.structure-role-dropdown-item:hover {
    background-color: #f5f7fa;
}

/* 右侧内容区 */
.structure-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    overflow: hidden;
    background: #fff;
}
.structure-content-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.structure-page-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.structure-count {
    font-weight: normal;
    color: #666;
}
.structure-header-actions {
    display: flex;
    gap: 15px;
    font-size: 14px;
}
.structure-header-link {
    color: #409EFF;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}
.structure-header-link:hover {
    color: #66b1ff;
}

/* 工具栏 */
.structure-toolbar {
    padding: 15px 0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.structure-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: #606266;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.structure-btn:hover {
    color: #409EFF;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}
.structure-btn:disabled {
    color: #c0c4cc;
    background-color: #f5f7fa;
    border-color: #e4e7ed;
    cursor: not-allowed;
}

/* 表格区域 */
.structure-table-area {
    flex: 1;
    overflow: auto;
}
.structure-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.structure-table th {
    background-color: #f5f7fa;
    color: #606266;
    font-weight: 500;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #ebeef5;
    position: sticky;
    top: 0;
    z-index: 1;
}
.structure-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ebeef5;
    color: #606266;
}
.structure-table tbody tr:hover {
    background-color: #f5f7fa;
}
.structure-col-checkbox {
    width: 50px;
    text-align: center;
}
.structure-col-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.structure-col-name {
    width: 180px;
}
.structure-col-job {
    width: 280px;
}
.structure-col-dept {
    min-width: 150px;
}
.structure-col-account {
    width: 150px;
    text-align: right;
}
.structure-founder-tag {
    display: inline-block;
    padding: 0 4px;
    font-size: 12px;
    color: #faad14;
    background-color: #fffbe6;
    border: 1px solid #faad14;
    border-radius: 2px;
    margin-left: 5px;
    transform: scale(0.9);
}

/* 分页 */
.structure-pagination {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    color: #606266;
    font-size: 13px;
    gap: 10px;
}
.structure-pagination-info {
    color: #606266;
}
.structure-pagination-prev,
.structure-pagination-next {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #606266;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s;
}
.structure-pagination-prev:hover,
.structure-pagination-next:hover {
    background-color: #f5f7fa;
    color: #409EFF;
}
.structure-pagination-prev.disabled,
.structure-pagination-next.disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}
.structure-pagination-prev.disabled:hover,
.structure-pagination-next.disabled:hover {
    background-color: transparent;
    color: #c0c4cc;
}

/* 创建角色弹窗样式 */
#createRoleModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#createRoleModal .modal-dialog.small {
    width: 520px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}
#createRoleModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
#createRoleModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#createRoleModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#createRoleModal .modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}
#createRoleModal .modal-body {
    padding: 24px;
    font-size: 14px;
    display: block;
}
#createRoleModal .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
#createRoleModal .form-row:last-child {
    margin-bottom: 0;
}
#createRoleModal .form-label {
    width: 100px;
    text-align: right;
    margin-right: 10px;
    color: #333;
    font-size: 14px;
    flex-shrink: 0;
}
#createRoleModal .form-input-wrapper {
    flex: 1;
    position: relative;
}
#createRoleModal .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#createRoleModal .form-input:focus {
    outline: none;
    border-color: #409EFF;
}
#createRoleModal .form-input::placeholder {
    color: #999;
}
#createRoleModal .create-role-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 9L1 4h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
    appearance: none;
    cursor: pointer;
}
#createRoleModal .modal-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
#createRoleModal .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    transition: all 0.2s;
}
#createRoleModal .btn-cancel {
    background: #fff;
    color: #333;
}
#createRoleModal .btn-cancel:hover {
    border-color: #409EFF;
    color: #409EFF;
}
#createRoleModal .btn-submit {
    background: #07c160;
    color: #fff;
    border-color: #07c160;
}
#createRoleModal .btn-submit:hover {
    background: #06ad56;
    border-color: #06ad56;
}
#createRoleModal .btn-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* 编辑角色名称弹窗样式（复用创建角色弹窗样式） */
#editRoleNameModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#editRoleNameModal .modal-dialog.small {
    width: 520px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}
#editRoleNameModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
#editRoleNameModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#editRoleNameModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#editRoleNameModal .modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}
#editRoleNameModal .modal-body {
    padding: 24px;
    font-size: 14px;
    display: block;
}
#editRoleNameModal .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
#editRoleNameModal .form-row:last-child {
    margin-bottom: 0;
}
#editRoleNameModal .form-label {
    width: 100px;
    text-align: right;
    margin-right: 10px;
    color: #333;
    font-size: 14px;
    flex-shrink: 0;
}
#editRoleNameModal .form-input-wrapper {
    flex: 1;
    position: relative;
}
#editRoleNameModal .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#editRoleNameModal .form-input:focus {
    outline: none;
    border-color: #409EFF;
}
#editRoleNameModal .form-input::placeholder {
    color: #999;
}
#editRoleNameModal .modal-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
#editRoleNameModal .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    transition: all 0.2s;
}
#editRoleNameModal .btn-cancel {
    background: #fff;
    color: #333;
}
#editRoleNameModal .btn-cancel:hover {
    border-color: #409EFF;
    color: #409EFF;
}
#editRoleNameModal .btn-submit {
    background: #409EFF;
    color: #fff;
    border-color: #409EFF;
}
#editRoleNameModal .btn-submit:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}
#editRoleNameModal .btn-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* 复制角色弹窗样式（复用创建角色弹窗样式） */
#copyRoleModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#copyRoleModal .modal-dialog.small {
    width: 520px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}
#copyRoleModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
#copyRoleModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#copyRoleModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#copyRoleModal .modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}
#copyRoleModal .modal-body {
    padding: 24px;
    font-size: 14px;
    display: block;
}
#copyRoleModal .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
#copyRoleModal .form-row:last-child {
    margin-bottom: 0;
}
#copyRoleModal .form-label {
    width: 100px;
    text-align: right;
    margin-right: 10px;
    color: #333;
    font-size: 14px;
    flex-shrink: 0;
}
#copyRoleModal .form-input-wrapper {
    flex: 1;
    position: relative;
}
#copyRoleModal .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#copyRoleModal .form-input:focus {
    outline: none;
    border-color: #409EFF;
}
#copyRoleModal .form-input::placeholder {
    color: #999;
}
#copyRoleModal .create-role-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 9L1 4h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
    appearance: none;
    cursor: pointer;
}
#copyRoleModal .modal-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
#copyRoleModal .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    transition: all 0.2s;
}
#copyRoleModal .btn-cancel {
    background: #fff;
    color: #333;
}
#copyRoleModal .btn-cancel:hover {
    border-color: #409EFF;
    color: #409EFF;
}
#copyRoleModal .btn-submit {
    background: #409EFF;
    color: #fff;
    border-color: #409EFF;
}
#copyRoleModal .btn-submit:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}
#copyRoleModal .btn-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* 编辑角色权限弹窗样式 */
#editRolePermissionModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#editRolePermissionModal .modal-dialog.large {
    width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#editRolePermissionModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
#editRolePermissionModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#editRolePermissionModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#editRolePermissionModal .modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}
#editRolePermissionModal .permission-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: block;
}
.permission-section {
    margin-bottom: 30px;
}
.permission-section:last-child {
    margin-bottom: 0;
}
.permission-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.permission-section-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.permission-check-all {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.permission-check-all input {
    margin-right: 6px;
    cursor: pointer;
}
.permission-checkboxes {
    display: flex;
    gap: 40px;
    margin-bottom: 15px;
}
.permission-checkbox-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.permission-checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}
.permission-checkbox-item input {
    margin-right: 8px;
    cursor: pointer;
}
.permission-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    font-size: 12px;
    cursor: help;
}
.permission-scope {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: none;
}
.permission-scope-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.permission-radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}
.permission-radio-item input {
    margin-right: 6px;
    cursor: pointer;
}
#editRolePermissionModal .modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    flex-shrink: 0;
}
#editRolePermissionModal .btn-submit {
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: #409EFF;
    color: #fff;
    transition: all 0.2s;
}
#editRolePermissionModal .btn-submit:hover {
    background: #66b1ff;
}
#editRolePermissionModal .btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 选择员工弹窗样式 */
#selectEmployeeModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#selectEmployeeModal .modal-dialog.medium {
    width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#selectEmployeeModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
#selectEmployeeModal .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
#selectEmployeeModal .modal-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
#selectEmployeeModal .modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}
#selectEmployeeModal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
.select-employee-search {
    position: relative;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.select-employee-search-input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}
.select-employee-search-input:focus {
    outline: none;
    border-color: #409EFF;
}
.select-employee-search-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}
.select-employee-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px;
}
.select-employee-dept-item {
    margin-bottom: 0;
}
.select-employee-dept-header {
    display: flex;
    align-items: center;
    padding: 6px 0;
    padding-right: 16px;
    cursor: pointer;
    user-select: none;
}
.select-employee-dept-header:hover {
    background-color: #f5f7fa;
}
.select-employee-expand-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    margin-right: 8px;
    flex-shrink: 0;
    cursor: pointer;
}
.select-employee-expand-icon.empty {
    visibility: hidden;
}
.select-employee-dept-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}
.select-employee-dept-content {
    display: none;
}
.select-employee-employee-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    padding-right: 16px;
    cursor: pointer;
    user-select: none;
}
.select-employee-employee-item:hover {
    background-color: #f5f7fa;
}
.select-employee-checkbox {
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.select-employee-employee-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    flex: 1;
}
#selectEmployeeModal .modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.select-employee-count {
    font-size: 14px;
    color: #666;
}
.select-employee-actions {
    display: flex;
    gap: 10px;
}
#selectEmployeeModal .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    transition: all 0.2s;
}
#selectEmployeeModal .btn-cancel {
    background: #fff;
    color: #333;
}
#selectEmployeeModal .btn-cancel:hover {
    border-color: #409EFF;
    color: #409EFF;
}
#selectEmployeeModal .btn-submit {
    background: #409EFF;
    color: #fff;
    border-color: #409EFF;
}
#selectEmployeeModal .btn-submit:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}
#selectEmployeeModal .btn-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* 组织架构权限分配样式 */
.permission-org-assign {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.permission-org-assign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.permission-org-assign-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.permission-org-assign-header .permission-check-all {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.permission-org-assign-header .permission-check-all input {
    margin-right: 6px;
    cursor: pointer;
}
.permission-org-assign-content {
    margin-top: 10px;
}
.permission-org-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}
.permission-org-checkboxes .permission-checkbox-item {
    min-width: 120px;
}
input#employeeFileInput { line-height: 40px; }
div#infoBody .radio-label input[type="radio"] {
    display: block;
}
td.col-name.customer-name.clickable {
    vertical-align: middle !important;
    min-height: 50px;
  }
  
  td.col-name .customer-avatar {
    vertical-align: middle;
    display: inline-flex;
    margin-right: 8px;
  }
  
  td.col-name span {
    vertical-align: middle;
    display: inline-block;
  }