.page {
    min-height: 100vh;
    background: #f8fafc;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    padding-left: 24rpx;
    padding-right: 24rpx;
    padding-bottom: 16rpx;
    box-sizing: border-box;
    z-index: 100;
    border-bottom: 1rpx solid #e5e7eb;
}

.nav-back {
    width: 60rpx;
    height: 64rpx;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-back-icon {
    width: 20rpx;
    height: 20rpx;
    border-left: 4rpx solid #333;
    border-bottom: 4rpx solid #333;
    transform: rotate(45deg);
}

.nav-title {
    flex: 1;
    font-size: 34rpx;
    font-weight: 500;
    color: #333;
    text-align: center;
    line-height: 64rpx;
}

.nav-capsule {
    width: 174rpx;
    height: 64rpx;
}

.content {
    padding: 24rpx;
    padding-bottom: 140rpx;
}

// 工单头部卡片
.header-card {
    background: #fff;
    border-radius: 16rpx;
    padding: 32rpx 24rpx;
    margin-bottom: 24rpx;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.header-info {
    flex: 1;
}

.workcase-id {
    font-size: 40rpx;
    font-weight: 700;
    color: #4b87ff;
    margin-bottom: 16rpx;
    display: block;
}

.header-tags {
    display: flex;
    flex-direction: row;
    gap: 16rpx;
}

.status-badge,
.urgency-badge {
    padding: 8rpx 16rpx;
    border-radius: 8rpx;
    font-size: 24rpx;
    font-weight: 500;
}

.badge-text {
    font-size: 24rpx;
}

.header-action {
    flex-shrink: 0;
    margin-left: 24rpx;
}

.action-btn {
    padding: 12rpx 24rpx;
    background: #4b87ff;
    color: #fff;
    border-radius: 8rpx;
    font-size: 26rpx;
    font-weight: 500;
}

.section {
    background: #fff;
    border-radius: 20rpx;
    padding: 24rpx;
    margin-bottom: 20rpx;
}

.section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 30rpx;
    font-weight: 600;
    color: #222;
    margin-bottom: 20rpx;
}

.title-bar {
    width: 6rpx;
    height: 28rpx;
    background: #173294;
    margin-right: 12rpx;
    border-radius: 3rpx;
}

.title-text {
    font-size: 30rpx;
    font-weight: 600;
    color: #222;
}

// 表单容器
.form-container {
    background: #fff;
    border-radius: 16rpx;
    overflow: hidden;
}

.form-item {
    padding: 24rpx;
    border-bottom: 1rpx solid #f3f4f6;
    
    &:last-child {
        border-bottom: none;
    }
}

.form-label {
    display: block;
    font-size: 26rpx;
    color: #6b7280;
    margin-bottom: 16rpx;
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 68rpx;
    padding: 0 24rpx;
    background: #f9fafb;
    border: 1rpx solid #e5e7eb;
    border-radius: 8rpx;
    font-size: 28rpx;
    color: #111827;
}

.form-textarea {
    width: 100%;
    min-height: 200rpx;
    padding: 16rpx 24rpx;
    background: #f9fafb;
    border: 1rpx solid #e5e7eb;
    border-radius: 8rpx;
    font-size: 28rpx;
    color: #111827;
    line-height: 1.5;
}

.form-value {
    display: block;
    font-size: 28rpx;
    color: #111827;
    line-height: 1.5;
}

.form-picker {
    width: 100%;
}

.picker-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 68rpx;
    padding: 0 24rpx;
    background: #f9fafb;
    border: 1rpx solid #e5e7eb;
    border-radius: 8rpx;
}

.picker-text {
    flex: 1;
    font-size: 28rpx;
    color: #111827;
}

.picker-arrow {
    font-size: 32rpx;
    color: #9ca3af;
    margin-left: 16rpx;
}

// 铭牌照片上传
.nameplate-upload {
    width: 100%;
}

.nameplate-preview {
    position: relative;
    width: 200rpx;
    height: 200rpx;
    border-radius: 12rpx;
    overflow: hidden;
    border: 1rpx solid #e5e7eb;
}

