/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f9fafb;
    color: #1f2937;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 16px 0;
    margin-bottom: 24px;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.navbar-logo i {
    font-size: 22px;
    color: #2563eb;
}

.navbar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

/* 卡片容器 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
}

/* 步骤指示器 */
.steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 25%;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    background-color: #fff;
    color: #6b7280;
}

.step-active .step-icon {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.step-completed .step-icon {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.step-active .step-label,
.step-completed .step-label {
    color: #1f2937;
}

.progress-bar {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 2px;
    background-color: #2563eb;
    z-index: 1;
    transition: width 0.3s ease;
}

/* 表单样式 */
.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1f2937;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-section {
    width: 100%;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2563eb;
    color: #1f2937;
}

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

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

.form-required {
    color: #ef4444;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

/* 单选框组 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.radio-input {
    margin-top: 4px;
    accent-color: #2563eb;
}

.radio-label {
    font-size: 14px;
    color: #374151;
}

/* 表格样式 */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
}

.form-table th,
.form-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.form-table th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #4b5563;
}

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

/* 按钮样式 */
.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

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

/* 步骤内容 */
.step-content {
    display: none;
}

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

/* 空间选择 */
.space-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .space-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

.space-item {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.space-item:hover {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
}

.space-item.selected {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.space-item i {
    font-size: 24px;
    color: #2563eb;
    margin-bottom: 8px;
}

.space-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

/* 自定义空间 */
.custom-space {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}

.custom-space-content {
    display: flex;
    gap: 12px;
}

@media (max-width: 767px) {
    .custom-space-content {
        flex-direction: column;
    }
}

.custom-space-input {
    flex: 1;
}

/* 已添加空间标签 */
.spaces-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.space-tag {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.space-tag.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.delete-space {
    font-size: 12px;
    opacity: 0.8;
}

.delete-space:hover {
    opacity: 1;
}

/* 产品选择 */
.product-group {
    margin-bottom: 24px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-item {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-item:hover {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
}

.product-item.selected {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.product-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
}

.product-item-desc {
    font-size: 12px;
    color: #6b7280;
}

/* H选项和尺寸选择 */
.h-option-grid,
.size-option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .h-option-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .size-option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.h-option-item,
.size-option-item {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.h-option-item:hover,
.size-option-item:hover {
    border-color: #2563eb;
}

.h-option-item.selected,
.size-option-item.selected {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 500;
}

.h-option-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.h-option-material {
    font-size: 12px;
    color: #6b7280;
}

.size-option-content {
    display: flex;
    justify-content: space-between;
}

/* 数量输入 */
.quantity-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    .quantity-input-group {
        flex-direction: column;
    }
}

.quantity-input-wrapper {
    flex: 1;
}

.quantity-btn-wrapper {
    flex: 0 0 160px;
}

/* 价格结果 */
.price-result {
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 6px;
    background-color: rgba(37, 99, 235, 0.05);
    padding: 16px;
    margin-bottom: 24px;
}

.price-result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.price-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.price-result-item {
    font-size: 14px;
    color: #4b5563;
}

.price-result-value {
    font-weight: 500;
    color: #1f2937;
}

.price-result-total {
    text-align: right;
}

.price-result-total-label {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
}

.price-result-total-value {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
}

/* 报价项目列表 */
.quote-items {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.quote-items-header {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 2fr 2fr 1fr;
    background-color: #f3f4f6;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.quote-items-body {
    max-height: 300px;
    overflow-y: auto;
}

.quote-item {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 2fr 2fr 1fr;
    padding: 12px 8px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

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

.quote-item-hardware,
.quote-item-special {
    background-color: #f9fafb;
}

.quote-item-delete {
    color: #ef4444;
    cursor: pointer;
    text-align: center;
}

.quote-items-empty {
    padding: 48px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.quote-items-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #d1d5db;
}

/* 报价总计 */
.quote-total {
    background-color: #f3f4f6;
    border-radius: 6px;
    padding: 16px;
    text-align: right;
}

.quote-total-item {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 14px;
}

.quote-total-label {
    color: #4b5563;
    font-weight: 500;
}

.quote-total-value {
    color: #1f2937;
}

.quote-total-final {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    display: none;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    position: relative;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
}

.modal-btn {
    width: 100%;
}

/* 成功提示弹窗 */
.success-modal-content {
    text-align: center;
    padding: 32px 24px;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.success-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.success-btn-group {
    display: flex;
    gap: 12px;
}

.success-btn {
    flex: 1;
}

/* 文件上传样式 */
.upload-container {
    margin-top: 8px;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #3b82f6;
    background-color: #f0f9ff;
}

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.upload-text {
    color: #6b7280;
}

.upload-subtext {
    font-size: 12px;
    margin-top: 4px;
    color: #9ca3af;
}

.file-input {
    display: none;
}

/* 上传文件列表（通用样式） */
.upload-files-list,
.upload-files-preview {
    margin-top: 16px;
}

.upload-file-item,
.upload-file-preview-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 8px;
}

.upload-file-icon,
.upload-file-preview-icon {
    font-size: 18px;
    margin-right: 12px;
    color: #6b7280;
}

.upload-file-name,
.upload-file-preview-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-size,
.upload-file-preview-size {
    color: #6b7280;
    font-size: 14px;
    margin-right: 12px;
}

.upload-file-remove {
    color: #ef4444;
    cursor: pointer;
    transition: color 0.2s;
}

.upload-file-remove:hover {
    color: #dc2626;
}

/* 上传进度条 */
.upload-progress {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background-color: #3b82f6;
    width: 0%;
    transition: width 0.3s ease;
}

/* 无文件状态 */
.upload-files-preview .no-files,
.no-spaces {
    color: #6b7280;
    font-style: italic;
}

/* 预览中的空间标题 */
.preview-space-title {
    width: 100%;
    font-weight: bold;
    margin: 16px 0 8px;
    color: #1e40af;
    padding-bottom: 4px;
    border-bottom: 1px dashed #94a3b8;
}
/* 文件说明样式 */
.upload-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-file-desc-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.upload-desc-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.upload-file-desc {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    color: #1f2937;
    transition: border-color 0.2s;
}

.upload-file-desc:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* 预览中的文件说明样式 */
.upload-file-preview-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}
/* 项目图片上传预览样式 */
.upload-image-preview {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
}
.upload-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 调整图片上传项布局 */
.upload-file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    background-color: #fff;
}