/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background-color: #f8fafc;
    overflow: auto;
}

.container {
    width: 100%;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.company-name {
    position: absolute;
    top: 50%;
    left: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%);
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    flex: 1;
    background-color: #f8fafc;
    height: 100%;
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
}

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

.menu-item {
    margin-bottom: 2px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-item a:hover {
    background: #f7fafc;
    color: #3182ce;
    border-left-color: #3182ce;
}

.menu-item.active a {
    background: #ebf8ff;
    color: #2b6cb0;
    border-left-color: #3182ce;
    font-weight: 600;
}

.menu-item i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 0;
    min-height: 100%;
    /* height: 100%; */
    background-color: #f8fafc;
}

/* Tab容器样式 */
.tab-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 16px;
    overflow: hidden;
}

/* Tab导航样式 */
.tab-nav {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0 16px;
    overflow-x: auto;
    border-radius: 8px 8px 0 0;
}

.tab-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-right: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
    color: #718096;
}

.tab-item.active {
    background: transparent;
    color: #3182ce;
    border-bottom-color: #3182ce;
}

.tab-title {
    font-weight: 500;
    margin-right: 8px;
}

.tab-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #a0aec0;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tab-close:hover {
    background: #edf2f7;
    color: #e53e3e;
}

/* Tab内容样式 */
.tab-content {
    flex: 1;
    padding: 0;
    background: #ffffff;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    min-height: 0;
}

/* 以图生图标签页样式 */
#image-generation-tab {
    padding: 0;
    height: 100%;
    overflow: hidden; /* 隐藏容器滚动条，避免双滚动条 */
}

#image-generation-tab iframe {
    flex: 1;
    height: 100%;
    width: 100%;
    border: none;
}

/* 视频生成标签页样式 */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    font-size: 1.2rem;
    color: #4a5568;
    background-color: #f7fafc;
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 区域标题和刷新按钮容器 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 刷新按钮样式 */
.refresh-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    height: 36px;
    justify-content: center;
}

/* 数据看板和使用记录的刷新按钮 */
.dashboard-controls .refresh-btn,
.records-controls .refresh-btn {
    margin-left: auto;
}

/* 用户配置页面的按钮布局 */
.user-config-section .section-header {
    justify-content: flex-end;
    align-items: center;
}

/* 用户配置页面特殊样式 */
.user-config-section .section-header {
    justify-content: flex-end;
}

.user-config-section .section-header .add-user-btn {
    margin-right: 20px;
}

.refresh-btn:hover {
    background-color: #3182ce;
}

/* Tab面板样式 */
.tab-pane {
    display: none;
    min-height: 100%;
    overflow-y: auto;
}

.tab-pane.active {
    display: block;
    min-height: 100%;
    overflow-y: auto;
}

/* 视频生成标签页样式 */
#video-generation-tab {
    height: 100%;
    overflow: hidden; /* 隐藏容器滚动条，避免双滚动条 */
}

#video-generation-tab iframe {
    flex: 1;
    height: 100%;
    width: 100%;
    border: none;
}

