/* treeEditor.css - 族谱编辑器样式（参考小程序可折叠树形列表） */

/* 导航栏WebSocket配置区域 */
.nav-ws-config {
    display: flex;
    align-items: center;
    gap: 8px;
}

#wsUrlInput {
    width: 200px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 12px;
    transition: all 0.3s ease;
}

#wsUrlInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#wsUrlInput:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    width: 280px;
}

.ws-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.ws-status.connected {
    background: #10b981;
    color: white;
}

.ws-status.error {
    background: #ef4444;
    color: white;
}

.ws-status.connecting {
    background: #f59e0b;
    color: white;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 登录区域 */
.login-section {
    max-width: 400px;
    margin: 50px auto;
}

/* 族谱列表区域 */
#treeListSection {
    padding: 20px;
}

.tree-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tree-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tree-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.tree-card h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 18px;
}

.tree-card p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 编辑器头部 */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.editor-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 搜索结果提示 */
.search-result-hint {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 8px;
}

.search-result-hint.success {
    color: #059669;
    background: #ecfdf5;
}

.search-result-hint.empty {
    color: #dc2626;
    background: #fef2f2;
}

/* 世代筛选器 */
.level-filter {
    margin-bottom: 15px;
    padding: 0 20px;
}

.level-filter select {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.level-filter select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 聚焦提示栏 */
.focus-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.focus-bar-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.focus-label {
    font-size: 12px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.focus-node-name {
    font-size: 14px;
    font-weight: 600;
}

/* 树形容器 */
.tree-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 500px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 树节点 */
.tree-node-item {
    margin: 4px 0;
}

.node-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 8px;
    border: 1px solid transparent;
}

.node-row:hover {
    background: #f0f4ff;
    border-color: #e0e7ff;
}

.node-row.selected {
    background: #e0e7ff;
    border-color: #667eea;
}

/* 展开/折叠按钮 */
.toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #667eea;
    font-size: 12px;
    flex-shrink: 0;
}

.toggle-btn:hover {
    background: #e0e7ff;
}

.toggle-btn.no-children {
    cursor: default;
    color: #d1d5db;
}

.toggle-btn.no-children:hover {
    background: transparent;
}

/* 世代标签 */
.level-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

/* 节点信息 */
.node-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 0;
    flex-wrap: wrap;
}

.node-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.node-name mark {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
}

/* 性别标签 */
.gender-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
    flex-shrink: 0;
}

.gender-tag.male {
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.gender-tag.female {
    color: #ec4899;
    background: #fdf2f8;
    border: 1px solid #fce7f3;
}

/* 生卒年份 */
.birth-death {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* 后代数量 */
.descendant-count {
    font-size: 11px;
    color: #10b981;
    font-weight: 500;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #a7f3d0;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
}

/* 虚拟根节点统计文本 */
.virtual-stats-text {
    font-size: 12px;
    color: #1890ff;
    font-weight: 600;
    background: #e6f7ff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #91d5ff;
    flex-shrink: 0;
}

/* 操作按钮 */
.node-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.add-btn {
    background: #10b981;
    color: white;
    border: 2px solid #059669;
}

.add-btn:hover {
    transform: scale(1.1);
    background: #059669;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: 2px solid #dc2626;
    font-size: 18px;
}

.delete-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

.focus-btn {
    background: #8b5cf6;
    color: white;
    border: 2px solid #7c3aed;
    font-size: 18px;
}

.focus-btn:hover {
    transform: scale(1.1);
    background: #7c3aed;
}

/* 聚焦状态行 */
.node-row.focused {
    background: linear-gradient(135deg, #f0e7ff 0%, #e0d7ff 100%);
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* 节点编辑面板 */
#nodeEditPanel {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 400px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
}

.panel-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 20px;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

#nodeEditPanel form {
    padding: 20px 24px;
}

#nodeForm .form-group {
    margin-bottom: 16px;
}

#nodeForm label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

#nodeForm input[type="text"],
#nodeForm select,
#nodeForm textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

#nodeForm input:focus,
#nodeForm select:focus,
#nodeForm textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#nodeForm textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-actions button {
    flex: 1;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* 消息提示 */
.message-area {
    margin: 15px 0;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid #10b981;
    margin-bottom: 10px;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid #ef4444;
    margin-bottom: 10px;
}

.info-message {
    background: #dbeafe;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid #3b82f6;
    margin-bottom: 10px;
}

/* 加载指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #nodeEditPanel {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        max-height: none;
        margin: 20px 0;
    }
    
    .tree-container {
        max-height: none;
    }
    
    .tree-list-container {
        grid-template-columns: 1fr;
    }
    
    .editor-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-buttons {
        width: 100%;
    }
    
    .header-buttons button {
        flex: 1;
    }
    
    .modal-content {
        width: 90%;
    }
}

/* 模态对话框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

/* 通用模态框内容样式（排除登录模态框） */
.modal-content:not(.login-modal) {
    background: white;
    border-radius: 16px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f3f4f6;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.modal-body input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 性别选择器 */
.gender-selector {
    display: flex;
    gap: 16px;
}

.gender-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.gender-option:hover {
    border-color: #cbd5e0;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option input[type="radio"]:checked + .gender-radio {
    border-color: #667eea;
}

.gender-option input[type="radio"]:checked + .gender-radio::after {
    opacity: 1;
}

.gender-option input[type="radio"]:checked ~ span:last-child {
    color: #667eea;
    font-weight: 600;
}

.gender-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.gender-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    position: relative;
    transition: all 0.2s;
}

.gender-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    opacity: 0;
    transition: opacity 0.2s;
}

