/*
 * 自定义模板填充页面样式
 * 基于 lesson-generator 设计语言
 */

/* ==================== 布局容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb .separator {
    color: var(--border-color);
}

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

/* ==================== 页面头部 ==================== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    font-size: 2.5rem;
}

.page-description {
    font-size: 1rem;
    color: #5f6368;
    line-height: 1.5;
}

/* ==================== 面包屑和步骤合并行（步骤2专用）==================== */
.breadcrumb-steps-row {
    display: flex; /* 改用flex布局 */
    justify-content: center; /* 居中对齐 */
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative; /* 为绝对定位的面包屑提供参考 */
}

/* 面包屑在左侧 */
.breadcrumb-steps-row .breadcrumb {
    margin-bottom: 0;
    position: absolute; /* 绝对定位 */
    left: 24px; /* 左侧对齐 */
}

/* 步骤指示器在整个页面的中间 */
.breadcrumb-steps-row .steps-container {
    margin-bottom: 0;
    padding: 0;
    /* 不需要grid-column，因为已经改用flex布局并居中 */
}

/* 调整面包屑和步骤合并行中的步骤指示器大小 */
.breadcrumb-steps-row .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.breadcrumb-steps-row .step-label {
    font-size: 0.75rem;
}

.breadcrumb-steps-row .step-line {
    width: 60px;
    margin-bottom: 22px;
}

/* ==================== 步骤指示器 ==================== */
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 0 20px;
}

.steps-container-original {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #5f6368;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.875rem;
    color: #5f6368;
    font-weight: 500;
    white-space: nowrap;
}