/* Tab内容样式 */
.tab-content {
    flex: 1;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* 上传区域 */
.upload-section {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.upload-section:hover {
    background: #edf2f7;
    border-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-icon {
    font-size: 3.5rem;
    color: #3182ce;
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-section h3 {
    font-size: 1.35rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-section p {
    color: #718096;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

#upload-input {
    display: none;
}

/* 预览图 */
.preview-container {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preview-img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    border: 2px solid #3182ce;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: contain;
}

.preview-img:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 提示词区域 */
.prompt-section {
    margin-bottom: 28px;
}

.prompt-section label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

#prompt-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease;
    background-color: #f7fafc;
}

#prompt-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background-color: #ffffff;
}

/* 配置区域 */
.config-section {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* 标签与提示组合 */
.label-with-tooltip {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* 提示工具 */
.tooltip {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}

/* 提示图标 */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #4a5568;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    vertical-align: baseline;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    background-color: #2d3748;
    transform: scale(1.1);
}

/* 提示内容 */
.tooltip-content {
    visibility: hidden;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 0;
    transform: translateX(0);
    background-color: #2d3748;
    color: #fff;
    text-align: left;
    padding: 12px;
    border-radius: 6px;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: nowrap;
}

/* 提示内容箭头 */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

/* 鼠标悬停显示提示 */
.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* 提示内容段落样式 */
.tooltip-content p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.tooltip-content p:last-child {
    margin-bottom: 0;
}

.config-group {
    flex: 1;
    min-width: 200px;
}

.config-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

#image-count, #image-ratio {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #f7fafc;
}

#image-count:focus, #image-ratio:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background-color: #ffffff;
}

/* 生成按钮 */
.generate-btn {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 结果区域 */
.results-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-bottom: 700px; /* 添加底部内边距以确保内容不被遮挡 */
}

.results-section h3 {
    font-size: 1.35rem;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 结果头部 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 刷新容器 */
.refresh-container {
    display: flex;
    align-items: center;
}

/* 图片批次容器 - 每批一排 */
.image-batch {
    display: flex;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
}

/* 单个图片卡片 */
.image-card {
    flex: 0 0 calc(50% - 10px);
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 如果只有一个图片，显示在左边 */
.image-batch > .image-card:only-child {
    flex: 0 0 calc(50% - 10px);
}

.image-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 图片任务头部 */
.image-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e1e5e9;
}

.image-batch-id {
    font-size: 12px;
    color: #999;
}

.image-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.image-status.queued {
    background-color: rgba(255, 170, 0, 0.1);
    color: #ffaa00;
}

.image-status.generating {
    background-color: rgba(24, 144, 255, 0.1);
    color: #1890ff;
}

.image-status.completed {
    background-color: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.image-status.failed {
    background-color: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}

/* 图片容器 */
.image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f7fafc;
}

/* 图片生成中状态 */
.image-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 15px;
    background-color: #f9fafb;
}

/* 图片状态覆盖层 */
.image-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 5;
    pointer-events: none;
}

.image-status-overlay.queued {
    background-color: rgba(255, 170, 0, 0.2);
}

.image-status-overlay.generating {
    background-color: rgba(24, 144, 255, 0.2);
}

.image-status-overlay .status-text {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-top: 10px;
}

/* 图片显示 */
.result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.result-img:hover {
    transform: scale(1.05);
}

/* 原图链接小框 */
.origin-image-link {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.origin-image-link:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.origin-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 提示词显示 */
.image-prompt-preview {
    padding: 12px 16px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    border-top: 1px solid #e1e5e9;
    background-color: #f9fafb;
}

/* 加载旋转按钮 */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e1e5e9;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 下载按钮 */
.download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(49, 130, 206, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    font-size: 16px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    background: rgba(49, 130, 206, 1);
    transform: scale(1.1);
}

/* 鼠标移入图片容器时显示下载按钮 */
.image-container:hover .download-btn {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-batch {
        flex-direction: column;
        gap: 15px;
    }
    
    .image-card,
    .image-batch > .image-card:only-child {
        flex: 0 0 100%;
    }
}

.result-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

/* 图片容器 */
.img-container {
    position: relative;
    width: 100%;
    height: 220px;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f7fafc;
}

.result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* 下载按钮 */
.download-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(49, 130, 206, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    font-size: 16px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    background: rgba(49, 130, 206, 1);
    transform: scale(1.1);
}

/* 鼠标移入图片容器时显示下载按钮 */
.img-container:hover .download-btn {
    opacity: 1;
}

.result-img:hover {
    transform: scale(1.05);
}

/* 加载状态 */
.loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.loading-spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图片查看模态框 */
.modal.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    margin: 5% auto;
    padding: 2rem;
    position: relative;
}

/* 添加竖线分隔左右区域 */
.modal-image-container::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 5%;
    bottom: 5%;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

/* 单图模式（点击原图时） */
.modal-image-container.single-image-mode::after {
    display: none; /* 单图模式下不显示分隔线 */
}

.original-image-container,
.generated-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    padding: 0 1rem;
    margin: 0;
}

/* 生成图全屏显示样式 */
.generated-image-container.full-screen-image {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.generated-image-container.full-screen-image .generated-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

/* 原图全屏显示样式 */
.original-image-container.full-screen-image {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.original-image-container.full-screen-image .original-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

.original-image-container h4,
.generated-image-container h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    padding: 0;
}

/* 全屏模式下隐藏标题 */
.generated-image-container.full-screen-image h4 {
    display: none;
}

/* 图片导航区域样式 */
.image-navigation {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 左右导航区域样式 */
.nav-left, .nav-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex
}

/* 图片生成页面样式 */
.image-generation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f8fafc;
    padding: 20px;
    box-sizing: border-box;
}

