* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h2 {
    font-size: 20px;
    font-weight: 600;
}

.menu {
    flex: 1;
    padding: 20px 0;
}

.menu-item {
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.8);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    color: white;
}

.menu-item .icon {
    font-size: 20px;
}

.logout-btn {
    margin: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 20px 30px;
    overflow-y: auto;
}

.page.active {
    display: flex;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 28px;
    color: #2d3748;
}

/* ==================== 按钮 ==================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #5a67d8;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.3);
    background: #4c51bf;
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-warning {
    background: #d97706;
    color: white;
}

.btn-warning:hover {
    background: #b45309;
}
.btn-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-info {
    background: #3182ce;
    color: white;
}

.btn-info:hover {
    background: #2b6cb0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==================== 卡片 ==================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h3 {
    font-size: 18px;
    color: #2d3748;
}

/* ==================== 表格 ==================== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f7fafc;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

table tr:hover {
    background: #f7fafc;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: #2d3748;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #2d3748;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== 搜索框 ==================== */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
}

.search-box button {
    padding: 10px 20px;
}

/* ==================== 状态标签 ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge-warning {
    background: #feebc8;
    color: #7c2d12;
}

/* ==================== 登录页面 ==================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
}

.login-box .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* ==================== 根目录卡片 ==================== */
.root-directory-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.root-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

.root-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.root-actions {
    display: flex;
    gap: 10px;
}

.account-mapping-section {
    background: #f7fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 同步账号配置 - 紧凑版（与本地项目一致） */
.sync-account-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.sync-account-compact:hover {
    border-color: #cbd5e0;
    background: #edf2f7;
}

.sync-account-compact .account-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    flex-shrink: 0;
}

.sync-account-compact .type-icon {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.sync-account-compact .type-icon .netdisk-icon {
    width: 18px;
    height: 18px;
}

.sync-account-compact .account-name-compact {
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.sync-account-compact .toggle-mini {
    position: relative;
    width: 32px;
    height: 18px;
    background: #cbd5e0;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sync-account-compact .toggle-mini.active {
    background: #48bb78;
}

.sync-account-compact .toggle-mini::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s;
}

.sync-account-compact .toggle-mini.active::after {
    left: 16px;
}

.sync-account-compact .path-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.sync-account-compact .path-input-compact {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    transition: all 0.2s;
    min-width: 0;
}

.sync-account-compact .path-input-compact:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 2px rgba(90, 103, 216, 0.3);
}

.sync-account-compact .btn-browse-compact {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #5a67d8;
    color: white;
    border: 1px solid #5a67d8;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sync-account-compact .btn-browse-compact:hover {
    background: #4c51bf;
    transform: scale(1.05);
}

.account-mapping-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.account-mapping-item:last-child {
    margin-bottom: 0;
}

.account-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.account-select-item:hover {
    border-color: #5a67d8;
    background: #f7fafc;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    margin-bottom: 5px;
}

.folder-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.folder-item.file {
    cursor: default;
    opacity: 0.6;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
}

.mapping-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mapping-status.enabled {
    background: #c6f6d5;
    color: #22543d;
}

.mapping-status.disabled {
    background: #fed7d7;
    color: #742a2a;
}

.path-display {
    flex: 1;
    padding: 8px 12px;
    background: #edf2f7;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
}

/* ==================== 树形结构 ==================== */
.tree-node {
    margin-left: 20px;
}

.tree-item {
    padding: 8px 12px;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.tree-item:hover {
    background: #edf2f7;
}

.tree-item.selected {
    background: #bee3f8;
    border-left: 3px solid #3182ce;
}

/* ==================== 链接列表 ==================== */
.category-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
}

.category-header:hover {
    background: #edf2f7;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.category-actions {
    display: flex;
    gap: 10px;
}

.item-list {
    margin-top: 10px;
}

.item-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.item-row:last-child {
    border-bottom: none;
}

.item-id {
    width: 60px;
    color: #718096;
}

.item-name {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-keywords {
    flex: 1;
    color: #718096;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-access-key {
    width: 100px;
    color: #4a5568;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    text-align: center;
}

.item-actions {
    display: flex;
    gap: 8px;
}

/* ==================== 资源链接编辑 ==================== */
.resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    margin-bottom: 10px;
}