.step-line {
    width: 80px;
    height: 2px;
    background: #dadce0;
    margin: 0 12px;
    margin-bottom: 28px;
    transition: background 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border-color: #1a73e8;
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.step.active .step-label {
    color: #1a73e8;
    font-weight: 600;
}

.step.completed .step-number {
    background: #34a853;
    border-color: #34a853;
    color: white;
}

.step.completed .step-label {
    color: #34a853;
}

.step.completed + .step-line {
    background: #34a853;
}

/* ==================== 内容卡片 ==================== */
.content-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #dadce0;
    box-shadow: 0 4px 8px rgba(60, 64, 67, 0.15);
    padding: 40px;
    min-height: 400px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 步骤1：上传区域 ==================== */
.upload-section {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed #dadce0;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #1a73e8;
    background: white;
}

.upload-area.dragover {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.upload-area h3 {
    font-size: 1.25rem;
    color: #202124;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.875rem;
    color: #5f6368;
    margin-bottom: 24px;
}

.template-form {
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}

.template-form h3 {
    font-size: 1.125rem;
    color: #202124;
    margin-bottom: 20px;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 20px;
}

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

.required {
    color: #ea4335;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ==================== 步骤2：字段列表 ==================== */
.fields-section {
    max-width: 800px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 1.25rem;
    color: #202124;
    margin-bottom: 8px;
}

.hint {
    font-size: 0.875rem;
    color: #5f6368;
    line-height: 1.5;
}

.fields-container {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.field-item {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.field-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.1);
}

.field-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.field-info {
    flex: 1;
}

.field-label {
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.field-name {
    font-size: 0.8125rem;
    color: #5f6368;
    font-family: monospace;
}

.field-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #e8f0fe;
    color: #1a73e8;
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.icon-btn:hover {
    background: #f1f3f4;
}

.icon-btn.delete:hover {
    background: #fce8e6;
    color: #ea4335;
}

/* ==================== 步骤3：生成进度 ==================== */
.generate-section {
    max-width: 700px;
    margin: 0 auto;
}

.generate-header {
    text-align: center;
    margin-bottom: 32px;
}

.generate-header h3 {
    font-size: 1.25rem;
    color: #202124;
    margin-bottom: 8px;
}

.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: #e8eaed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #1557b0);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #5f6368;
    font-weight: 500;
}

.generate-progress {
    display: grid;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.progress-item {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-item.generating {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.progress-item.completed {
    border-color: #34a853;
    background: #e6f4ea;
}

.progress-status {
    font-size: 1.25rem;
}

.progress-label {
    flex: 1;
    font-weight: 500;
    color: #202124;
}

.progress-content {
    font-size: 0.8125rem;
    color: #5f6368;
    margin-top: 4px;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 步骤4：结果展示（左右分栏）==================== */
.result-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    min-height: 600px;
}

.result-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-right {
    border-left: 1px solid #dadce0;
    padding-left: 24px;
    overflow: hidden;
}

.result-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.result-header {
    text-align: left;
}

.result-header h3 {
    font-size: 1.5rem;
    color: #202124;
    margin-bottom: 8px;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

.btn-icon {
    margin-right: 8px;
}

.credits-info {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.info-item .label {
    font-size: 0.875rem;
    color: #5f6368;
}

.info-item .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a73e8;
}

.preview-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    background: white;
    border-radius: 8px;
    padding: 60px 40px;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

/* 🔥 【修复4】强制纯白预览 - 覆盖所有灰色背景 */
.custom-template-page,
.preview-container,
.embedded-preview-container,
.embedded-preview,
.preview-placeholder,
#lesson-preview,
.preview-area,
.docx-wrapper,
.modal-content,
.view-modal-body,
#viewModalBody {
    background: white !important;
    background-color: white !important;
}

body.custom-template-page {
    background: #fafbfc !important;
}

/* 【修复4】预览容器 - 正常宽度 */
.preview-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border-radius: 4px;
    padding: 20px;
}

/* 【修复4】docx-preview A4比例完整显示 */
.preview-container .docx-wrapper,
.embedded-preview-container .docx-wrapper,
#viewModalBody .docx-wrapper {
    background: white !important;
    padding: 0 !important;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100% !important;
    max-width: 100% !important;
    transform: scale(0.75);  /* 缩小到75%以完整显示 */
    transform-origin: top center;
    margin: 0 auto;
    margin-bottom: -100px;  /* 补偿缩放后的空白 */
}

/* 【修复4】docx内部表格按比例缩放 */
.docx-wrapper table {
    width: 100% !important;
    table-layout: fixed !important;
}

/* 【修复4】确保单元格内容正常显示 */
.docx-wrapper td,
.docx-wrapper th {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    padding: 4px 6px !important;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .main-container {
        padding: 16px;
    }

    .content-card {
        padding: 24px 20px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .title-icon {
        font-size: 2rem;
    }

    .steps-container {
        padding: 0;
        overflow-x: auto;
    }

    .step-line {
        width: 40px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .result-actions {
        gap: 12px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }

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

    .modal-large {
        width: 95%;
        max-width: none;
    }

    .preview-container {
        max-height: 400px;
        padding: 12px;
    }
}

/* ==================== 加载动画 ==================== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 工具类 ==================== */
.text-center {
    text-align: center;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}


/* ==================== 左右分栏布局 ==================== */
.generate-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    min-height: 500px;
}

.generate-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.generate-right {
    border-left: 1px solid var(--border-color);
    padding-left: 24px;
}

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

.context-section h3 {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.generation-progress {
    background: var(--bg-paper);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.generation-progress h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.progress-stats {
    display: flex;
    gap: 40px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-stats strong {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.preview-fields-container {
    max-height: 600px;
    overflow-y: auto;
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius-md);
}

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

.preview-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.preview-field {
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.preview-field-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.preview-field-content {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.preview-field-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}


/* ==================== 嵌入式预览区 ==================== */
.embedded-preview {
    height: 100%;
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.embedded-preview .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.embedded-preview .preview-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.embedded-preview .btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.embedded-preview .btn-text:hover {
    background: rgba(26, 115, 232, 0.08);
}

.embedded-preview-container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: white;
    display: flex;
    justify-content: center;
}

/* docx预览内容样式优化 - A4纸张比例 */
.embedded-preview-container .docx-wrapper {
    width: 21cm;  /* A4宽度 */
    max-width: 100%;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: none;
    transform-origin: unset;
}

/* A4页面样式 */
.embedded-preview-container .docx {
    width: 21cm;
    min-height: 29.7cm;  /* A4高度 */
    padding: 2cm;
    background: white;
    box-sizing: border-box;
}

/* ==================== 可视化表格样式 ==================== */
.visual-tables-container {
    margin-top: 20px;
}

.visual-table-wrapper {
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.visual-table-wrapper h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.visual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.visual-cell {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.visual-cell:hover {
    background-color: #f0f7ff;
    border-color: #4f46e5;
}

.visual-cell.has-field {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.visual-cell.has-field:hover {
    background-color: #c8e6c9;
}

.field-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* 字段列表样式 */
.fields-list {
    margin-top: 20px;
}

.fields-list h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1rem;
}

.field-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.field-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.field-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.field-info {
    flex: 1;
}

.field-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.field-name {
    font-size: 0.85rem;
    color: #666;
    font-family: monospace;
}

.field-type {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #666;
    margin-right: 10px;
}

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

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f0f0f0;
}

.icon-btn.delete:hover {
    background: #ffebee;
}

/* ==================== 编辑模式样式 ==================== */

/* 编辑模式横幅 */
.selection-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

.selection-mode-banner h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.selection-mode-banner p {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.selection-mode-banner button {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.selection-mode-banner button:hover {
    background: #f3f4f6;
}

/* 选择模式下的表格样式 */
.visual-table.selection-mode td {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.visual-table.selection-mode td:hover {
    background: #fef3c7 !important;
    transform: scale(1.02);
    box-shadow: 0 0 0 2px #f59e0b;
    z-index: 10;
}

/* 字段配置对话框 */
.simple-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.simple-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.simple-dialog-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    color: var(--gray-900);
}

.cell-preview {
    background: var(--gray-50);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.cell-preview p {
    margin: 5px 0;
}

/* 弹窗内的表单样式 */
.simple-dialog-content .form-group {
    margin-bottom: 20px;
}

.simple-dialog-content .form-group label {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
}

.simple-dialog-content .form-control,
.simple-dialog-content input[type="text"],
.simple-dialog-content select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.simple-dialog-content .form-control:focus,
.simple-dialog-content input[type="text"]:focus,
.simple-dialog-content select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-cancel:hover {
    background: var(--gray-300);
}

.btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--primary-color);
    color: white;
}

.btn-confirm:hover {
    background: var(--primary-hover);
}

/* 已标记字段的样式 */
.cell-field-identified {
    background: #dcfce7 !important;
    font-weight: 600;
}

/* 单元格类型样式（与 template-filler1 一致） */
.cell-section-label {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    font-weight: 600;
    text-align: center;
}

.cell-section-field {
    background: #e0e7ff !important;
    border-color: #6366f1 !important;
}

.cell-label {
    background: #f3f4f6 !important;
    font-weight: 500;
}

.cell-empty {
    background: #fafafa !important;
}

/* 可点击单元格样式 */
.visual-cell.clickable {
    cursor: pointer;
}

.visual-cell.clickable:hover {
    box-shadow: inset 0 0 0 2px #4f46e5;
    transform: scale(1.02);
    z-index: 5;
}


/* ==================== 步骤2：沉浸式编辑模式（A4固定宽度）==================== */

/* 步骤2整体容器 */
#step2 {
    display: none;
}

#step2.active {
    display: block;
    margin: 0;
    padding: 0;
}


/* 三栏布局容器 */
#step2 .editor-layout {
    display: flex;
    height: calc(100vh - 180px); /* 增加减去值，考虑导航栏和面包屑的实际高度 */
    max-height: calc(100vh - 180px); /* 限制最大高度 */
    min-height: 500px;
    overflow: hidden; /* 改回hidden，阻止整体滚动 */
    background: #f3f4f6; /* 灰色背景 */
}

/* 左侧边栏：教程 */
#step2 .editor-sidebar {
    width: 280px; /* 固定宽度 */
    background: white;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0; /* 不收缩 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-left: 24px; /* 左边距 */
}

/* 中间主内容区 - flex: 1 占据剩余空间 */
#step2 .editor-main {
    flex: 1; /* 关键：占据剩余空间 */
    background: var(--bg-main);
    padding: 0 24px 0 24px; /* 去掉底部padding，消除灰色边 */
    overflow-y: auto; /* 改为可滚动，支持sticky定位 */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative; /* 为sticky定位提供参考 */
}

#step2 .editor-main-inner {
    max-width: 794px; /* A4纸宽度 */
    width: 100%;
    margin: 0 auto; /* 居中 */
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px 8px 0 0; /* 顶部圆角，底部不要圆角（连接footer） */
    padding: 12mm 20mm 8mm 20mm; /* 减少顶部和底部padding，节省空间 */
    flex: 0 1 auto; /* 不增长，可收缩，自适应内容 */
    max-height: calc(100vh - 260px); /* 增加表格高度，显示更多内容 */
    overflow-y: auto; /* 表格内容可滚动 */
    overflow-x: hidden;
}

/* 固定底部按钮 - 确保始终可见 */
#step2 .editor-main-footer {
    max-width: 794px; /* 与内容区域同宽 */
    width: 100%;
    margin: 0 auto 0 auto; /* 底部无margin，紧贴容器底部 */
    background: white;
    border-top: 2px solid #e5e7eb;
    padding: 8px 24px; /* 减少padding，更紧凑 */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08); /* 改为向上的阴影，更自然 */
    position: sticky; /* 粘性定位 */
    bottom: 0; /* 粘在底部 */
    z-index: 100; /* 确保在最上层 */
    border-radius: 0 0 8px 8px;
}

#step2 .editor-main-footer .form-actions {
    display: flex;
    gap: 12px;
    justify-content: center; /* 确保按钮居中 */
    align-items: center;
}

#step2 .editor-main-footer .form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* 右侧面板：字段列表 */
#step2 .editor-panel {
    width: 320px; /* 固定宽度 */
    background: white;
    border-radius: 8px;
    padding: 0;
    overflow-y: auto;
    flex-shrink: 0; /* 不收缩 */
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-right: 24px; /* 右边距 */
}

#step2 .panel-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

#step2 .panel-fields-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}








































































#step2 .panel-fields-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ==================== 步骤2：表格样式（黑色边框）==================== */

/* 可视化表格容器 */
#step2 .visual-preview-container {
    background: white;
    /* 移除高度限制，让内容自然伸展 */
}