.image-preview-section {
    flex: 1;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

.image-records-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.refresh-images-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.refresh-images-btn:hover {
    background-color: #2b6cb0;
    transform: rotate(180deg);
}

.image-controls-section {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.image-quantity-selector,
.image-ratio-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-quantity-selector label,
.image-ratio-selector label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.image-quantity-selector select,
.image-ratio-selector select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-quantity-selector select:hover,
.image-ratio-selector select:hover {
    border-color: #cbd5e0;
}

.image-prompt-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-prompt-section textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: none;
    transition: all 0.2s ease;
    background-color: #f7fafc;
}

.image-prompt-section textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background-color: #ffffff;
}

.prompt-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.prompt-upload-btn:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3);
}

#generate-btn {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3);
}

#generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4a5568;
    font-size: 0.95rem;
    padding: 8px;
}

.prompt-preview-section {
    display: flex;
    justify-content: center;
    padding: 10px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.small-preview-container {
    display: none;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #3182ce;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.small-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

#upload-input {
    display: none;
}

.nav-left {
    left: 0;
}

.nav-right {
    right: 0;
}

/* 悬停效果 */
.nav-left:hover {
    background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
}

.nav-right:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
}

/* 导航箭头图标 */
.nav-left::before {
    content: '←';
    color: rgba(255,255,255,0);
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-right::before {
    content: '→';
    color: rgba(255,255,255,0);
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-left:hover::before {
    color: rgba(255,255,255,0.8);
}

.nav-right:hover::before {
    color: rgba(255,255,255,0.8);
}

.image-modal .modal-content {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.next-image-btn {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.next-image-btn:hover {
    background-color: #45a049;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.image-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.image-modal .modal-close:hover,
.image-modal .modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.login-modal-close {
    color: #333 !important;
    top: 10px !important;
    right: 15px !important;
    font-size: 30px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    background-color: transparent !important;
}

@media (max-width: 768px) {
    .modal-image-container {
        flex-direction: column;
        height: auto;
    }
    
    .original-image-container,
    .generated-image-container {
        max-width: 90%;
    }
    
    .company-name {
        position: static;
        margin-bottom: 1rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .config-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .generate-btn {
        width: 100%;
        margin-top: 16px;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 登录状态区域 */
#login-status {
    position: absolute;
    top: 50%;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateY(-50%);
}

#welcome-message {
    color: white;
    font-weight: 500;
    display: none;
    font-size: 0.95rem;
}

#login-btn, #logout-btn {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

#login-btn:hover, #logout-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

#logout-btn {
    display: none;
}

/* 登录弹窗 */
.modal-content.login-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    position: relative;
}

#login-modal h2 {
    text-align: center;
    color: #333;
    margin-bottom: 24px;
    font-size: 1.8rem;
}

.login-form-group {
    margin-bottom: 20px;
}

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

.login-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

#login-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

#login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.3);
}

#login-message {
    text-align: center;
    margin-top: 16px;
    font-weight: 500;
}

/* 统一页面容器样式 */
.dashboard-section,
.records-section,
.user-config-section {
    padding: 20px;
    transition: all 0.3s ease;
}

/* 统一控制区域样式 */
.dashboard-controls,
.records-controls,
.user-config-section .section-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dashboard-controls select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    height: auto;
    min-width: 100px;
    cursor: pointer;
}

.dashboard-controls input[type="date"], .dashboard-controls .layui-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    height: auto;
    min-width: 150px;
    cursor: pointer;
    margin-left: 8px;
    display: inline-block;
}

/* 日期范围容器样式优化 */
.dashboard-controls .date-range {
    position: relative;
    cursor: pointer;
    padding: 5px;
    /* 确保容器可以被点击 */
    width: fit-content;
    white-space: nowrap;
}

.dashboard-controls .date-range label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* 统一按钮样式 */
.filter-btn,
.search-btn {
    padding: 8px 16px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
}

.filter-btn:hover,
.search-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
}