.resource-item input {
    flex: 1;
}

.resource-item select {
    width: 200px;
}

.drag-handle {
    cursor: move;
    color: #a0aec0;
    font-size: 18px;
}

/* ==================== 目录树样式（参考本地项目） ==================== */
.directory-item-wrapper {
    margin: 2px 0;
}

.directory-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    position: relative;
}

.directory-item:hover {
    background: #f7fafc;
}

.directory-item .expand-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #a0aec0;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.directory-item .expand-icon.expanded {
    color: #5a67d8;
}

.directory-item .expand-icon-placeholder {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
}

.directory-item .icon {
    font-size: 18px;
    flex-shrink: 0;
}

.directory-item .name {
    flex: 1;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-item .actions {
    display: none;
    gap: 8px;
    margin-left: auto;
}

.directory-item:hover .actions {
    display: flex;
}

.directory-item .action-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.directory-item .action-btn-share {
    background: #48bb78;
    color: white;
}

.directory-item .action-btn-share:hover {
    background: #38a169;
}

.directory-item .action-btn-delete {
    background: #e53e3e;
    color: white;
}

.directory-item .action-btn-delete:hover {
    background: #c53030;
}

.directory-children {
    margin-left: 0;
}

/* ==================== 分享链接样式 ==================== */
.share-link-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.share-link-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 14px;
}

.share-link-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Monaco', 'Courier New', monospace;
    background: white;
    color: #2d3748;
}

.share-link-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-copy-link {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy-link:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-copy-link:active {
    transform: translateY(0);
}

.share-link-loading {
    padding: 15px;
    text-align: center;
    color: #718096;
    background: #fff;
    border-radius: 6px;
    border: 1px dashed #cbd5e0;
}

.share-link-error {
    padding: 15px;
    text-align: center;
    color: #e53e3e;
    background: #fff5f5;
    border-radius: 6px;
    border: 1px solid #feb2b2;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .page {
        padding: 15px;
    }
    
    .share-link-display {
        flex-direction: column;
    }
    
    .btn-copy-link {
        width: 100%;
    }
}

/* ==================== 资源链接行布局 ==================== */
.resource-grid {
    display: grid;
    grid-template-columns: 40px 80px 130px minmax(200px, 1fr) 130px 80px 60px;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.resource-grid input,
.resource-grid button,
.resource-grid .res-dir-cell {
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
    font-size: 13px;
    box-sizing: border-box;
    min-width: 0;
}

.resource-grid input {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    width: 100%;
    min-width: 0;
}

.resource-grid .res-dir-cell {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    font-size: 12px;
}

.resource-grid .res-pantype-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    height: 32px;
}

.resource-grid .res-pantype-cell label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.resource-grid .res-pantype-cell input[type="checkbox"],
.resource-grid .res-pantype-cell input[type="radio"] {
    height: auto;
    width: auto;
    padding: 0;
    margin: 0;
}

.resource-grid .res-pantype-cell img {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

/* 批量更新按钮样式 */
.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0e8272 0%, #2dd36f 100%);
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.3);
}

/* 群发消息 */
.bim-scroll-panel {
    overflow-y: auto;
    overflow-x: hidden;
    height: 430px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}