.nameplate-placeholder {
    width: 200rpx;
    height: 200rpx;
    border: 2rpx dashed #d1d5db;
    border-radius: 12rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.nameplate-delete {
    position: absolute;
    top: 4rpx;
    right: 4rpx;
    width: 44rpx;
    height: 44rpx;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nameplate-photo {
    width: 100%;
    max-width: 400rpx;
    height: 300rpx;
    border-radius: 12rpx;
    overflow: hidden;
    border: 1rpx solid #e5e7eb;
    background: #f9fafb;
}

.nameplate-image {
    width: 100%;
    height: 100%;
}

.delete-icon {
    font-size: 32rpx;
    color: #fff;
    line-height: 1;
    font-weight: 300;
}

.required {
    color: #ef4444;
    margin-left: 4rpx;
}

.status-tag {
    padding: 4rpx 12rpx;
    border-radius: 6rpx;
    font-weight: 600;
}

.status-pending {
    background: #fff7e6;
    color: #faad14;
}

.status-pending .tag-text {
    color: #faad14;
}

.status-processing {
    background: #e7f7ea;
    color: #3abe59;
}

.status-processing .tag-text {
    color: #3abe59;
}

.status-done {
    background: #f0f0f0;
    color: #999;
}

.status-done .tag-text {
    color: #999;
}

.tag-text {
    font-size: 24rpx;
    font-weight: 600;
}

.level-tag {
    padding: 4rpx 12rpx;
    border-radius: 6rpx;
}

.level-tag.urgent {
    background: #fff1f0;
    color: #ff4d4f;
}

.level-tag.urgent .level-text {
    color: #ff4d4f;
}

.level-tag.normal {
    background: #e6f7ff;
    color: #1890ff;
}

.level-tag.normal .level-text {
    color: #1890ff;
}

.level-text {
    font-size: 24rpx;
}

.section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 30rpx;
    font-weight: 600;
    color: #222;
    margin-bottom: 24rpx;
}

.title-icon {
    font-size: 32rpx;
    margin-right: 12rpx;
}

// 照片网格
.photos-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16rpx;
}

.photo-item {
    position: relative;
    width: 200rpx;
    height: 200rpx;
    border-radius: 12rpx;
    overflow: hidden;
    border: 1rpx solid #e5e7eb;
}

.photo-image {
    width: 100%;
    height: 100%;
}

.photo-upload {
    width: 200rpx;
    height: 200rpx;
    border: 2rpx dashed #d1d5db;
    border-radius: 12rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.upload-plus {
    font-size: 60rpx;
    color: #9ca3af;
    line-height: 1;
    margin-bottom: 8rpx;
}

.upload-text {
    font-size: 24rpx;
    color: #9ca3af;
}

.upload-tip {
    display: block;
    font-size: 24rpx;
    color: #9ca3af;
    margin-top: 16rpx;
}

// 图片删除按钮
.photo-delete {
    position: absolute;
    top: 4rpx;
    right: 4rpx;
    width: 44rpx;
    height: 44rpx;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    flex-direction: row;
    position: relative;
    padding-bottom: 32rpx;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 32rpx;
    height: 32rpx;
    border-radius: 50%;
    border: 4rpx solid #fff;
    box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
    margin-right: 24rpx;
    margin-top: 8rpx;
    flex-shrink: 0;
}

.dot-system {
    background: #60a5fa;
}

.dot-manager {
    background: #fb923c;
}

.dot-engineer {
    background: #34d399;
}

.timeline-line {
    position: absolute;
    left: 14rpx;
    top: 44rpx;
    width: 4rpx;
    height: calc(100% - 32rpx);
    background: #f3f4f6;
}

.timeline-body {
    flex: 1;
    background: #fff;
    border: 1rpx solid #e5e7eb;
    border-radius: 12rpx;
    padding: 20rpx 24rpx;
}

.timeline-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12rpx;
    margin-bottom: 8rpx;
}
.timeline-time {
    display: block;
    font-size: 30rpx;
    color: #173294;
}
.timeline-date {
    display: block;
    font-size: 24rpx;
    color: #6b7280;
}
.timeline-info{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}
.timeline-actor {
    font-size: 28rpx;
    font-weight: 700;
    color: #111827;
}

.timeline-action {
    font-size: 28rpx;
    color: #6b7280;
}

.timeline-desc {
    display: block;
    font-size: 26rpx;
    color: #111827;
    line-height: 1.5;
    margin-left: 8rpx;
}

