/* Workflow Status Colors and Styling */

.workflow-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
}

/* Office/Pre-Field Stages */
.workflow-status-draft {
    background-color: #e0e0e0;
    color: #424242;
}

.workflow-status-pending-quote {
    background-color: #fff3e0;
    color: #e65100;
}

.workflow-status-quoted {
    background-color: #e3f2fd;
    color: #0277bd;
}

.workflow-status-approved {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.workflow-status-scheduled {
    background-color: #b3e5fc;
    color: #01579b;
}

/* Field Work Stages */
.workflow-status-assigned {
    background-color: #b2dfdb;
    color: #00695c;
}

.workflow-status-enroute {
    background-color: #b2ebf2;
    color: #006064;
}

.workflow-status-arrived {
    background-color: #b9fbc0;
    color: #1b5e20;
}

.workflow-status-assessment {
    background-color: #e1bee7;
    color: #6a1b9a;
}

.workflow-status-approval {
    background-color: #f8bbd0;
    color: #c2185b;
}

.workflow-status-in-progress {
    background-color: #90caf9;
    color: #0d47a1;
}

.workflow-status-completed {
    background-color: #a5d6a7;
    color: #1b5e20;
}

.workflow-status-signoff {
    background-color: #ce93d8;
    color: #6a1b9a;
}

/* Post-Field Stages */
.workflow-status-ready-invoice {
    background-color: #fff59d;
    color: #f57f17;
}

.workflow-status-invoiced {
    background-color: #ffcc80;
    color: #e65100;
}

.workflow-status-partially-paid {
    background-color: #ffecb3;
    color: #ff6f00;
}

.workflow-status-paid {
    background-color: #81c784;
    color: #1b5e20;
}

/* Terminal Stages */
.workflow-status-cancelled {
    background-color: #ffcdd2;
    color: #c62828;
}

.workflow-status-on-hold {
    background-color: #ffe082;
    color: #f57c00;
}

/* Job Card Workflow Status Badge */
.job-card .workflow-status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 4px 8px;
    z-index: 10;
}

/* Workflow Progress Bar */
.workflow-progress {
    height: 4px;
    background: linear-gradient(to right, #4caf50 0%, #4caf50 var(--workflow-progress), #e0e0e0 var(--workflow-progress), #e0e0e0 100%);
    border-radius: 2px;
    margin-top: 8px;
}

/* Workflow Step Indicator */
.workflow-step {
    display: flex;
    align-items: center;
    padding: 12px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.workflow-step.active {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.workflow-step.completed {
    background-color: #e8f5e9;
    border-left-color: #4caf50;
}

.workflow-step.blocked {
    background-color: #fff3e0;
    border-left-color: #ff9800;
    opacity: 0.7;
}

/* Workflow Timeline */
.workflow-timeline {
    position: relative;
    padding-left: 30px;
}

.workflow-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.workflow-timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.workflow-timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bdbdbd;
    border: 2px solid #fff;
    z-index: 1;
}

.workflow-timeline-item.completed::before {
    background: #4caf50;
}

.workflow-timeline-item.active::before {
    background: #2196f3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-status {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    
    .job-card .workflow-status {
        position: static;
        display: block;
        margin-top: 4px;
    }
}

/* Dark Mode Support (if applicable) */
@media (prefers-color-scheme: dark) {
    .workflow-status-draft {
        background-color: #424242;
        color: #e0e0e0;
    }
    
    .workflow-step {
        border-color: rgba(255, 255, 255, 0.12);
    }
    
    .workflow-timeline::before {
        background: rgba(255, 255, 255, 0.12);
    }
}