#step2 .visual-tables-container {
    display: flex;
    flex-direction: column;
    gap: 24px; /* 表格之间的间距 */
}

#step2 .visual-table-wrapper {
    margin-bottom: 24px;
    background: transparent; /* 移除白色背景 */
    border-radius: 0; /* 移除圆角 */
    padding: 0; /* 移除内边距 */
    box-shadow: none; /* 移除阴影 */
}

#step2 .visual-table-wrapper h4 {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-weight: 500;
}

/* 表格样式 - 黑色边框 */
#step2 .visual-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 2px solid #000; /* 外边框加粗 */
}

#step2 .visual-table td {
    border: 1px solid #000 !important; /* 黑色边框 */
    padding: 10px 12px;
    color: #000;
    font-size: 14px;
    line-height: 1.5;
    min-height: 32px;
}

#step2 .visual-table td.visual-cell {
    border-color: #000 !important;
}

/* 表头单元格样式 */
#step2 .visual-table td.cell-header {
    background: #f3f4f6;
    font-weight: 600;
}

/* 可编辑单元格悬停效果 */
#step2 .visual-table.selection-mode td:hover {
    background: #dbeafe !important;
    cursor: pointer;
    transition: background 0.15s ease;
}

/* 已标记字段的单元格 */
#step2 .visual-table td.cell-field-identified {
    background: #dcfce7 !important;
    position: relative;
}

