/* IPO反馈问答专家 - 自定义样式 */

[x-cloak] { display: none !important; }

/* 顶栏 */
.topbar-active { }
.topbar-hover { }

/* Markdown 渲染 */
[x-html] p { margin-bottom: 0.5rem; }
[x-html] p:last-child { margin-bottom: 0; }
[x-html] ul, [x-html] ol { margin: 0.5rem 0; padding-left: 1.25rem; }
[x-html] li { margin: 0.25rem 0; }
[x-html] code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}
[x-html] pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.8em;
    margin: 0.5rem 0;
}
[x-html] pre code {
    background: transparent;
    padding: 0;
}
[x-html] blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 1rem;
    color: #64748b;
    margin: 0.5rem 0;
}
[x-html] table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5rem 0;
}
[x-html] th, [x-html] td {
    border: 1px solid #e2e8f0;
    padding: 0.375rem 0.75rem;
    text-align: left;
}
[x-html] th { background: #f8fafc; font-weight: 600; }

/* 文本截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 弹性布局溢出修复 */
.flex.flex-col > .flex-1 { min-height: 0; }

/* 分类下拉 */
.classification-select {
    min-width: 150px;
}

/* Agent UI 增强 */
.agent-analysis-content p { margin-bottom: 0.25rem; }
.agent-analysis-content p:last-child { margin-bottom: 0; }
.agent-analysis-content ul, .agent-analysis-content ol { margin: 0.25rem 0; padding-left: 1.25rem; }
.agent-analysis-content code { background: rgba(147, 51, 234, 0.1); color: #7c3aed; padding: 0.125rem 0.25rem; border-radius: 0.25rem; font-size: 0.85em; }

/* Agent 切换按钮过渡 */
.agent-toggle-btn {
    transition: all 0.2s ease;
}

/* 见微风格详情页 - 匹配高亮 */
.match-highlight {
    background: #fef08a;
    color: #1e293b;
    border-radius: 2px;
    padding: 0 1px;
}

.match-current {
    background: #f97316;
    color: #fff;
    border-radius: 2px;
    padding: 0 1px;
}

/* 见微风格详情页 - 目录侧边栏 */
#detail-toc-panel .rotate-90 {
    transform: rotate(90deg);
}

#detail-toc-panel > div > div:first-child {
    transition: background 0.15s;
}

/* 详情内容区 - 行高优化 */
.detail-content {
    line-height: 1.9;
}

/* 详情内容区 - 表格容器 */
.table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fafbfc;
}
.table-wrapper table {
    margin: 0;
}
.table-wrapper th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}
.table-wrapper td {
    font-size: 0.8rem;
}
.table-wrapper tr:hover td {
    background: #f8fafc;
}

/* 详情页滚动条 */
#detail-content-area::-webkit-scrollbar {
    width: 8px;
}
#detail-content-area::-webkit-scrollbar-track {
    background: #f8fafc;
}
#detail-content-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
#detail-content-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#detail-toc-panel::-webkit-scrollbar {
    width: 4px;
}
#detail-toc-panel::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 2px;
}

/* ===== 文件预览 - Excel 表格 ===== */
.excel-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.75rem;
}
.excel-table th, .excel-table td {
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.5rem;
    text-align: left;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.excel-table th {
    background: #f1f5f9;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}
.excel-table tr:nth-child(even) td {
    background: #f8fafc;
}
.excel-table tr:hover td {
    background: #eff6ff;
}

/* 文件预览 - prose 样式 */
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1rem; margin-bottom: 0.5rem; font-weight: 600; }
.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.1rem; }
.prose p { margin-bottom: 0.75rem; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 0.5rem 0; }
.prose th, .prose td { border: 1px solid #e2e8f0; padding: 0.375rem 0.75rem; text-align: left; }
.prose th { background: #f8fafc; font-weight: 600; }
.prose img { max-width: 100%; border-radius: 0.5rem; }

/* ===== 审核进度条 ===== */
.progress-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 0 1rem;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}
.progress-step:first-child { align-items: flex-start; }
.progress-step:last-child { align-items: flex-end; }
.progress-step:first-child .progress-dot { margin-left: 0; }
.progress-step:last-child .progress-dot { margin-right: 0; }

.progress-line {
    position: absolute;
    top: 12px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
}
.progress-step:first-child .progress-line { display: none; }
.progress-line--active {
    background: #10b981;
}

.progress-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: 2px solid #e2e8f0;
    background: #fff;
    transition: all 0.3s;
}
.progress-step--completed .progress-dot {
    background: #10b981;
    border-color: #10b981;
}
.progress-step--current .progress-dot {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    animation: pulse-ring 2s ease-in-out infinite;
}
.progress-step--pending .progress-dot {
    background: #fff;
    border-color: #d1d5db;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1); }
}

.progress-label {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}
.progress-step--completed .progress-label { color: #059669; }
.progress-step--current .progress-label { color: #2563eb; font-weight: 600; }

.progress-date {
    margin-top: 2px;
    font-size: 0.675rem;
    color: #9ca3af;
    min-height: 1rem;
}