.dashboard-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #718096;
    font-size: 14px;
    font-weight: 400;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.dashboard-chart {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-chart h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.25rem;
}

#chart-container {
    height: 300px;
    width: 100%;
}

/* 使用记录样式 */
.records-section {
    padding: 20px;
}





.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.date-range label {
    color: #4a5568;
    font-size: 14px;
}

.date-range input[type="date"], .date-range .layui-input, .records-controls select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    height: auto;
    width: auto;
    min-width: 150px;
    background-color: #ffffff;
    display: inline-block;
}



/* 统一表格容器样式 */
.records-table-container,
.user-list-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    transition: all 0.3s ease;
}

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

.records-table th,
.records-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.records-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.records-table td {
    color: #2d3748;
    font-size: 14px;
}

.status-success {
    color: #48bb78;
    font-weight: 500;
}

.status-failed {
    color: #e53e3e;
    font-weight: 500;
}

.status-generating {
    color: #ed8936;
    font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式布局 - 统一三个页面的响应式表现 */
@media (max-width: 768px) {
    /* 控制区域垂直排列 */
    .dashboard-controls,
    .records-controls,
    .user-config-section .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 数据看板统计卡片响应式 */
    .dashboard-stats {
        flex-direction: column;
    }
    
    .dashboard-stats .stat-card {
        flex: none;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .dashboard-stats .stat-card:last-child {
        margin-bottom: 0;
    }
    
    /* 表格容器宽度调整 */
    .records-table-container,
    .user-list-container {
        overflow-x: auto;
    }
    
    /* 用户配置内容单列显示 */
    .user-config-content {
        grid-template-columns: 1fr;
    }
    
    /* 输入控件宽度调整 */
    .dashboard-controls input[type="date"],
    .dashboard-controls .layui-input,
    .dashboard-controls select,
    .date-range input[type="date"],
    .date-range .layui-input,
    .records-controls select {
        width: 100%;
        min-width: auto;
    }
    
    /* 日期范围容器调整 */
    .date-range {
        width: 100%;
        justify-content: space-between;
    }
    
    /* 数据看板图表高度调整 */
    #chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    /* 统计卡片单列显示 */
    .dashboard-stats {
        flex-direction: column;
    }
    
    .dashboard-stats .stat-card {
        flex: none;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .dashboard-stats .stat-card:last-child {
        margin-bottom: 0;
    }
    
    /* 缩小内边距 */
    .dashboard-section,
    .records-section,
    .user-config-section {
        padding: 10px;
    }
    
    /* 调整卡片内边距 */
    .dashboard-stats,
    .dashboard-chart,
    .user-form-container,
    .stat-card {
        padding: 15px;
    }
    
    /* 按钮宽度调整 */
    .filter-btn,
    .search-btn,
    .add-user-btn,
    .refresh-btn {
        width: 100%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 用户配置页面样式 */
.user-config-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

/* 统一卡片样式 */
.dashboard-stats,
.dashboard-chart,
.user-form-container,
.stat-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.user-form-container h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.user-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-actions {
    margin-top: 20px;
}

.add-user-btn {
    padding: 10px 20px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.add-user-btn:hover {
    background-color: #3182ce;
}

.form-message {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.user-list-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    grid-column: 1 / -1;
}

.user-list-container h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.user-list-table-container {
    overflow-x: auto;
}

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

.user-list-table th,
.user-list-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.user-list-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    white-space: nowrap;
}

.user-list-table td {
    color: #2d3748;
    font-size: 14px;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

/* 登录模态框专门样式 */
.login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.user-modal-content {
    padding-top: 40px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    color: #6b7280;
    float: right;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.user-modal-close:hover,
.user-modal-close:focus {
    color: #111827;
    background-color: #f3f4f6;
    text-decoration: none;
    cursor: pointer;
}

/* 模态框标题样式 */
.modal-content h2 {
    color: #111827;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
    letter-spacing: -0.025em;
}

/* 模态框表单样式优化 */
.user-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-form .form-group {
    margin-bottom: 0;
}

.user-form .form-group label {
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.user-form .form-group input,
.user-form .form-group select,
.user-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f9fafb;
    box-sizing: border-box;
    font-family: inherit;
}

.user-form .form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.user-form .form-group input:focus,
.user-form .form-group select:focus,
.user-form .form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background-color: #ffffff;
}

/* 模态框按钮样式优化 */
.user-form .form-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.user-form .form-actions .add-user-btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background-color: #4299e1;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-form .form-actions .add-user-btn:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(66, 153, 225, 0.3);
}

/* 模态框消息样式优化 */
.user-form .form-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

/* 操作按钮样式 */
.btn-update-password,
.btn-delete-user {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.btn-update-password {
    background-color: #4299e1;
    color: white;
}

.btn-update-password:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.btn-delete-user {
    background-color: #ef4444;
    color: white;
}

.btn-delete-user:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* 确认删除模态框样式 */
.confirm-modal-content {
    padding-top: 40px;
    max-width: 450px;
}

.confirm-message {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.cancel-delete-btn,
.confirm-delete-btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.cancel-delete-btn {
    background-color: #6b7280;
    color: white;
}

.cancel-delete-btn:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 114, 128, 0.3);
}

.confirm-delete-btn {
    background-color: #ef4444;
    color: white;
}

.confirm-delete-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

/* 页脚 credits */
.footer-credit {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 4px 0 8px 0;
    width: 100%;
}

.credit-by {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
}

.credit-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-style: italic;
}

/* ==================== 角色管理样式 ==================== */

/* 配置页内部标签 */
.config-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.config-tab-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-tab-btn:hover {
    background: #edf2f7;
}

.config-tab-btn.active {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

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

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

/* 角色列表样式 */
.role-list-table {
    width: 100%;
}

.role-list-table th,
.role-list-table td {
    padding: 12px 16px;
}

.role-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-type-system {
    background: #dbeafe;
    color: #1e40af;
}

.role-type-custom {
    background: #dcfce7;
    color: #166534;
}

/* 权限配置弹窗 */
.permission-modal-content {
    max-width: 1100px;
    width: 95%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px 40px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 3vh;
}

.permission-modal-content h2 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
}

.permissions-container {
    max-height: 520px;
    overflow-y: auto;
    margin-bottom: 24px;
    padding: 4px;
}

.permission-group {
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.permission-group-header {
    background: #f8fafc;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.permission-group-title {
    display: flex;
    align-items: center;
}

.permission-group-title i {
    margin-right: 10px;
    color: #3182ce;
}

.permission-select-all {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
}

.permission-select-all input {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    accent-color: #3182ce;
    cursor: pointer;
}

.permission-select-all:hover {
    color: #3182ce;
}

.permission-items {
    padding: 20px 24px;
    background: #fafbfc;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .permission-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 480px) {
    .permission-items {
        grid-template-columns: 1fr;
    }
}

.permission-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 18px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
    transition: all 0.2s ease;
    min-height: 72px;
}

.permission-item:hover {
    border-color: #3182ce;
    background: #f7faff;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.1);
}

.permission-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 14px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3182ce;
    flex-shrink: 0;
}

.permission-item label {
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.permission-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.4;
}

.permission-desc {
    font-size: 12px;
    color: #718096;
    margin-left: 0;
    line-height: 1.5;
}

/* 权限弹窗按钮区域 */
.permission-modal-content .form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.permission-modal-content .form-actions .add-user-btn {
    padding: 14px 40px;
    font-size: 1rem;
}

.permission-modal-content .form-actions .cancel-delete-btn {
    padding: 14px 40px;
    font-size: 1rem;
}

/* 表单提示信息 */
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #718096;
}

/* 按钮组 */
.btn-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* 统一按钮基础样式 */
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    padding: 0 12px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    color: #fff;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    border: none;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-sm:hover {
    opacity: 0.9;
}

.btn-sm:active {
    transform: scale(0.96);
}

/* 只改变背景色 */
.btn-primary { background-color: #3182ce; }
.btn-primary:hover { background-color: #2c5282; }

.btn-warning { background-color: #ed8936; }
.btn-warning:hover { background-color: #dd6b20; }

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

.btn-info { background-color: #38b2ac; }
.btn-info:hover { background-color: #2c7a7b; }

/* 用户状态标记 */
.user-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-status-active {
    background: #dcfce7;
    color: #166534;
}

.user-status-disabled {
    background: #fee2e2;
    color: #991b1b;
}