﻿/* 工序状态颜色增强 */
.process-item {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    margin-bottom: 1rem;
}

/* 未开始 - 红色 */
.process-item.status-not_started {
    border-color: #ef4444;
    background: linear-gradient(to right, #fef2f2 0%, white 10%);
}

.process-item.status-not_started .process-status {
    background: #fee2e2;
    color: #dc2626;
}

/* 进行中 - 蓝色 */
.process-item.status-in_progress {
    border-color: #3b82f6;
    background: linear-gradient(to right, #eff6ff 0%, white 10%);
}

.process-item.status-in_progress .process-status {
    background: #dbeafe;
    color: #2563eb;
}

/* 等待材料 - 橙色 */
.process-item.status-waiting_material {
    border-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, white 10%);
}

.process-item.status-waiting_material .process-status {
    background: #fef3c7;
    color: #d97706;
}

/* 天气停工 - 灰色 */
.process-item.status-weather_stop {
    border-color: #9ca3af;
    background: linear-gradient(to right, #f9fafb 0%, white 10%);
}

.process-item.status-weather_stop .process-status {
    background: #f3f4f6;
    color: #6b7280;
}

/* 已完成 - 绿色 */
.process-item.status-completed {
    border-color: #10b981;
    background: linear-gradient(to right, #f0fdf4 0%, white 10%);
}

.process-item.status-completed .process-status {
    background: #d1fae5;
    color: #059669;
}

/* 子任务展开区域 */
.process-subtasks-area {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: none;
}

.process-subtasks-area.expanded {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.subtask-list-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subtask-item-inline {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subtask-item-inline.completed {
    opacity: 0.7;
    background: #f0fdf4;
    border-color: #86efac;
}

.subtask-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.subtask-info-inline {
    flex: 1;
}

.subtask-name-inline {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.subtask-progress-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.subtask-actions-inline {
    display: flex;
    gap: 0.5rem;
}

/* 操作按钮组 */
.process-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-start {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-start:hover {
    background: #2563eb;
}

.btn-toggle-subtasks {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-toggle-subtasks:hover {
    background: #4b5563;
}

.btn-pause {
    background: #f59e0b;
    color: white;
}

.btn-pause:hover {
    background: #d97706;
}

.btn-complete {
    background: #10b981;
    color: white;
}

.btn-complete:hover {
    background: #059669;
}

/* 工序计划日期和工程量显示 */
.process-schedule-info,
.process-quantity-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    color: #4b5563;
}

.schedule-label,
.quantity-label {
    font-weight: 600;
    color: #6b7280;
}

.schedule-dates {
    color: #3b82f6;
    font-weight: 500;
}

.schedule-duration {
    color: #6b7280;
    font-style: italic;
}

.quantity-value {
    color: #059669;
    font-weight: 600;
}


/* 更新进度按钮 */
.btn-update-progress {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-update-progress:hover {
    background: #7c3aed;
}

/* 工程量按钮 */
.btn-quantity {
    background: #059669;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-quantity:hover {
    background: #047857;
}

/* 进度更新表单样式 */
#update-progress-form .progress-bar {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

#update-progress-form .progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 工程量表单样式增强 */
.form-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

#quantity-result {
    font-size: 1.2em;
    color: #059669;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
