/* ========== 工作报告卡片样式 ========== */
/* 玻璃态风格，符合现有UI设计 */

.workflow-report-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
    max-width: 800px;
    color: #111827;
    width: 100%;
}

.workflow-report-card:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px 0 rgba(31, 38, 135, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* 报告头部 */
.report-header {
    margin-bottom: 1rem;
}

/* 时间信息区域 */
.report-time-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    color: #64748b;
}

.report-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-icon {
    width: 24px;
    height: 24px;
    color: #6366f1;
    flex-shrink: 0;
}

.report-title h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.report-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 摘要统计 */
.report-summary-section {
    margin-bottom: 1.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
    border-left: 4px solid #22C55E;
}

.stat-card.warning {
    border-left: 4px solid #EAB308;
}

.stat-card.error {
    border-left: 4px solid #EF4444;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 报告区域 */
.report-section {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.section-icon {
    font-size: 1.25rem;
}

.toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #64748b;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.section-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    padding: 0 1.25rem 1rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-header.expanded + .section-content {
    max-height: 2000px;
    padding: 0 1.25rem 1rem 1.25rem;
}

/* 工作项卡片 */
.work-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.work-item.verified {
    border-left: 4px solid #22C55E;
}

.work-item.needs-review {
    border-left: 4px solid #EAB308;
}

.work-item.failed {
    border-left: 4px solid #EF4444;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.2);
    color: #0f172a;
}

.item-agent {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.item-summary {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-weight: 500;
}

.item-summary-text {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.75rem;
    line-height: 1.8;
    font-weight: 400;
    white-space: pre-wrap;
}

.summary-line {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    padding-left: 0.75rem;
}

.summary-line:last-child {
    margin-bottom: 0;
}

.item-details {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    line-height: 1.5;
}

.item-execution-time {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.item-confidence {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.confidence-bar {
    width: 100px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #22C55E, #EAB308);
    transition: width 0.3s ease;
}

.item-issues,
.item-recommendations {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.item-issues strong,
.item-recommendations strong {
    font-size: 0.75rem;
    color: #0f172a;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.item-issues ul,
.item-recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-issues li,
.item-recommendations li {
    font-size: 0.75rem;
    color: #475569;
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.item-issues li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
}

.item-recommendations li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* 详细信息样式 */
.item-detailed-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.detailed-processing,
.detailed-success,
.detailed-failed,
.detailed-exception {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detailed-processing strong,
.detailed-success strong,
.detailed-failed strong,
.detailed-exception strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.processing-detail {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
}

.processing-detail strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.375rem;
}

.detail-content {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.6;
}

.detail-content > div {
    margin-bottom: 0.25rem;
}

.channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.channel-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #6366f1;
    font-weight: 500;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.order-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.order-item.success {
    border-left: 3px solid #22C55E;
}

.order-item.failed {
    border-left: 3px solid #EF4444;
}

.order-item.exception {
    border-left: 3px solid #EAB308;
}

.order-id {
    font-weight: 600;
    color: #0f172a;
    min-width: 120px;
}

.order-status {
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    color: #475569;
    font-size: 0.6875rem;
}

.order-channel,
.order-supplier {
    color: #6366f1;
    font-weight: 500;
}

.order-tracking {
    color: #64748b;
    font-family: monospace;
}

.order-error {
    color: #EF4444;
    flex: 1;
    min-width: 200px;
}

.order-exception-type {
    color: #EAB308;
    font-weight: 500;
}

.order-handling {
    color: #22C55E;
    font-size: 0.6875rem;
}

.more-orders {
    margin-top: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
}

/* 流程进度条样式（从Demo页面集成） */
.workflow-progress-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    text-align: center;
}

.workflow-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1rem 0;
}

.workflow-phase-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.workflow-phase-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 3px solid rgba(200, 200, 200, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.workflow-phase-item.completed .workflow-phase-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    animation: phaseCompletePulse 0.6s ease-out;
}

.workflow-phase-item.completed .workflow-phase-icon::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.workflow-phase-item.completed.needs-review .workflow-phase-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.workflow-phase-item.failed .workflow-phase-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.workflow-phase-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.workflow-phase-item.completed .workflow-phase-label {
    color: #059669;
    font-weight: 700;
}

.workflow-phase-item.completed.needs-review .workflow-phase-label {
    color: #d97706;
}

.workflow-phase-item.failed .workflow-phase-label {
    color: #dc2626;
}

.workflow-phase-status {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.workflow-phase-item.completed .workflow-phase-status {
    color: #059669;
    font-weight: 600;
}

.workflow-phase-item.completed.needs-review .workflow-phase-status {
    color: #d97706;
}

.workflow-phase-item.failed .workflow-phase-status {
    color: #dc2626;
}

.workflow-phase-connector {
    flex: 0 0 60px;
    height: 4px;
    background: rgba(200, 200, 200, 0.3);
    margin: 0 10px;
    position: relative;
    top: -35px;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.workflow-phase-connector.completed {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

@keyframes phaseCompletePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1.15);
    }
}

/* 业务数据样式 */
.business-data-section {
    margin-top: 1.5rem;
}

.business-stats-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.business-stat-card-enhanced {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.business-stat-card-enhanced:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-icon-wrapper {
    flex-shrink: 0;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.business-stat-card-enhanced.email-stat .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.3) 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

.business-stat-card-enhanced.order-stat .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}

.business-stat-card-enhanced.success-stat .stat-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.3) 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

.business-stat-card-enhanced.tracking-stat .stat-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(147, 51, 234, 0.3) 100%);
    border-color: rgba(168, 85, 247, 0.4);
}

.business-stat-card-enhanced.channel-stat .stat-icon {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(249, 115, 22, 0.3) 100%);
    border-color: rgba(251, 146, 60, 0.4);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value-large {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.stat-unit {
    font-size: 0.6875rem;
    color: #94a3b8;
    font-weight: 500;
}

.business-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.business-stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.business-stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.business-stat-card .stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.business-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.subsection-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.supplier-summary-section {
    margin-bottom: 1.5rem;
}

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

.supplier-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.supplier-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.supplier-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    flex-wrap: wrap;
}

.orders-list-section {
    margin-bottom: 1.5rem;
}

.orders-table-container {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.orders-table thead {
    background: rgba(255, 255, 255, 0.1);
}

.orders-table th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.orders-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #475569;
}

.orders-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.order-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
}

.order-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.order-status.processing {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.orders-more-info {
    margin-top: 0.75rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .workflow-progress-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .workflow-phase-connector {
        width: 4px;
        height: 40px;
        flex: 0 0 40px;
        top: 0;
        margin: 0;
    }
    
    .business-stats-grid-enhanced {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .business-stat-card-enhanced {
        flex-direction: column;
        text-align: center;
    }
    
    .business-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .report-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .workflow-report-card {
        padding: 1rem;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-id {
        min-width: auto;
    }
    
    .orders-table {
        font-size: 0.6875rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .supplier-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
}

