/* 项目管理页面样式 */

/* 项目管理页面需要占满整个content-area */
#project-management-page.active {
    height: 100%;
    display: flex !important;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

#project-management-page .main-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.project-management-container {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* 左侧区域 */
.project-management-left {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    height: 100%;
    min-height: 0;
}

/* 项目导航按钮区域 - 与账户设置样式一致 */
.project-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #e8e8e8;
    border-radius: 15px;
    padding: 8px;
    flex: 1;
    min-height: 0;
    position: relative;
    --indicator-top: 0px;
    --indicator-height: 0px;
}

/* 滑动背景指示器 - 垂直方向 */
.project-nav-buttons::before {
    content: '';
    position: absolute;
    left: 8px;
    top: var(--indicator-top, 8px);
    width: calc(100% - 16px);
    height: var(--indicator-height, 0px);
    background: #3d3d3d;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

.project-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
    z-index: 1;
}

.project-nav-button:hover {
    color: #333;
}

.project-nav-button.active {
    color: white;
    font-weight: 500;
}

/* 右侧区域 */
.project-management-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 0;
}

/* 项目标题样式 - 居中显示 */
.project-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

/* 深色模式适配 */
body.dark-mode .project-management-container {
    background: transparent;
}

body.dark-mode .project-nav-buttons {
    background: #333;
}

body.dark-mode .project-nav-buttons::before {
    background: #555;
}

body.dark-mode .project-nav-button {
    color: #e0e0e0;
}

body.dark-mode .project-nav-button:hover {
    color: #fff;
}

body.dark-mode .project-nav-button.active {
    color: #fff;
}

body.dark-mode .project-management-right {
    background: #2a2a2a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .project-section-title {
    color: #e0e0e0;
    border-bottom-color: #444;
}

/* 改变风格弹窗样式 */
.change-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每行3个 */
    gap: 24px;
    padding: 10px;
}

/* 风格卡片 - 参考彩色户型图风格选择的样式 */
.change-style-grid .style-item {
    padding: 0; /* 移除内边距，让图片贴边 */
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1; /* 1:1宽高比 */
}

.change-style-grid .style-item:hover {
    border-color: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 74, 74, 0.15);
}

.change-style-grid .style-item.active {
    border-color: #87CEEB;
    background: #f0f7ff;
    box-shadow: 0 4px 16px rgba(135, 206, 235, 0.3);
}

/* 风格预览图片 - 占满除文字外的所有区域，顶部、左侧、右侧贴边 */
.change-style-grid .style-preview {
    flex: 1; /* 占据剩余空间 */
    width: 100%; /* 宽度占满 */
    overflow: hidden;
    min-height: 0; /* 允许缩小 */
    margin: 0; /* 移除所有外边距 */
    padding: 0; /* 移除所有内边距 */
    line-height: 0; /* 移除行高产生的间隙 */
}

.change-style-grid .style-preview img {
    width: 100%; /* 宽度占满 */
    height: 100%; /* 高度占满 */
    object-fit: cover; /* 保持比例裁剪 */
    display: block; /* 移除图片底部间隙 */
    border-radius: 0; /* 移除图片圆角，让外层容器的overflow:hidden和border-radius自动裁剪 */
    margin: 0; /* 移除图片外边距 */
    padding: 0; /* 移除图片内边距 */
    vertical-align: top; /* 移除基线对齐产生的间隙 */
}

/* 风格名称 - 固定在底部，减小内边距 */
.change-style-grid .style-name {
    padding: 0.6rem 0.8rem; /* 减小内边距，让卡片更紧凑 */
    text-align: center;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
    background: white;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0; /* 防止文字区域被压缩 */
}

.change-style-grid .style-item.active .style-name {
    background: #4a4a4a;
    color: white;
    font-weight: 600;
}

/* 深色模式适配 */
body.dark-mode .change-style-grid .style-item {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .change-style-grid .style-item:hover {
    border-color: #666;
    background: #333;
}

body.dark-mode .change-style-grid .style-item.active {
    border-color: #87CEEB;
    background: #1a3a5a;
}

body.dark-mode .change-style-grid .style-name {
    background: #333;
    color: #e0e0e0;
    border-top-color: #444;
}

body.dark-mode .change-style-grid .style-item.active .style-name {
    background: #555;
    color: white;
}

/* 多版本标签样式 - 参考家具库的动态块标签 */
.multi-version-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 220, 220, 0.85); /* 🔧 新增浅灰色背景，避免在深色图片上看不清 */
    color: #000;
    border: 1px solid #000;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multi-version-badge:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.record-item:hover .multi-version-badge {
    background: rgba(80, 80, 80, 0.85); /* 🔧 新增深灰色背景，避免在浅色图片上看不清 */
    color: #fff;
    border-color: #fff;
}

/* 深色模式适配 */
body.dark-mode .multi-version-badge {
    background: rgba(60, 60, 60, 0.85); /* 🔧 深色模式下使用深灰色背景 */
    color: #e0e0e0;
    border-color: #e0e0e0;
}

body.dark-mode .multi-version-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .record-item:hover .multi-version-badge {
    background: rgba(200, 200, 200, 0.85); /* 🔧 深色模式悬停状态使用浅灰色背景 */
    color: #fff;
    border-color: #fff;
}

/* 版本历史项目样式 - 参考改变风格的网格布局 */
.version-history-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-history-item:hover {
    border-color: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 74, 74, 0.15);
}

/* 版本预览图片容器 - 方形显示 */
.version-preview {
    width: 100%;
    padding-top: 100%; /* 创建1:1的宽高比容器 */
    position: relative;
    overflow: hidden;
}

.version-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片填充方形容器 */
    border-radius: 10px 10px 0 0;
}

/* 版本信息 */
.version-info {
    padding: 12px;
    text-align: center;
    background: white;
    border-top: 1px solid var(--border-light);
}

.version-name {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.version-date {
    font-size: 0.75rem;
    color: #999;
}

/* 版本下载按钮 */
.version-download-btn {
    margin: 0 12px 12px 12px;
    padding: 8px 16px;
    background: #87CEEB;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.version-download-btn:hover {
    background: #6BB8DB;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.3);
}

/* 深色模式适配 */
body.dark-mode .version-history-item {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .version-history-item:hover {
    border-color: #666;
    background: #333;
}

body.dark-mode .version-info {
    background: #333;
    border-top-color: #444;
}

body.dark-mode .version-name {
    color: #e0e0e0;
}

body.dark-mode .version-date {
    color: #999;
}

/* 🔧 新增：深色模式下版本下载按钮改为白色边框+白色文字 */
body.dark-mode .version-download-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

body.dark-mode .version-download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* 🔧 新增：深色模式下自定义确认对话框按钮改为白色边框+白色文字 */
body.dark-mode .custom-confirm-btn-primary {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

body.dark-mode .custom-confirm-btn-primary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2) !important;
}