.bim-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}
.bim-table th,
.bim-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 第1列：序号/checkbox */
.bim-table thead th:nth-child(1),
.bim-table tbody td:nth-child(1) {
    width: 36px;
}
/* 第3列：GID */
.bim-table thead th:nth-child(3),
.bim-table tbody td:nth-child(3) {
    width: 30%;
    font-size: 12px;
    color: #4a5568;
}
/* 第4列：未读/操作 */
.bim-table thead th:nth-child(4),
.bim-table tbody td:nth-child(4) {
    width: 52px;
    text-align: center;
}
.bim-table thead th {
    background: #f7fafc;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 1px 0 #edf2f7;
}
/* 待发送列表移除按钮 */
#bim-pending-tbody td:nth-child(4) {
    padding: 3px 4px;
}
/* 占位符按钮组 */
.bim-placeholder-btns {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.bim-ph-label {
    font-size: 12px;
    color: #718096;
    white-space: nowrap;
}
.bim-ph-btn {
    display: inline-block;
    padding: 2px 9px;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid #c6d4e8;
    border-radius: 12px;
    background: #ebf4ff;
    color: #2b6cb0;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.bim-ph-btn:hover {
    background: #bee3f8;
    border-color: #90cdf4;
}
.bim-btn-remove {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f7fafc;
    color: #e53e3e;
    cursor: pointer;
    white-space: nowrap;
}
.bim-btn-remove:hover {
    background: #fff5f5;
    border-color: #e53e3e;
}
.bim-msg-row {
    margin-bottom: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.bim-msg-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* ---- 待发送列表：配置保存区 ---- */
.bim-config-wrap {
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.bim-config-save-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.bim-config-name-input {
    flex: 1;
    min-width: 0;
    max-width: 220px;
    height: 28px;
    padding: 0 8px;
    font-size: 13px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    outline: none;
    color: #2d3748;
    background: #fff;
    transition: border-color 0.15s;
}
.bim-config-name-input:focus {
    border-color: #4299e1;
}
.bim-config-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
    align-items: center;
}
.bim-config-empty {
    font-size: 12px;
    color: #a0aec0;
}
.bim-config-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 10px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    color: #2b6cb0;
    transition: background 0.15s, border-color 0.15s;
    max-width: 200px;
}
.bim-config-chip:hover {
    background: #bee3f8;
    border-color: #90cdf4;
}
.bim-config-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}
.bim-config-chip-count {
    display: inline-block;
    padding: 0 5px;
    background: #2b6cb0;
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    line-height: 16px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.bim-config-chip-del {
    background: none;
    border: none;
    color: #90cdf4;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 0 0 2px;
    flex-shrink: 0;
    transition: color 0.1s;
}
.bim-config-chip-del:hover {
    color: #e53e3e;
}

/* ---- 群文件选择器 ---- */
.bim-file-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bim-file-selected {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #4a5568;
    min-height: 28px;
    flex: 1;
    min-width: 0;
}
.bim-file-none-hint {
    color: #a0aec0;
    font-style: italic;
}
.bim-fp-icon-sm {
    font-size: 15px;
    flex-shrink: 0;
}
.bim-fp-sel-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 380px;
    color: #2d3748;
    font-weight: 500;
}

/* 文件选择弹框 */
.bim-fp-path-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #4a5568;
}
.bim-fp-back-btn {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #4a5568;
    white-space: nowrap;
    flex-shrink: 0;
}
.bim-fp-back-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.bim-fp-back-btn:not(:disabled):hover {
    background: #edf2f7;
}
#bim-fp-path-display {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-size: 12px;
    color: #718096;
}
.bim-fp-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 8px;
}
.bim-fp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #2d3748;
    border: 1px solid transparent;
    margin-bottom: 2px;
    transition: background 0.1s;
}
.bim-fp-dir:hover { background: #ebf8ff; border-color: #bee3f8; }
.bim-fp-file:hover { background: #f0fff4; border-color: #c6f6d5; }
.bim-fp-icon { font-size: 16px; flex-shrink: 0; }
.bim-fp-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bim-fp-sel-hint {
    font-size: 11px;
    color: #48bb78;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

/* ---- 表头排序 ---- */
.bim-sortable-th {
    cursor: pointer;
    user-select: none;
}
.bim-sortable-th:hover {
    background: #edf2f7;
}
.bim-sort-icon {
    display: inline-block;
    font-size: 12px;
    color: #a0aec0;
    margin-left: 2px;
    vertical-align: middle;
    transition: color 0.15s;
}
.bim-sortable-th:hover .bim-sort-icon {
    color: #4299e1;
}

/* ---- 群列表：已在待发送标记 ---- */
.bim-row-in-pending {
    background: #f0fff4;
}
.bim-in-pending-badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 11px;
    background: #c6f6d5;
    color: #276749;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 3px;
    white-space: nowrap;
}