// 处理记录附件
.timeline-files {
    margin-top: 16rpx;
    padding-top: 16rpx;
    border-top: 1rpx dashed #e5e7eb;
}

.files-label {
    font-size: 24rpx;
    color: #9ca3af;
    margin-bottom: 8rpx;
    display: block;
}

.files-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12rpx;
}

.file-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8rpx;
    padding: 8rpx 16rpx;
    background: #f3f4f6;
    border-radius: 8rpx;
}

.file-icon {
    font-size: 28rpx;
}

.file-name {
    font-size: 24rpx;
    color: #4b87ff;
    max-width: 200rpx;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

// 底部占位
.footer-placeholder {
    height: 120rpx;
}

// 底部操作栏
.footer-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1rpx solid #e5e7eb;
    padding: 24rpx;
    display: flex;
    flex-direction: row;
    gap: 24rpx;
    z-index: 99;
}

.action-button {
    flex: 1;
    height: 80rpx;
    border-radius: 8rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1rpx solid #e5e7eb;
    background: #fff;
    
    &.primary {
        background: #f59e0b;
        border-color: #f59e0b;
        
        .button-text {
            color: #fff;
        }
    }
    
    &.success {
        background: #10b981;
        border-color: #10b981;
        
        .button-text {
            color: #fff;
        }
    }
}

.button-text {
    font-size: 28rpx;
    color: #6b7280;
    font-weight: 500;
}


// 弹窗样式
.process-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.process-modal {
    width: 90%;
    max-width: 600rpx;
    background: #fff;
    border-radius: 16rpx;
    overflow: hidden;
}

.modal-header {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 32rpx 24rpx;
    border-bottom: 1rpx solid #f0f0f0;
}

.modal-title {
    font-size: 32rpx;
    font-weight: 600;
    color: #333;
}

.modal-close {
    position: absolute;
    right: 24rpx;
    top: 50%;
    transform: translateY(-50%);
    width: 48rpx;
    height: 48rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    
    text {
        font-size: 40rpx;
        color: #999;
        line-height: 1;
    }
}

.modal-body {
    padding: 24rpx;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    border-top: 1rpx solid #f0f0f0;
}

.modal-btn {
    flex: 1;
    height: 88rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28rpx;
    color: #666;
    background: #fff;
    border: none;
    border-radius: 0;
    
    &.primary {
        color: #fff;
        background: #4b87ff;
    }
    
    &::after {
        border: none;
    }
}

// picker 箭头样式
.picker-arrow {
    font-size: 28rpx;
    color: #9ca3af;
    margin-left: 16rpx;
}

.picker-arrow-icon {
    width: 16rpx;
    height: 16rpx;
    border-right: 4rpx solid #9ca3af;
    border-bottom: 4rpx solid #9ca3af;
    transform: rotate(-45deg);
    margin-left: 16rpx;
    flex-shrink: 0;
}

.picker-text.placeholder {
    color: #9ca3af;
}

// 加载提示
.loading-tip {
    padding: 16rpx 0;
    
    text {
        font-size: 24rpx;
        color: #9ca3af;
    }
}

// 字数统计
.char-count {
    display: block;
    text-align: right;
    font-size: 22rpx;
    color: #9ca3af;
    margin-top: 8rpx;
}

// 文件上传区域
.file-upload-section {
    margin-top: 16rpx;
}

.file-list {
    margin-bottom: 16rpx;
}

.file-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16rpx;
    background: #f9fafb;
    border-radius: 8rpx;
    margin-bottom: 8rpx;
}

.file-item .file-name {
    flex: 1;
    font-size: 26rpx;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-delete {
    width: 40rpx;
    height: 40rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    
    text {
        font-size: 32rpx;
        color: #999;
    }
}

.upload-btn {
    font-size: 24rpx;
}

// 添加处理记录按钮区域
.add-process-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16rpx;
}

.add-process-btn {
    font-size: 24rpx;
}

// 危险/警告按钮
.action-button.danger {
    background: #ef4444;
    border-color: #ef4444;
    
    .button-text {
        color: #fff;
    }
}

.action-button.warning {
    background: #f59e0b;
    border-color: #f59e0b;
    
    .button-text {
        color: #fff;
    }
}
