/* ==========================================================================
   数字内容版权创作过程可信认证样式表 (V2.0 阶段物证与结构化元数据体系)
   ========================================================================== */

/* 顶栏与标识 */
.cr-shell {
    padding-bottom: 3rem;
}

.cr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.cr-badge--conception {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.cr-badge--ai {
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.cr-badge--ps {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.cr-badge--seal {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cr-badge--artifact {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-size: 0.7rem;
}

/* 选项卡栏 */
.cr-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--line, #e2e8f0);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.cr-tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink-soft, #64748b);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cr-tab-btn:hover {
    color: var(--primary, #2563eb);
    background: var(--bg-hover, #f8fafc);
    border-radius: 6px 6px 0 0;
}

.cr-tab-btn.active {
    color: var(--primary, #2563eb);
    border-bottom-color: var(--primary, #2563eb);
}

/* 节点卡片容器 */
.cr-chain-builder {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.cr-chain-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
}

.cr-node-card {
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-xl, 12px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cr-node-card:hover {
    border-color: #cbd5e1;
}

.cr-node-card.final-seal {
    border: 2px solid #10b981;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.cr-node-card__header {
    background: #f8fafc;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cr-node-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.cr-node-card__title-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cr-node-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* 过程物证文件区域 */
.cr-artifacts-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cr-artifacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cr-artifacts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cr-artifact-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.cr-artifact-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cr-artifact-hash {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* 阶段专有结构化数据表单盒 */
.cr-structured-box {
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.cr-structured-box--conception {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.cr-structured-box--ai {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
}

.cr-structured-box--ps {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.cr-structured-box--seal {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* 阶段清单摘要 (Stage Manifest Digest) 底栏 */
.cr-stage-digest-bar {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.cr-stage-digest-val {
    font-family: var(--font-mono, monospace);
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

/* 链式哈希指示器 */
.cr-chain-arrow-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    color: #94a3b8;
    position: relative;
}

.cr-chain-arrow-pill {
    background: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 三维哈希卡片组 (仅归属于终稿导出的实体图像) */
.cr-3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 0.5rem 0;
}

.cr-3d-card {
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-lg, 10px);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cr-3d-card--file {
    border-top: 4px solid #0284c7;
}

.cr-3d-card--content {
    border-top: 4px solid #10b981;
}

.cr-3d-card--meta {
    border-top: 4px solid #f59e0b;
}

.cr-3d-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cr-3d-card__title {
    font-weight: 700;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cr-3d-card__hash {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    border-radius: 6px;
    word-break: break-all;
    color: #1e293b;
}

/* 时间线图谱 (Git Graph 样式) */
.cr-timeline {
    position: relative;
    padding: 1rem 0 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cr-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 3px;
    background: #cbd5e1;
    border-radius: 2px;
}

.cr-timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cr-timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    z-index: 2;
}

.cr-timeline-item.sealed::before {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background: #10b981;
}

.cr-timeline-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.125rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 司法独创性证据卷宗卡片 (Judicial Dossier) */
.cr-dossier-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.cr-dossier-stage {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 核验矩阵表格 */
.cr-verify-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.cr-verify-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.cr-verify-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--line, #e2e8f0);
    vertical-align: middle;
}

.cr-verify-table tr:last-child td {
    border-bottom: none;
}

.cr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.cr-status-badge--pass {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.cr-status-badge--warning {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fef08a;
}

.cr-status-badge--fail {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.cr-status-badge--indet {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
