/* OPC工作流样式 */

/* 工作流列表页 */
.workflow-archive {
    padding: 64px 0;
    background: #f8fafc;
    min-height: 100vh;
}

.workflow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

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

.workflow-title {
    font-size: 40px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -1px;
}

.workflow-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

.workflow-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.workflow-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    color: white;
}

/* 筛选区 */
.workflow-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #0066FF;
}

/* 工作流网格 */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.workflow-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-decoration: none;
    display: block;
}

.workflow-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

.workflow-thumb {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.workflow-thumb-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.workflow-platform-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #0066FF;
}

.workflow-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.workflow-content {
    padding: 24px;
}

.workflow-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.workflow-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.workflow-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.workflow-points {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #F59E0B;
}

.workflow-downloads {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #999;
}

/* 工作流详情页 */
.workflow-single {
    padding: 64px 0;
    background: #f8fafc;
    min-height: 100vh;
}

.workflow-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.workflow-main {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.workflow-detail-header {
    margin-bottom: 32px;
}

.workflow-detail-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.badge-platform {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 82, 204, 0.1) 100%);
    color: #0066FF;
}

.badge-type {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.workflow-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    letter-spacing: -1px;
}

.workflow-detail-meta {
    display: flex;
    gap: 24px;
    color: #999;
    font-size: 14px;
}

.workflow-detail-desc {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
}

/* 下载卡片 */
.workflow-sidebar {
    position: sticky;
    top: 100px;
}

.download-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.download-points-box {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4CC 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.download-points-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.download-points-value {
    font-size: 48px;
    font-weight: 800;
    color: #F59E0B;
}

.download-points-unit {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.download-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.download-btn:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
}

.download-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.download-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.download-info-label {
    color: #666;
}

.download-info-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* 上传页面 */
.workflow-upload-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

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

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.form-label .required {
    color: #ef4444;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

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

.form-hint {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

/* 文件上传区 */
.file-upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: #0066FF;
    background: rgba(0, 102, 255, 0.02);
}

.file-upload-zone.has-file {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #999;
}

.upload-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #999;
}

.file-preview {
    display: none;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 16px;
}

.file-preview.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.file-size {
    font-size: 13px;
    color: #666;
}

.file-remove {
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.file-remove:hover {
    color: #ef4444;
}

/* 表单按钮 */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

/* 空状态 */
.workflow-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 24px;
    border: 2px dashed #e5e7eb;
}

.workflow-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #d1d5db;
}

.workflow-empty h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.workflow-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

/* 分页 */
.workflow-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
}

.pagination-btn {
    padding: 10px 18px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover,
.pagination-btn.current {
    background: #0066FF;
    color: white;
    border-color: #0066FF;
}

/* 响应式 */
@media (max-width: 1200px) {
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .workflow-detail {
        grid-template-columns: 1fr;
    }

    .workflow-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .workflow-container {
        padding: 0 20px;
    }

    .workflow-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .workflow-title {
        font-size: 28px;
    }

    .workflow-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .workflow-main {
        padding: 32px;
    }

    .workflow-upload-form {
        padding: 32px;
    }
}

@media (max-width: 480px) {
    .workflow-grid {
        grid-template-columns: 1fr;
    }
}

/* 面包屑导航 */
.workflow-breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.workflow-breadcrumb a {
    color: #0066FF;
    text-decoration: none;
}

.workflow-breadcrumb a:hover {
    text-decoration: underline;
}

.workflow-breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.workflow-breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* 详情页元信息 */
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    color: #999;
}

/* 相关工作流 */
.related-workflows {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.related-workflows h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.related-card:hover {
    background: #f0f4f8;
    transform: translateX(4px);
}

.related-thumb {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.related-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-content span {
    font-size: 13px;
    color: #F59E0B;
    font-weight: 600;
}

/* 下载按钮状态 */
.download-btn-disabled {
    background: #e5e7eb !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* 下载说明 */
.download-tips {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.download-tips h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.download-tips ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.download-tips li {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
}

.download-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0066FF;
}

/* 积分信息样式 */
.download-points-info {
    flex: 1;
}

.download-points-box {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 24px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4CC 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.download-points-box > svg {
    color: #F59E0B;
    flex-shrink: 0;
}

.download-points-value {
    font-size: 40px;
    font-weight: 800;
    color: #F59E0B;
    line-height: 1;
}

/* 上传页面样式 */
.workflow-submit-page {
    padding: 40px 0;
    background: #f5f7fa;
    min-height: calc(100vh - 200px);
}

.submit-header {
    text-align: center;
    margin-bottom: 40px;
}

.submit-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.submit-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.workflow-form {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

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

.form-group .required {
    color: #ff4d4f;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.file-upload-area:hover {
    border-color: #0066FF;
    background: #f8faff;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    color: #999;
}

.file-upload-text svg {
    color: #ccc;
    margin-bottom: 12px;
}

.file-upload-text p {
    margin: 0;
    font-size: 14px;
}

.file-hint {
    font-size: 12px !important;
    color: #bbb !important;
    margin-top: 8px !important;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #0066FF;
}

.file-preview svg {
    color: #0066FF;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
}

.file-remove {
    background: #ff4d4f;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
}

.file-remove:hover {
    background: #ff7875;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #0066FF;
    color: #fff;
}

.btn-primary:hover {
    background: #0052cc;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-lg {
    padding: 14px 32px;
}

.submit-tips {
    margin-top: 32px;
    padding: 24px;
    background: #fff9e6;
    border-radius: 12px;
    border-left: 4px solid #faad14;
}

.submit-tips h3 {
    font-size: 16px;
    font-weight: 600;
    color: #d48806;
    margin: 0 0 12px;
}

.submit-tips ul {
    margin: 0;
    padding-left: 20px;
}

.submit-tips li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.submit-tips strong {
    color: #333;
}

@media (max-width: 768px) {
    .workflow-form {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}