.gender-radio.male {
    border-color: #3b82f6;
}

.gender-radio.male::after {
    background: #3b82f6;
}

.gender-radio.female {
    border-color: #ec4899;
}

.gender-radio.female::after {
    background: #ec4899;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 2px solid #f3f4f6;
}

.modal-footer button {
    flex: 1;
}

/* ==================== 编辑者管理样式 ==================== */

.editors-list {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    min-height: 40px;
}

.editor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.editor-item:last-child {
    margin-bottom: 0;
}

.editor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.editor-nickname {
    font-weight: 500;
    color: var(--text-primary);
}

.editor-id {
    font-size: 12px;
    color: #6b7280;
}

.btn-remove {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove:hover {
    background: #ff7875;
}

.editors-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.help-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.empty-text {
    text-align: center;
    color: #999;
    padding: 10px;
}

/* 用户选择器模态框 */
.user-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.user-picker-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.user-picker-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-picker-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.user-picker-close {
    cursor: pointer;
    font-size: 24px;
    color: #6b7280;
    line-height: 1;
    transition: color 0.2s;
}

.user-picker-close:hover {
    color: var(--danger-color);
}

.user-picker-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.user-picker-search {
    margin-bottom: 16px;
}

.user-picker-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.user-picker-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-picker-select-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 12px;
}

.select-all-btn {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s;
}

.select-all-btn:hover {
    color: var(--primary-dark);
}

.selected-count {
    font-size: 13px;
    color: #6b7280;
}

.user-picker-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.user-picker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.user-picker-item:last-child {
    border-bottom: none;
}

.user-picker-item:hover {
    background: #f9fafb;
}

.user-picker-item.selected {
    background: #ecfdf5;
}

/* 禁用状态（继承的编辑者） */
.user-picker-item.disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.user-picker-item.disabled:hover {
    background: transparent;
}

.user-checkbox.disabled {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

/* 继承标签样式 */
.inherited-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 500;
    margin-left: 8px;
    border: 1px solid #fcd34d;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-nickname {
    font-weight: 500;
    color: var(--text-primary);
}

.user-id {
    font-size: 12px;
    color: #6b7280;
}

.user-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.user-picker-item.selected .user-checkbox {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.user-picker-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.user-picker-footer .btn {
    min-width: 80px;
}

/* ==================== 配偶节点管理样式 ==================== */

.spouse-manage-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.spouse-list {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spouse-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.spouse-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.spouse-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.spouse-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
}

.spouse-dates {
    font-size: 12px;
    color: #6b7280;
}

.spouse-actions-inline {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.spouse-actions {
    margin-top: 10px;
}

.help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.5;
}

/* ==================== 自定义确认对话框样式 ==================== */

.confirm-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #fcd34d;
}

.confirm-icon {
    font-size: 32px;
    line-height: 1;
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #92400e;
}

.confirm-modal-body {
    padding: 24px;
}

.confirm-modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.confirm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    background: #f9fafb;
}

.confirm-modal-footer .btn {
    min-width: 80px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.confirm-modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
