/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

/* 主布局 */
.wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    background-color: #34495e;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar-header .sidebar-subtitle {
    font-size: 12px;
    color: #bdc3c7;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header .sidebar-subtitle {
    display: none;
}

.sidebar.collapsed .sidebar-header h3 {
    font-size: 16px;
}

.sidebar-header i {
    margin-right: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav .nav {
    width: 100%;
}

.sidebar-nav .nav-item {
    position: relative;
}

.sidebar-nav .nav-link {
    color: #ecf0f1;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.sidebar-nav .nav-link span {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar-nav .nav-link:hover {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background-color: #3498db;
    border-left-color: #2980b9;
    color: #fff;
}

.sidebar-nav .nav-link i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* 侧边栏容器样式 */
.sidebar-container {
    width: 250px;
    transition: all 0.3s ease;
}

.wrapper:has(.sidebar.collapsed) .sidebar-container {
    width: 60px;
}

/* 导航分组标题样式 */
.sidebar-nav .nav-group-header {
    color: #95a5a6;
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 8px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-nav .nav-group-header:first-child {
    border-top: none;
    margin-top: 0;
}

.sidebar-nav .nav-group-header span {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav .nav-group-header {
    display: none;
}

.sidebar-nav .nav-group-header i {
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.7;
}

/* 主内容区域 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部导航栏 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-name {
    margin-right: 15px;
    font-weight: 500;
    color: #333;
}

.user-info .dropdown-toggle {
    color: #333;
    text-decoration: none;
}

.user-info .dropdown-toggle:hover {
    color: #3498db;
}

/* 页面内容 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f7fa;
}

.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 统计卡片 */
.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-right: 20px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 24px;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.table tbody td {
    vertical-align: middle;
    text-align: center;
}

.table-hover tbody tr:hover {
    background-color: #f5f7fa;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-success {
    background-color: #10b981;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: #06b6d4;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #0891b2;
}

.btn-light {
    background-color: #f1f5f9;
    color: #374151;
}

.btn-light:hover {
    background-color: #e2e8f0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    width: 100%;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-label {
    font-weight: normal;
    color: #4b5563;
    cursor: pointer;
}

.form-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* 分页样式 */
.pagination {
    margin-top: 24px;
    justify-content: center;
    display: flex;
    gap: 8px;
}

.page-link {
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.page-link:hover {
    color: #3b82f6;
    background-color: #f8fafc;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #ffffff;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box .form-control {
    flex: 1;
    max-width: 350px;
    min-width: 200px;
}

.search-box .btn {
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main {
        margin-left: 0;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box .form-control {
        max-width: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页面加载动画 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.page-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 消息提示 */
.alert {
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.alert-error {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.alert-warning {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.alert-info {
    color: #0369a1;
    background-color: #e0f2fe;
    border-color: #bae6fd;
}

/* 通知容器样式 */
.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    width: 100%;
}

.notifications-container .alert {
    margin-bottom: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 操作日志页面样式 */
.log-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.log-level.success {
    background-color: #d4edda;
    color: #155724;
}

.log-level.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 数据备份页面样式 */
.backup-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.backup-status.success {
    background-color: #d4edda;
    color: #155724;
}

.backup-status.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.backup-status.running {
    background-color: #fff3cd;
    color: #856404;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1a1;
}

/* 隐藏类 */
.hidden {
    display: none;
}

/* 显示类 */
.visible {
    display: block;
}

/* 图片上传预览样式 */
.image-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

.image-upload-preview .image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
}

.image-upload-preview .image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-preview .image-preview-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-preview .image-preview-item .delete-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* 隐藏原始文件输入 */
input[type="file"] {
    display: none;
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 400px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.login-body {
    padding: 30px 20px;
}

.login-page .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-page .alert {
    margin-bottom: 20px;
    border-radius: 6px;
    padding: 12px;
}

.login-page .form-check {
    margin-bottom: 20px;
}

.login-page .form-check-label {
    color: #666;
    font-size: 14px;
}

.login-page .forgot-password {
    text-align: center;
    margin-top: 15px;
}

.login-page .forgot-password a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.login-page .forgot-password a:hover {
    text-decoration: underline;
}

.login-error {
    display: none;
}

.login-error.show {
    display: block;
}

/* 回滚页面样式 */
#rollbackProgressBar {
    width: 0%;
    transition: width 0.3s ease;
}

/* 文件上传进度样式 */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.upload-progress-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.upload-icon {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

.upload-progress-card h5 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-weight: 600;
}

.upload-progress-card .filename {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 8px 0;
    word-break: break-all;
}

.upload-progress-card .filesize {
    color: #9ca3af;
    font-size: 12px;
    margin: 0 0 24px 0;
}

.upload-progress-card .progress {
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.upload-progress-card .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.upload-progress-card .status {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 8px 0;
}

.upload-progress-card .uploaded-size {
    color: #9ca3af;
    font-size: 12px;
    margin: 0;
}

/* Toast通知样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 500px;
}

.toast-notification i {
    font-size: 20px;
}

.toast-notification span {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.toast-close:hover {
    color: #4b5563;
}

.toast-notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 快速分配模态框样式 */
.allocation-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.allocation-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.allocation-steps .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.allocation-steps .step.active .step-number {
    background-color: #3b82f6;
    color: white;
}

.allocation-steps .step-title {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.allocation-steps .step.active .step-title {
    color: #3b82f6;
    font-weight: 600;
}

.allocation-steps .step-line {
    flex: 1;
    height: 2px;
    background-color: #e5e7eb;
    margin: 0 16px;
    margin-bottom: 24px;
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.reward-fields-selection {
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.reward-fields-selection .form-check {
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.reward-fields-selection .form-check:hover {
    background-color: #f3f4f6;
}

.reward-fields-selection .field-name {
    font-weight: 500;
    color: #1f2937;
}

.reward-fields-selection .field-amount {
    margin-left: 8px;
    font-weight: 600;
}

.selected-fields-summary {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background-color: #eff6ff;
    border-radius: 8px;
}

.selected-fields-summary p {
    margin: 0;
    color: #6b7280;
}

.selected-fields-summary span {
    font-weight: 600;
    color: #3b82f6;
}

.target-user-selection {
    padding: 16px;
}

.target-user-selection .form-check {
    padding: 12px;
    background-color: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
}

.allocation-mode-selection {
    padding: 16px;
}

.mode-input {
    margin-top: 8px;
    padding-left: 32px;
}

.allocation-preview {
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.allocation-preview table {
    margin: 0;
}

.allocation-preview th {
    width: 120px;
    background-color: #f3f4f6;
}

/* 新手引导样式 */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.guide-highlight {
    position: absolute;
    border: 2px solid #3b82f6;
    border-radius: 4px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    background-color: white;
    z-index: 10001;
    transition: all 0.3s ease;
}

.guide-tooltip {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    z-index: 10002;
    animation: slideIn 0.3s ease;
}

.guide-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.guide-tooltip-header h5 {
    margin: 0;
    color: #1f2937;
    font-weight: 600;
}

.guide-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.guide-close:hover {
    color: #4b5563;
}

.guide-tooltip-body {
    padding: 20px;
}

.guide-tooltip-body p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.guide-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.guide-progress {
    color: #6b7280;
    font-size: 14px;
}

.guide-progress span {
    font-weight: 600;
    color: #3b82f6;
}

.guide-buttons {
    display: flex;
    gap: 8px;
}

.guide-overlay.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.step-actions button.hidden {
    display: none;
}

/* 回滚向导样式 */
.rollback-wizard {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 24px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 3px solid #fff;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.step.active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.step.completed .step-number {
    background-color: #10b981;
    color: #fff;
}

.step.completed .step-label {
    color: #10b981;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.step-actions .btn {
    min-width: 120px;
}

.step-actions .btn-prev {
    background-color: #e2e8f0;
    color: #374151;
}

.step-actions .btn-prev:hover {
    background-color: #cbd5e1;
    color: #1f2937;
}

/* 用户头像样式 */
.user-avatar-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-avatar-sm:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* 用户信息单元格 */
.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.user-info-cell .user-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
}

.user-info-cell .user-phone {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* 排行榜样式 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}

.ranking-item.rank-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.ranking-item.rank-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #94a3b8;
}

.ranking-item.rank-3 {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #f87171;
}

.ranking-item .rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.ranking-item .rank .rank-number {
    font-size: 14px;
}

.ranking-item .avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-item .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-item .avatar i {
    font-size: 18px;
    color: #9ca3af;
}

.ranking-item .info {
    flex: 1;
    min-width: 0;
}

.ranking-item .info .name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item .info .team,
.ranking-item .info .members {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item .profit {
    font-weight: 600;
    color: #10b981;
    font-size: 14px;
    white-space: nowrap;
}

/* 等级分布样式 */
.level-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-item .level-name {
    width: 80px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
    flex-shrink: 0;
}

.level-item .level-bar {
    flex: 1;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.level-item .level-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.level-item .level-count {
    width: 50px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
    flex-shrink: 0;
}

/* 图片懒加载占位符 */
.img-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #9ca3af;
    font-size: 12px;
}

/* 图片加载动画 */
.img-loading {
    position: relative;
    overflow: hidden;
}

.img-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 图片加载失败样式 */
.img-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fef2f2;
    color: #ef4444;
    font-size: 12px;
}

.img-error::before {
    content: '\f06e';
    font-family: 'FontAwesome';
    margin-right: 4px;
}

/* 响应式图片 */
@media (max-width: 1200px) {
    .user-avatar-sm {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .ranking-item .avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}

@media (max-width: 992px) {
    .user-info-cell {
        gap: 8px;
    }
    
    .user-info-cell .user-name {
        font-size: 13px;
    }
    
    .user-info-cell .user-phone {
        font-size: 11px;
    }
    
    .ranking-item {
        padding: 10px;
        gap: 10px;
    }
    
    .ranking-item .info .name {
        font-size: 13px;
    }
    
    .ranking-item .profit {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .user-avatar-sm {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .user-info-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .ranking-item .avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .ranking-item .rank {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ranking-item .avatar i {
        font-size: 14px;
    }
    
    .level-item .level-name {
        width: 60px;
        font-size: 12px;
    }
    
    .level-item .level-count {
        width: 40px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .user-avatar-sm {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        border-width: 1px;
    }
    
    .ranking-item {
        padding: 8px;
        gap: 8px;
    }
    
    .ranking-item .avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .ranking-item .info .name {
        font-size: 12px;
    }
    
    .ranking-item .info .team,
    .ranking-item .info .members {
        font-size: 11px;
    }
    
    .ranking-item .profit {
        font-size: 12px;
    }
}

/* 排行榜点击展开样式 */
.ranking-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-item.clickable:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-item .expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.ranking-item .expand-icon i {
    font-size: 12px;
}

/* 团队成员容器样式 */
.team-members-container {
    display: none;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-top: -8px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.members-loading,
.members-empty,
.members-error {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

.members-error {
    color: #ef4444;
}

/* 内联成员列表样式 */
.inline-member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.member-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar i {
    font-size: 14px;
    color: #9ca3af;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
}

.view-all-members {
    text-align: center;
    padding: 10px;
    color: #3b82f6;
    cursor: pointer;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

.view-all-members:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 超小头像样式 */
.user-avatar-xs {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background-color: #f1f5f9;
}

/* 表格列分组样式 */
.table-grouped thead tr.group-header {
    background-color: #f8fafc;
}

.table-grouped .group-title {
    text-align: center;
    font-weight: 600;
    color: #374151;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.table-grouped .group-title i {
    margin-right: 8px;
    color: #6b7280;
}

.table-grouped .group-title .group-toggle {
    padding: 2px 6px;
    margin-left: 8px;
    color: #9ca3af;
    font-size: 12px;
}

.table-grouped .group-title .group-toggle:hover {
    color: #3b82f6;
}

.table-grouped .group-title.collapsed {
    background-color: #f1f5f9;
}

.table-grouped .group-title.group-basic {
    background-color: #eff6ff;
    border-bottom-color: #bfdbfe;
}

.table-grouped .group-title.group-basic i {
    color: #3b82f6;
}

.table-grouped .group-title.group-reward {
    background-color: #f0fdf4;
    border-bottom-color: #bbf7d0;
}

.table-grouped .group-title.group-reward i {
    color: #10b981;
}

.table-grouped .group-title.group-status {
    background-color: #fefce8;
    border-bottom-color: #fef08a;
}

.table-grouped .group-title.group-status i {
    color: #eab308;
}

.table-grouped .column-headers th {
    background-color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.table-grouped .col-checkbox {
    width: 40px;
    text-align: center;
}

.table-grouped .col-action {
    width: 100px;
    text-align: center;
}

/* 数据行样式 */
.table-grouped .data-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-grouped .data-row:hover {
    background-color: #f8fafc;
}

.table-grouped .data-row.expanded {
    background-color: #eff6ff;
}

.table-grouped .data-row td {
    padding: 12px;
    vertical-align: middle;
    font-size: 13px;
}

.table-grouped .data-row td.col-basic {
    background-color: #fafbfc;
}

.table-grouped .data-row td.col-reward {
    background-color: #f0fdf4;
}

.table-grouped .data-row td.col-status {
    background-color: #fefce8;
}

/* 详情行样式 */
.table-grouped .detail-row {
    background-color: #ffffff;
}

.table-grouped .detail-cell {
    padding: 0 !important;
    border: none;
}

.row-detail-content {
    padding: 20px 24px;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    border-top: 2px solid #3b82f6;
    animation: slideDown 0.3s ease;
}

.row-detail-content .detail-section {
    margin-bottom: 16px;
}

.row-detail-content .detail-section:last-of-type {
    margin-bottom: 0;
}

.row-detail-content .detail-section h6 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.row-detail-content .detail-section h6 i {
    margin-right: 8px;
    color: #6b7280;
}

.row-detail-content .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 24px;
}

.row-detail-content .detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.row-detail-content .detail-item .label {
    color: #6b7280;
    font-size: 13px;
    min-width: 80px;
}

.row-detail-content .detail-item .value {
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
}

.row-detail-content .detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* 操作下拉菜单样式 */
.action-dropdown .dropdown-menu {
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 0;
}

.action-dropdown .dropdown-item {
    padding: 8px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-dropdown .dropdown-item:hover {
    background-color: #f3f4f6;
}

.action-dropdown .dropdown-item i {
    width: 16px;
    text-align: center;
}

.action-dropdown .dropdown-item.text-success:hover {
    background-color: #d1fae5;
}

.action-dropdown .dropdown-item.text-warning:hover {
    background-color: #fef3c7;
}

.action-dropdown .dropdown-item.text-danger:hover {
    background-color: #fee2e2;
}

/* 状态标签样式 */
.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag.status-matched {
    background-color: #d1fae5;
    color: #065f46;
}

.status-tag.status-unmatched {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-tag.status-multiple {
    background-color: #fef3c7;
    color: #92400e;
}

/* 奖励字段标签样式 */
.reward-field-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 2px;
}

/* 空数据提示 */
.empty-tip {
    padding: 40px !important;
    color: #9ca3af;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .row-detail-content .detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .table-grouped .group-title {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .table-grouped .column-headers th {
        font-size: 11px;
        padding: 8px;
    }
    
    .table-grouped .data-row td {
        font-size: 12px;
        padding: 8px;
    }
    
    .row-detail-content {
        padding: 16px;
    }
    
    .row-detail-content .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .row-detail-content .detail-actions {
        flex-wrap: wrap;
    }
    
    .row-detail-content .detail-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }
}

/* 导入向导样式 */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.wizard-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.wizard-step.active .step-number {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.wizard-step.completed .step-number {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

.wizard-step.completed .step-number::after {
    content: '\f00c';
    font-family: 'FontAwesome';
}

.wizard-step .step-title {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.wizard-step.active .step-title {
    color: #3b82f6;
    font-weight: 600;
}

.wizard-step.completed .step-title {
    color: #10b981;
}

.wizard-content {
    min-height: 400px;
    padding: 20px;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.upload-area.dragover {
    border-color: #3b82f6;
    background-color: #dbeafe;
}

.upload-area .upload-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.upload-area:hover .upload-icon {
    color: #3b82f6;
}

.upload-area h5 {
    color: #374151;
    margin-bottom: 8px;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    padding: 20px;
    background-color: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.upload-preview .file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-preview .file-info i {
    font-size: 32px;
    color: #10b981;
}

.upload-preview .file-info span {
    font-size: 14px;
    color: #374151;
}

.upload-preview .file-size {
    color: #6b7280;
    font-size: 12px;
}

/* 字段识别样式 */
.field-recognition {
    padding: 10px 0;
}

.field-box {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    min-height: 120px;
}

.field-box h6 {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.field-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.field-chip.income {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.field-chip.deduction {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.field-chip.basic {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.field-chip.exclude {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.field-chip:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.field-chip.dragging {
    opacity: 0.5;
    transform: scale(1.1);
}

.field-chip .field-name {
    font-weight: 500;
}

.field-chip .field-sample {
    font-size: 11px;
    opacity: 0.8;
}

.field-chip .chip-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.field-chip .chip-remove:hover {
    opacity: 1;
}

/* 用户匹配样式 */
.user-matching {
    padding: 10px 0;
}

.matching-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
}

.matching-stats .stat-item {
    text-align: center;
    padding: 16px 32px;
    border-radius: 8px;
    background-color: #f9fafb;
}

.matching-stats .stat-item.success {
    background-color: #d1fae5;
}

.matching-stats .stat-item.danger {
    background-color: #fee2e2;
}

.matching-stats .stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
}

.matching-stats .stat-item.success .stat-value {
    color: #065f46;
}

.matching-stats .stat-item.danger .stat-value {
    color: #991b1b;
}

.matching-stats .stat-label {
    font-size: 14px;
    color: #6b7280;
}

.matching-list {
    max-height: 400px;
    overflow-y: auto;
}

/* 计算配置样式 */
.calculation-config {
    padding: 10px 0;
}

.config-section {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.config-section h6 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.config-section h6 i {
    margin-right: 8px;
    color: #6b7280;
}

.formula-builder {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formula-fields,
.formula-operators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.calculation-preview {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

/* 确认提交样式 */
.confirmation-summary {
    padding: 10px 0;
}

.summary-card {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.summary-card h6 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.summary-card h6 i {
    margin-right: 8px;
    color: #6b7280;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: #6b7280;
}

.summary-item .value {
    font-weight: 500;
    color: #374151;
}

.confirmation-actions {
    margin-top: 24px;
    padding: 16px;
    background-color: #eff6ff;
    border-radius: 8px;
}

/* 反馈容器样式 */
.feedback-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.feedback-toast i {
    font-size: 18px;
}

.feedback-toast span {
    font-size: 14px;
    color: #374151;
}

.feedback-toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* 利润计算明细样式 */
.profit-calculation {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 16px;
}

.calculation-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.calculation-column {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.calculation-column .column-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
}

.calculation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calculation-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dashed #e5e7eb;
}

.calculation-list li:last-child {
    border-bottom: none;
}

.calculation-list .field-name {
    color: #6b7280;
}

.calculation-list .amount {
    font-weight: 500;
}

.column-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #e5e7eb;
    font-size: 13px;
}

.calculation-result {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #eff6ff;
    border-radius: 8px;
}

.calculation-result .result-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculation-result .result-label {
    color: #6b7280;
    font-size: 13px;
}

.calculation-result .result-value {
    font-size: 16px;
    font-weight: 600;
}

.calculation-result .result-formula {
    color: #6b7280;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wizard-steps {
        padding: 0 10px;
    }
    
    .wizard-steps::before {
        left: 30px;
        right: 30px;
    }
    
    .wizard-step .step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .wizard-step .step-title {
        font-size: 10px;
    }
    
    .calculation-row {
        flex-direction: column;
    }
    
    .matching-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .matching-stats .stat-item {
        padding: 12px 24px;
    }
}

/* 工具栏响应式优化 - 利润表操作按钮 */
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* 确保按钮不被遮挡 */
.card-header .btn-toolbar .btn {
    position: relative;
    z-index: 10;
    white-space: nowrap;
}

/* 小屏幕适配 - 平板和手机 */
@media (max-width: 992px) {
    .card-header .col-auto {
        width: 100%;
        max-width: none;
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
    }
    
    .card-header .btn-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .card-header .btn-toolbar .btn-group {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .card-header .btn-toolbar .btn-group .btn {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .card-header .btn-toolbar .btn-group {
        flex-direction: column;
    }
    
    .card-header .btn-toolbar .btn-group .btn {
        margin-bottom: 4px;
    }
}

/* 批量分配按钮特殊样式增强 */
#batchDistributionBtn {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15);
    font-weight: 500;
}

#batchDistributionBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
    background-color: #0b5ed7 !important;
}

#batchDistributionBtn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 123, 255, 0.15);
}

#batchDistributionBtn:disabled,
#batchDistributionBtn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.field-chip.selectable {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-chip.selectable .field-check {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.field-chip.selectable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.field-chip.selectable.selected {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.08);
}

.field-chip.selectable.selected.income {
    background-color: rgba(25, 135, 84, 0.12);
    border-color: #198754;
}

.field-chip.selectable:not(.selected) {
    opacity: 0.75;
}

.field-chip.selectable:not(.selected):hover {
    opacity: 1;
    background-color: rgba(108, 117, 125, 0.08);
}

#unselectedFieldNotice {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}