/**
 * SG Workflow - Overview Page Styles
 */

.sg-workflow-overview,
.sg-workflow-my-tasks,
.sg-workflow-archive {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 20px 0;
}

.sg-workflow-overview h2,
.sg-workflow-my-tasks h2,
.sg-workflow-archive h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.sg-workflow-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sg-workflow-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.sg-workflow-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

.sg-workflow-table th[data-sort]:hover {
    background: #e9ecef;
}

.sort-icon {
    margin-left: 6px;
    color: #6c757d;
    font-size: 12px;
    opacity: 0.5;
}

.sort-icon.sort-asc,
.sort-icon.sort-desc {
    opacity: 1;
    color: #007cba;
}

.sg-workflow-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    font-size: 14px;
}

.sg-workflow-table th:nth-child(2),
.sg-workflow-table td:nth-child(2) {
    width: 25%;
}

.sg-workflow-table tr:hover {
    background-color: #f8f9fa;
}

.workflow-id {
    font-family: monospace;
    font-size: 12px;
    color: #6c757d;
}

.workflow-description {
    max-width: 300px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #495057;
}

.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.priority-low {
    background: #d4edda;
    color: #155724;
}

.priority-medium {
    background: #d1ecf1;
    color: #0c5460;
}

.priority-high {
    background: #fff3cd;
    color: #856404;
}

.priority-urgent {
    background: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background: #e2e3e5;
    color: #383d41;
}

.status-in-progress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.action-btn {
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: auto;
    width: 32px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* View/Ansehen Button (Auge) - Blau Icon */
.view-workflow {
    color: #007cba;
}

.view-workflow:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Edit/Bearbeiten Button (Stift) - Grün Icon */
.edit-draft,
.edit-template {
    color: #28a745;
}

.edit-draft:hover,
.edit-template:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Start/Vorlage starten Button (Pfeil) - Grün Icon */
.start-template {
    color: #28a745;
}

.start-template:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Delete/Löschen Button (Papierkorb) - Rot Icon */
.delete-workflow {
    color: #dc3545;
}

.delete-workflow:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.action-btn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.no-workflows {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.workflow-date {
    font-size: 12px;
    color: #6c757d;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: left;
}

/* Button Styles - Blau für Pagination und Secondary Buttons */
.sg-workflow-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.sg-workflow-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.sg-workflow-btn:disabled {
    background: #a0c4e8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.sg-workflow-btn-secondary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.sg-workflow-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.sg-workflow-btn-secondary:disabled {
    background: #a0c4e8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .sg-workflow-table {
        font-size: 12px;
    }
    
    .sg-workflow-table th,
    .sg-workflow-table td {
        padding: 8px 6px;
    }
    
    .workflow-description {
        max-width: 200px;
    }
    
    .sg-workflow-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