#step2 .visual-table td.cell-field-identified::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 12px;
    color: #10b981;
    font-weight: bold;
}

/* ==================== 步骤2：段落块样式 ==================== */

/* 段落块基础样式 */
#step2 .visual-paragraph {
    padding: 8px 14px;
    margin: 4px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #111;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid transparent;
}

/* 空段落（占位行） */
#step2 .visual-paragraph-empty {
    height: 10px;
    padding: 0;
    margin: 2px 0;
    border: none;
}

/* 未标记段落 - 可点击 */
#step2 .visual-paragraph-unmarked {
    cursor: pointer;
    border: 1px dashed #d1d5db;
    background: #fafafa;
}

#step2 .visual-paragraph-unmarked:hover {
    background: #eff6ff;
    border-color: #6366f1;
}

/* 悬停时显示"+ 标记"提示 */
#step2 .visual-paragraph-unmarked:hover .para-mark-hint {
    opacity: 1;
}

/* 已标记段落 - 绿色高亮 */
#step2 .visual-paragraph-marked {
    cursor: pointer;
    background: #dcfce7;
    border: 1px solid #86efac;
}

#step2 .visual-paragraph-marked:hover {
    background: #bbf7d0;
    border-color: #4ade80;
}

/* 段落文字 */
.visual-paragraph-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 标记提示（未标记时显示，默认淡出） */
.para-mark-hint {
    flex-shrink: 0;
    font-size: 12px;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 3px;
    padding: 2px 8px;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

/* 已标记徽章 */
.para-field-badge {
    flex-shrink: 0;
    font-size: 12px;
    color: #fff;
    background: #22c55e;
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 步骤2：左侧教程样式 ==================== */

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tutorial-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tutorial-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.tutorial-step-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.tutorial-step-content p {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

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

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.tip-icon {
    color: #10b981;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==================== 步骤2：右侧字段列表样式 ==================== */

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-desc {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0;
}

#fieldCountBadge {
    font-weight: 700;
    color: #4f46e5;
}

/* 字段列表空状态 */
.fields-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

.fields-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.fields-empty p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* 字段列表项 */
.fields-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.field-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateX(-2px);
}

.field-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.field-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.field-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-name {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
    font-family: 'Courier New', monospace;
}

.field-type {
    font-size: 0.75rem;
    color: #6b7280;
    background: #e5e7eb;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.field-actions {
    display: flex;
    gap: 4px;
}

.field-actions .icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.field-actions .icon-btn:hover {
    opacity: 1;
}

.field-actions .icon-btn.delete:hover {
    transform: scale(1.1);
}

/* ==================== 步骤显示控制 ==================== */

.step-content {
    display: none;
}

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

/* 步骤卡片默认隐藏，由JavaScript控制显示 */
.content-card.step34-card {
    display: none;
}

/* 步骤1卡片默认显示 */
.content-card.step1-card {
    display: block;
}

/* ==================== 响应式调整 ==================== */

@media (max-width: 1600px) {
    #step2 .editor-sidebar {
        width: 260px;
    }

    #step2 .editor-panel {
        width: 300px;
    }
}

