/* ==================== 主应用页面 ==================== */
#app-page {
    flex-direction: column;
}

/* ==================== 顶部导航栏 ==================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-toggle:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 32px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.search-bar input:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== 全局搜索结果样式 ==================== */
.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.search-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-empty p {
    margin: 0;
    font-size: 14px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.search-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-close:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

.search-section {
    border-bottom: 1px solid var(--border-color);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section h4 {
    padding: 12px 16px 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section h4 i {
    font-size: 14px;
    color: var(--primary-color);
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

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

.search-item:hover {
    background-color: var(--gray-50);
}

.search-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.search-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.search-item-meta .badge {
    font-size: 10px;
    padding: 2px 6px;
}

.search-item-meta .text-secondary {
    color: var(--text-secondary);
}

/* 搜索结果响应式 */
@media (max-width: 768px) {
    .global-search-results {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        margin-top: 0;
        border-radius: 0;
        max-height: calc(100vh - var(--header-height));
    }
    
    .search-item {
        padding: 16px;
    }
    
    .search-item-title {
        font-size: 15px;
    }
    
    .search-item-meta {
        font-size: 13px;
        margin-top: 4px;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.header-btn:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.header-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 通知徽章样式 */
.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* 脉冲动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    background: none;
    color: var(--text-primary);
}

.user-menu-btn:hover {
    background-color: var(--gray-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
}

.user-info {
    display: flex;
    gap: 12px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    flex: 1;
}

.user-name-large {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 13px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--gray-50);
}

.dropdown-item i {
    width: 20px;
    color: var(--text-secondary);
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: var(--transition);
    z-index: 999;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-nav {
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
    overflow: hidden;
}

.nav-item:hover {
    background-color: var(--gray-50);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    font-size: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

/* ==================== 主内容区 ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ==================== 基础样式 ==================== */
:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    
    /* 辅助色 */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    /* 文字色 */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    /* 边框 */
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 尺寸 */
    --sidebar-width: 200px;
    --header-height: 64px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* ==================== 页面容器 ==================== */
.page {
    display: none;
    width: 100%;
    height: 100vh;
}

.page.active {
    display: flex;
}

/* ==================== 登录页面 ==================== */
#login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

.login-branding {
    max-width: 500px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-container i {
    font-size: 48px;
}

.logo-container h1 {
    font-size: 36px;
    font-weight: 700;
}

.tagline {
    font-size: 18px;
    margin-bottom: 48px;
    opacity: 0.9;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.feature-item i {
    font-size: 20px;
    color: #10b981;
}

/* ==================== 导入导出功能区 ==================== */
.import-export-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.import-export-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.import-export-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-outline {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    transform: translateY(-1px);
    color: var(--text-primary);
}

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

.btn-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline:disabled:hover {
    background: var(--gray-100);
    border-color: var(--border-color);
    transform: none;
}

.import-export-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    text-align: center;
}

/* ==================== 徽章样式 ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* ==================== 空状态样式 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state.error-state {
    color: var(--danger-color);
}

.empty-state.error-state i {
    color: var(--danger-color);
    opacity: 0.7;
}

.login-right {
    flex: 0 0 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 60px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* 验证码样式 */
.captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-wrapper input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 16px;
}

.captcha-wrapper img {
    height: 42px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.captcha-wrapper img:hover {
    opacity: 0.75;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
}

.error-message {
    padding: 12px 16px;
    background-color: #fee2e2;
    color: #dc2626;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loader {
    display: inline-block;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.login-footer a {
    font-weight: 500;
}

/* ==================== 响应式 - 登录页面 ==================== */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .login-right {
        padding: 32px 24px;
    }
    
    .login-form-container h2 {
        font-size: 24px;
    }
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-content { flex: 1; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== 仪表盘网格 ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.view-all:hover { text-decoration: underline; }

.card-content { padding: 24px; }

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary);
}

.loading i { font-size: 20px; }

.chart-container {
    position: relative;
    height: 300px;
}

/* ==================== 新版仪表盘（简洁大方风格） ==================== */
.db-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 0 2px;
}

.db-breadcrumb i {
    font-size: 10px;
    color: #d9d9d9;
}

.db-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.db-top-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px;
    margin-bottom: 20px;
}

.db-card {
    background: #fff;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.db-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.db-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    margin: 0;
}

.db-header-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
    padding: 4px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.db-header-link:hover {
    color: #fff;
    background: var(--primary-color);
}

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

.db-card-body {
    padding: 24px;
}

/* 数据概览卡片 */
.db-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    min-height: 120px;
    align-items: center;
}

.db-kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 8px;
    padding: 20px 12px;
    border: 1px solid #f0f0f0;
    gap: 8px;
}

.db-kpi-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.db-kpi-value.blue   { color: #1890ff; }
.db-kpi-value.green  { color: #52c41a; }
.db-kpi-value.orange { color: #faad14; }
.db-kpi-value.red    { color: #f5222d; }

.db-kpi-label {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
}

/* 攻击类型与业务影响卡片 */
.db-attack-impact-card .db-card-body {
    padding: 8px 0 0;
}

.db-attack-impact-list {
    max-height: 280px;
    overflow-y: auto;
}

.attack-impact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

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

.attack-impact-row:hover {
    background: #f9fafb;
}

.attack-impact-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.attack-impact-info {
    flex: 1;
    min-width: 0;
}

.attack-impact-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.attack-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attack-risk-tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.5;
}

.attack-impact-desc {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.attack-impact-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.impact-label {
    color: #1890ff;
    font-weight: 500;
}

.impact-stats {
    color: rgba(0, 0, 0, 0.35);
}

.attack-impact-bar-wrap {
    flex-shrink: 0;
    width: 60px;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.attack-impact-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* 最近执行任务表格卡片 */
.db-table-card {
    margin-bottom: 24px;
}

.db-table-body {
    padding: 0 !important;
}

.db-table-body .loading,
.db-table-body .empty-state,
.db-table-body .error-state {
    padding: 40px 24px;
}

.db-exec-table {
    width: 100%;
    border-collapse: collapse;
}

.db-exec-table thead {
    background: #fafafa;
}

.db-exec-table th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.db-exec-table td {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    color: rgba(0, 0, 0, 0.65);
    font-size: 14px;
}

.db-exec-table tbody tr:hover {
    background: #fafafa;
}

.db-exec-table tbody tr:last-child td {
    border-bottom: none;
}

.db-type-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
}

.db-type-tag.model {
    color: #1890ff;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

.db-type-tag.vuln {
    color: #fa8c16;
    background: #fff7e6;
    border: 1px solid #ffd591;
}

.db-type-tag.gb {
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.db-type-tag.multimodal {
    color: #722ed1;
    background: #f9f0ff;
    border: 1px solid #d3adf7;
}

.db-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
}

.db-status-tag.completed {
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.db-status-tag.running {
    color: #1890ff;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

.db-status-tag.failed {
    color: #f5222d;
    background: #fff1f0;
    border: 1px solid #ffa39e;
}

.db-status-tag.pending {
    color: #faad14;
    background: #fffbe6;
    border: 1px solid #ffe58f;
}

/* 响应式 */
@media (max-width: 1200px) {
    .db-top-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .db-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .db-exec-table th:nth-child(4),
    .db-exec-table td:nth-child(4) {
        display: none;
    }
}

/* ==================== 数据表格 ==================== */
.data-table-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.data-table thead { background-color: var(--gray-50); }

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table .checkbox-col {
    width: 40px;
    text-align: center;
}

.data-table td:first-child:not(.checkbox-col),
.data-table th:first-child:not(.checkbox-col) {
    max-width: none;
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background-color: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ==================== 模型网格 ==================== */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

.model-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    align-self: start;
}

.model-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.model-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.model-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.model-info {
    flex: 1;
    min-width: 0;
}

.model-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.model-type {
    font-size: 13px;
    color: var(--text-secondary);
}

.model-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.model-description-structured {
    background: linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
    border: 1px solid #e5edf9;
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: -4px;
}

.model-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.model-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.model-meta-item-stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
}

.model-meta-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #5b6b85;
    letter-spacing: 0.02em;
}

.model-meta-value {
    color: var(--text-primary);
    min-width: 0;
}

.model-endpoint-value {
    display: block;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5f4;
    border-radius: 10px;
    font-family: var(--font-family-mono, 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace);
    font-size: 12px;
    line-height: 1.5;
    color: #42526b;
    word-break: break-all;
    margin-top: 2px;
}

.model-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.model-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.model-status.active {
    background-color: #d1fae5;
    color: #065f46;
}

.model-status.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius);
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

/* ==================== 设置页面 ==================== */
.settings-container { max-width: 800px; }

.settings-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== Toast通知 ==================== */
#toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 320px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.warning { border-left-color: var(--warning-color); }
.toast.info { border-left-color: var(--info-color); }

.toast-icon { font-size: 20px; }
.toast.success .toast-icon { color: var(--success-color); }
.toast.error .toast-icon { color: var(--danger-color); }
.toast.warning .toast-icon { color: var(--warning-color); }
.toast.info .toast-icon { color: var(--info-color); }

.toast-content { flex: 1; }

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.toast-close:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== 响应式 - 主应用 ==================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-center {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .page-actions .btn {
        flex: 0 0 auto;
        min-width: 120px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 0 16px;
    }
    
    .logo span {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .page-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 模态框样式 ==================== */
.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: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* ==================== 文件上传区域 ==================== */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.upload-icon {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-top: 16px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-details i {
    font-size: 20px;
    color: var(--primary-color);
}

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

/* ==================== 导入结果样式 ==================== */
.import-result {
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.import-result.success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.import-result.error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.import-result h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-result ul {
    margin: 0;
    padding-left: 20px;
}

.import-result li {
    margin-bottom: 4px;
    font-size: 14px;
}

.import-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.import-stat {
    text-align: center;
}

.import-stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.import-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== 响应式 - 模态框 ==================== */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .import-export-buttons {
        gap: 8px;
    }
    
    .btn-outline {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ==================== 密码修改模态框样式 ==================== */
#change-password-modal .modal-content {
    max-width: 600px;
}

.modal-form-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-form-content .modal-body {
    flex: 1;
    overflow-y: auto;
}

.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background-color: var(--danger-color);
}

.strength-fill.fair {
    width: 50%;
    background-color: var(--warning-color);
}

.strength-fill.good {
    width: 75%;
    background-color: var(--info-color);
}

.strength-fill.strong {
    width: 100%;
    background-color: var(--success-color);
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.strength-text span {
    font-weight: 500;
}

.strength-text span.weak {
    color: var(--danger-color);
}

.strength-text span.fair {
    color: var(--warning-color);
}

.strength-text span.good {
    color: var(--info-color);
}

.strength-text span.strong {
    color: var(--success-color);
}

.password-match {
    margin-top: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-match.match {
    color: var(--success-color);
}

.password-match.no-match {
    color: var(--danger-color);
}

.password-requirements {
    margin-top: 20px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.password-requirements h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.password-requirements li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background-color: var(--gray-200);
    color: var(--gray-400);
    flex-shrink: 0;
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.valid::before {
    background-color: var(--success-color);
    color: white;
}

.password-requirements li.invalid {
    color: var(--text-secondary);
}

.password-requirements li.invalid::before {
    content: '\f00d';
    background-color: var(--gray-200);
    color: var(--gray-400);
}

/* 修复密码输入框的样式 */
#change-password-modal .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#change-password-modal .password-input-wrapper input {
    width: 100%;
    padding-right: 48px;
    box-sizing: border-box;
}

#change-password-modal .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

#change-password-modal .toggle-password:hover {
    color: var(--text-primary);
    background-color: var(--gray-100);
    border-radius: 4px;
}

/* 执行详情弹窗（modal-overlay）样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 反馈弹窗需要显示在执行详情弹窗之上 */
#feedback-modal {
    z-index: 10001;
}

/* 确保模态框不会影响主布局 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
    position: relative;
    margin: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* ==================== 执行详情模态框样式 ==================== */
.modal-content.large {
    max-width: 900px;
    width: 95%;
}

/* ModalManager 动态创建的 large 模态框（large 类在 .modal 上） */
.modal.large .modal-content {
    max-width: 900px;
    width: 95%;
}

.modal.large .modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

.execution-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: var(--primary-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span,
.detail-item p {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
}

.progress-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.test-cases-list {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.test-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--border-color);
}

.test-case-item {
    background: white;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.test-case-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.test-case-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.test-case-meta .badge {
    font-size: 10px;
    padding: 2px 6px;
}

.test-case-result {
    margin-top: 4px;
}

.test-case-result small {
    font-size: 11px;
}

.execution-results {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.execution-results-list {
    display: flex;
    flex-direction: column;
}

.result-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.result-test-case {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.result-response,
.result-error {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-response label,
.result-error label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.response-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.error-content {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #991b1b;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 执行详情模态框响应式 */
@media (max-width: 768px) {
    .modal-content.large,
    .modal.large .modal-content {
        width: 98%;
        max-width: none;
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .test-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .execution-details {
        gap: 16px;
    }
    
    .detail-section,
    .progress-section,
    .test-cases-list,
    .execution-results {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .test-case-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 进度条样式已移至 progress.css 文件 */

/* ==================== 测试输入内容样式 ==================== */
.test-input-content {
    text-align: left !important;
    direction: ltr;
}

/* ==================== AI回答内容样式 ==================== */
.response-content {
    text-align: left !important;
    direction: ltr;
}

/* ==================== 表格操作按钮样式 ==================== */
.table-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.table-actions .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 4px;
}

.table-actions .icon-btn.text-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

.table-actions .icon-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ==================== 执行状态样式 ==================== */
.execution-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.execution-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.execution-progress .progress-bar {
    margin-bottom: 4px;
}

/* ==================== 模态框按钮样式 ==================== */
.modal-footer .btn {
    min-width: 100px;
}

.modal-footer .btn:last-child {
    margin-left: auto;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==================== 筛选栏样式 ==================== */
.filter-bar {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group .form-control {
    padding: 10px 14px;
}

.filter-bar .btn {
    margin-top: auto;
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-bar .btn {
        width: 100%;
    }
}

/* ==================== 导入标签页样式 ==================== */
.import-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.import-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.import-tab-btn:hover {
    color: #2563eb;
    background-color: #f0f9ff;
}

.import-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.import-tab-content {
    display: none;
}

.import-tab-content.active {
    display: block;
}

.smart-import-options {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.smart-import-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.smart-import-options input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.smart-import-options select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 导入结果样式 */
.import-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.import-stat {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
}

.import-stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.import-stat-label {
    font-size: 14px;
    color: #666;
}

.import-result {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.import-result.success {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

.import-result.error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.import-result h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.import-result.success h4 {
    color: #10b981;
}

.import-result.error h4 {
    color: #ef4444;
}

.import-result p {
    margin: 0;
    color: #333;
}

.import-result ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.import-result li {
    margin: 5px 0;
    color: #666;
}

/* ==================== 测试用例菜单树样式 ==================== */
.test-case-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 200px);
    margin-top: 20px;
}

.test-case-sidebar {
    width: 240px;
    min-width: 240px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header .search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-header .search-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.menu-tree-container {
    padding: 10px;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 8px;
}

.menu-header > i {
    font-size: 18px;
    margin-top: 2px;
    color: #1890ff;
}

.menu-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.menu-subtitle {
    font-size: 12px;
    font-weight: normal;
    color: #999;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.menu-item:hover {
    background: #f0f7ff;
}

.menu-item.active {
    background: #e6f4ff;
    border-left: 3px solid #1890ff;
    padding-left: 9px;
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.menu-item-content i {
    font-size: 14px;
    color: #666;
    width: 16px;
    text-align: center;
}

.menu-item.active .menu-item-content i {
    color: #1890ff;
}

.menu-item .category-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.menu-item.active .category-name {
    color: #1890ff;
    font-weight: 500;
}

.menu-item .badge {
    background: #e0e0e0;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.menu-item.active .badge {
    background: #1890ff;
    color: #fff;
}

.test-case-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.breadcrumb i {
    font-size: 12px;
    color: #999;
}

.breadcrumb span:last-child {
    color: #1890ff;
    font-weight: 500;
}

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

#test-cases-table-container {
    flex: 1;
    overflow: auto;
}

#test-cases-table-container .data-table {
    table-layout: fixed;
    width: 100%;
}

#test-cases-table-container .data-table th:nth-child(1),
#test-cases-table-container .data-table td:nth-child(1) {
    width: 40px;
}

#test-cases-table-container .data-table th:nth-child(2),
#test-cases-table-container .data-table td:nth-child(2) {
    width: 30%;
}

#test-cases-table-container .data-table th:nth-child(3),
#test-cases-table-container .data-table td:nth-child(3) {
    width: 12%;
}

#test-cases-table-container .data-table th:nth-child(4),
#test-cases-table-container .data-table td:nth-child(4) {
    width: 10%;
    text-align: center;
}

#test-cases-table-container .data-table th:nth-child(5),
#test-cases-table-container .data-table td:nth-child(5) {
    width: 10%;
    text-align: center;
}

#test-cases-table-container .data-table th:nth-child(6),
#test-cases-table-container .data-table td:nth-child(6) {
    width: 15%;
}

#test-cases-table-container .data-table th:nth-child(7),
#test-cases-table-container .data-table td:nth-child(7) {
    width: 90px;
    text-align: center;
}

#test-cases-table-container .data-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#test-cases-table-container .data-table td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .test-case-layout {
        flex-direction: column;
        height: auto;
    }
    
    .test-case-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .test-case-content {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .test-case-sidebar {
        max-height: 200px;
    }
    
    .menu-item {
        padding: 8px 10px;
    }
    
    .menu-item .category-name {
        font-size: 13px;
    }
}

/* ==================== GB差距分析弹窗样式 ==================== */
#gb-gaps-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.gb-gaps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gb-gap-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.gb-gap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.gb-gap-info {
    flex: 1;
    min-width: 0;
}

.gb-gap-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

/* 响应式：小屏幕下差距分析弹窗 */
@media (max-width: 640px) {
    #gb-gaps-modal .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .gb-gap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .gb-gap-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left !important;
    }
    
    .gb-gap-stats > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .gb-gap-stats > div:last-child {
        border-bottom: none;
    }
}

/* ==================== 测试用例复选框 & 批量删除 ==================== */
.checkbox-col {
    width: 40px;
    text-align: center;
}

.checkbox-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#batch-delete-test-cases-btn {
    transition: opacity 0.2s;
}

.data-table tbody tr.selected {
    background-color: rgba(59, 130, 246, 0.06);
}

/* ==================== 测试用例筛选面板 ==================== */
.tc-filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--border-radius, 8px);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tc-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.tc-filter-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}

.tc-filter-item .form-input,
.tc-filter-item .form-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    height: 34px;
}

.tc-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 1px;
}

#filter-btn.active {
    background: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
}

/* ==================== 测试用例分页 ==================== */
.tc-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.tc-pagination-info {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.tc-pagination-btns {
    display: flex;
    gap: 4px;
    align-items: center;
}

.tc-pagination-btns .btn {
    min-width: 32px;
    padding: 4px 8px;
    font-size: 13px;
}

/* ==================== 多模态检测页面 ==================== */

.mm-stats-grid {
    margin-bottom: 20px;
}

/* Tab 切换 */
.mm-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.mm-tab {
    padding: 10px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mm-tab:hover {
    color: var(--primary-color, #1890ff);
}

.mm-tab.active {
    color: var(--primary-color, #1890ff);
    border-bottom-color: var(--primary-color, #1890ff);
    font-weight: 600;
}

/* 主操作区左右分栏：配置区 / 评估结果区 各占 50% */
.mm-main-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .mm-main-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

.mm-left-column,
.mm-right-column {
    display: contents;
}

.mm-config-card {
    grid-column: 1;
    grid-row: 1;
}

.mm-result-card {
    grid-column: 2;
    grid-row: 1;
}

.mm-attack-details-card {
    grid-column: 1;
    grid-row: 2;
}

.mm-generated-images-card {
    grid-column: 2;
    grid-row: 2;
}

@media (max-width: 1024px) {
    .mm-config-card,
    .mm-result-card,
    .mm-attack-details-card,
    .mm-generated-images-card {
        grid-column: 1;
        grid-row: auto;
    }
}

.mm-config-card,
.mm-result-card,
.mm-attack-details-card,
.mm-generated-images-card {
    min-height: auto;
}

.mm-attack-details-card,
.mm-generated-images-card {
    display: none;
    align-self: stretch;
}

.mm-result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

/* 评估结果 */
.mm-result-content {
    padding: 0;
}

.mm-score-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.mm-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #2ecc71;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mm-score-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.mm-score-unit {
    font-size: 11px;
    color: #999;
}

.mm-score-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mm-risk-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.mm-attack-result {
    font-size: 13px;
    font-weight: 600;
}

.mm-attack-result.danger {
    color: #e74c3c;
}

.mm-attack-result.safe {
    color: #2ecc71;
}

/* 维度条 */
.mm-dimensions {
    margin-bottom: 16px;
}

.mm-dim-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mm-dim-label {
    width: 90px;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.mm-dim-bar-bg {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.mm-dim-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.mm-dim-value {
    width: 36px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* 摘要和证据 */
.mm-summary {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.mm-evidence {
    margin-top: 12px;
}

.mm-evidence-item {
    padding: 8px 12px;
    background: #fffbe6;
    border-left: 3px solid #f39c12;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
    font-size: 12px;
}

.mm-evidence-dim {
    display: inline-block;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    margin-right: 6px;
}

.mm-evidence-quote {
    color: #c0392b;
    font-style: italic;
}

.mm-evidence-analysis {
    display: block;
    margin-top: 4px;
    color: #555;
}

/* 3D模型显示区 */
.mm-details-image-layout {
    display: block;
    width: 100%;
}

.mm-details-image-layout > * {
    min-width: 0;
}

.mm-comparison-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
    align-items: start;
}

.mm-comparison-main {
    min-width: 0;
}

.mm-comparison-side {
    display: flex;
    justify-content: flex-end;
    align-self: start;
}

@media (max-width: 768px) {
    .mm-details-image-layout,
    .mm-comparison-layout {
        grid-template-columns: 1fr;
    }

    .mm-comparison-side {
        justify-content: flex-start;
    }
}

.mm-inline-comparison h4,
.mm-comparison-col h4 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.mm-comparison-content {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.mm-comparison-content.mm-highlight-danger {
    border: 1px solid #fde2e2;
    background: #fff5f5;
}

.mm-comparison-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.mm-comparison-actions .btn {
    min-width: 120px;
}

.mm-highlight {
    background: #ffe066;
    padding: 1px 3px;
    border-radius: 2px;
}

/* 载荷预览 */
.mm-preview-result {
    padding: 0;
}

.mm-preview-result h4 {
    margin-bottom: 12px;
    color: #333;
}

.mm-transcription-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #6f42c1;
}

.mm-transcription-line {
    margin: 0;
    padding: 0;
    line-height: 1.8;
    color: #333;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.mm-transcription-line + .mm-transcription-line {
    margin-top: 8px;
}

.mm-preview-item {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

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

.mm-preview-item code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}