@media (max-width: 1400px) {
    #step2 .editor-sidebar {
        width: 240px;
        padding: 16px;
    }

    #step2 .editor-main-inner {
        max-width: 700px;
    }

    #step2 .editor-panel {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    #step2 .editor-layout {
        flex-direction: column;
        height: auto;
    }
    
    #step2 .editor-sidebar,
    #step2 .editor-main,
    #step2 .editor-panel {
        width: 100%;
    }
}

/* ==================== 步骤2引导蒙层 ==================== */
.step2-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step2-guide-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.step2-guide-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.step2-guide-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
    line-height: 1.4;
}

.step2-guide-card p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.6;
}

.step2-guide-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.demo-cell {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    background: #f9f9f9;
}

.demo-cell-marked {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

.demo-arrow {
    font-size: 18px;
    color: #999;
}

.guide-highlight {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #166534;
    line-height: 1.7;
    margin: 0 0 20px;
    text-align: left;
}

/* ==================== 侧边栏演示入口 ==================== */
.sidebar-demo-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    padding: 10px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #4f46e5;
    font-weight: 500;
    transition: background 0.2s;
}
.sidebar-demo-entry:hover { background: #e0e7ff; }
.demo-entry-icon {
    font-size: 11px;
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==================== 演示弹窗 ==================== */
.demo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.demo-modal-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.demo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.demo-modal-header h4 { font-size: 15px; font-weight: 600; margin: 0; }
.demo-modal-header button {
    background: none; border: none; font-size: 16px;
    cursor: pointer; color: #999; padding: 0; line-height: 1;
}
.demo-caption {
    font-size: 12px; color: #888; margin: 12px 0 0; text-align: center; line-height: 1.6;
}

/* ==================== 演示场景布局 ==================== */
.demo-scene {
    position: relative;
    display: flex;
    height: 280px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.demo-table-area {
    flex: 0 0 220px;
    padding: 0;
    border-right: 1px solid #e5e7eb;
}
.demo-table-row {
    display: flex;
    height: 56px;
    align-items: center;
    border-bottom: 1px solid #d1d5db;
}
.demo-table-row:last-child { border-bottom: 1px solid #d1d5db; }
.demo-label {
    width: 70px; font-size: 12px; color: #666;
    padding: 0 10px; border-right: 1px solid #d1d5db;
    height: 100%; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; background: #fafafa;
}
.demo-value {
    flex: 1; font-size: 12px; color: #333;
    padding: 0 10px; height: 100%; display: flex; align-items: center;
    border-right: 1px solid #d1d5db;
}
.demo-panel-area { flex: 1; padding: 12px 8px; max-width: 120px; }
.demo-panel-title { font-size: 11px; color: #999; margin-bottom: 8px; font-weight: 600; }
.demo-panel-item {
    font-size: 12px; padding: 5px 8px; border-radius: 4px;
    margin-bottom: 4px; background: #eef2ff; color: #4f46e5;
}

/* ==================== 动画元素 ==================== */
.demo-cursor-dot {
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #4f46e5;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,0.5);
    left: 28px; top: 28px;
    pointer-events: none;
    z-index: 10;
    animation: demoCursorMove 10s ease-in-out infinite;
}

/* 第一个涟漪（课题旁边）*/
.demo-ripple-1 {
    position: absolute;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(79,70,229,0.25);
    left: 124px; top: 14px;
    pointer-events: none;
    z-index: 9;
    animation: demoRipple1 10s ease-in-out infinite;
}

/* 第二个涟漪（年级旁边）*/
.demo-ripple-2 {
    position: absolute;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(79,70,229,0.25);
    left: 124px; top: 70px;
    pointer-events: none;
    z-index: 9;
    animation: demoRipple2 10s ease-in-out infinite;
}

/* 第一个单元格高亮 */
.demo-click-target-1 {
    animation: demoCell1Highlight 10s ease-in-out infinite;
}

/* 第二个单元格高亮 */
.demo-click-target-2 {
    animation: demoCell2Highlight 10s ease-in-out infinite;
}

/* 第一个字段出现 */
.demo-item-1 {
    animation: demoField1Appear 10s ease-in-out infinite;
}

/* 第二个字段出现 */
.demo-item-2 {
    animation: demoField2Appear 10s ease-in-out infinite;
}

/* 第一个配置弹窗 */
.demo-popup-1 {
    animation: demoPopup1 10s ease-in-out infinite;
}

/* 第二个配置弹窗 */
.demo-popup-2 {
    animation: demoPopup2 10s ease-in-out infinite;
}

/* 第一个按钮点击 */
.demo-btn-1 {
    animation: demoBtn1Click 10s ease-in-out infinite;
}

/* 第二个按钮点击 */
.demo-btn-2 {
    animation: demoBtn2Click 10s ease-in-out infinite;
}

/* ==================== 更新演示动画（10秒完整流程）==================== */

/* 光标动画：起点 → 第一个格子 → 第二个格子 → 回起点 */
@keyframes demoCursorMove {
    0%, 5%   { transform: translate(0, 0); }
    12%, 35% { transform: translate(110px, 0); }
    42%, 65% { transform: translate(110px, 56px); }
    72%, 100%{ transform: translate(0, 0); }
}

/* 第一次点击涟漪 */
@keyframes demoRipple1 {
    0%, 10%  { transform: scale(0); opacity: 0; }
    14%      { transform: scale(1); opacity: 1; }
    18%, 100%{ transform: scale(2.2); opacity: 0; }
}

/* 第二次点击涟漪 */
@keyframes demoRipple2 {
    0%, 40%  { transform: scale(0); opacity: 0; }
    44%      { transform: scale(1); opacity: 1; }
    48%, 100%{ transform: scale(2.2); opacity: 0; }
}

/* 第一个单元格高亮 */
@keyframes demoCell1Highlight {
    0%, 12%  { background: transparent; border-right: 1px solid #d1d5db; }
    16%, 35% { background: #eef2ff; border-right: 1px solid #4f46e5; }
    39%, 100%{ background: transparent; border-right: 1px solid #d1d5db; }
}

/* 第二个单元格高亮 */
@keyframes demoCell2Highlight {
    0%, 42%  { background: transparent; border-right: 1px solid #d1d5db; }
    46%, 65% { background: #eef2ff; border-right: 1px solid #4f46e5; }
    69%, 100%{ background: transparent; border-right: 1px solid #d1d5db; }
}

/* 第一个配置弹窗 */
@keyframes demoPopup1 {
    0%, 14%  { opacity: 0; }
    18%, 35% { opacity: 1; }
    39%, 100%{ opacity: 0; }
}

/* 第二个配置弹窗 */
@keyframes demoPopup2 {
    0%, 44%  { opacity: 0; }
    48%, 65% { opacity: 1; }
    69%, 100%{ opacity: 0; }
}

/* 第一个按钮点击 */
@keyframes demoBtn1Click {
    0%, 30%  { transform: scale(1); background: #4f46e5; }
    32%      { transform: scale(0.95); background: #4338ca; }
    34%, 100%{ transform: scale(1); background: #4f46e5; }
}

/* 第二个按钮点击 */
@keyframes demoBtn2Click {
    0%, 60%  { transform: scale(1); background: #4f46e5; }
    62%      { transform: scale(0.95); background: #4338ca; }
    64%, 100%{ transform: scale(1); background: #4f46e5; }
}

/* 第一个字段出现 */
@keyframes demoField1Appear {
    0%, 36%  { opacity: 0; transform: translateY(8px); }
    40%, 100%{ opacity: 1; transform: translateY(0); }
}

/* 第二个字段出现 */
@keyframes demoField2Appear {
    0%, 66%  { opacity: 0; transform: translateY(8px); }
    70%, 100%{ opacity: 1; transform: translateY(0); }
}

/* ==================== 演示配置弹窗 ==================== */
.demo-config-popup {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 220px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    padding: 16px;
    z-index: 20;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.demo-config-title {
    font-size: 14px; font-weight: 600; color: #1a1a2e;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.demo-config-row {
    display: flex; align-items: center;
    gap: 8px; margin-bottom: 10px;
}
.demo-config-label { font-size: 12px; color: #666; width: 60px; flex-shrink: 0; }
.demo-config-input {
    flex: 1; font-size: 12px; color: #333;
    background: #f8f9fa; border: 1px solid #d1d5db;
    border-radius: 4px; padding: 5px 8px;
}
.demo-config-btn {
    margin-top: 12px; background: #4f46e5; color: #fff;
    font-size: 12px; text-align: center; border-radius: 5px;
    padding: 7px 0; cursor: pointer; font-weight: 500;
}


/* ==================== 字段配置弹窗提示 ==================== */
.field-auto-hint {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.6;
    margin-bottom: 14px;
}
.field-hint-text {
    font-size: 12px;
    color: #6366f1;
    font-weight: 400;
    margin-left: 4px;
}
