:root {
    --primary-color: #07a83f;
    --primary-hover: #059030;
    --primary-light: #c8e6d4;
    --primary-lighter: #e0f0e6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-light: #e8edea;
    --bg-card: #f5f7f6;
    --border-color: #a8c9b8;
    --border-color-light: #c8e6d4;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

/* Bootstrap Primary Color Overrides */
.btn-primary,
.bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

body { 
    background: linear-gradient(135deg, #e8edea 0%, #dde5e1 50%, #e8edea 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

.container.py-4 { 
    max-width: 1400px;
}

/* Header Styles */
.dashboard-header {
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.dashboard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-header h1 i {
    color: var(--primary-color);
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-header-filters {
    background: rgba(245, 247, 246, 0.9);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-row {
    margin-bottom: 0.75rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.user-section .welcome-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-section .username {
    font-weight: 600;
    color: #1e293b;
}

/* Button Improvements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: #475569;
}

.btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-danger {
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Icon-only buttons */
.btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

/* Action buttons spacing */
.text-center button {
    margin: 0 0.25rem;
}

/* Table Styles */
.table-container {
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #e0f0e6 0%, #d4e6dc 100%);
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-hover);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color-light);
}

.table tbody tr {
    transition: all 0.2s ease;
    background: rgba(245, 247, 246, 0.7);
}

.table tbody tr:hover {
    background: #d4e6dc;
    cursor: pointer;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-processing { 
    color: #92400e; 
    background: #fef3c7; 
}
.status-passed { 
    color: #065f46; 
    background: #d1fae5; 
}
.status-failed { 
    color: #991b1b; 
    background: #fee2e2; 
}
.status-need-human { 
    color: #1e40af; 
    background: #dbeafe; 
}
.status-skipped {
    color: #6b21a8;
    background: #f3e8ff;
}

/* Title Cell */
.title-cell {
    width: 450px;
    max-width: 450px;
    color: #1e293b;
}

.title-cell .task-title-text {
    font-weight: 500;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-cell .task-timestamps {
    margin-top: 0.2rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.65rem;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

.title-cell .task-timestamp {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
}

.title-cell .task-timestamp:not(:first-child)::before {
    content: '•';
    color: #cbd5f5;
    margin-right: 0.35rem;
    font-size: 0.6rem;
}

.title-cell .task-timestamp-label {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.title-cell .task-timestamp-value {
    font-size: 0.75rem;
    color: #94a3b8;
}

.title-cell:hover .task-title-text {
    color: var(--primary-color);
}

/* Completeness */
.completeness-cell {
    font-weight: 600;
    color: #1e293b;
}

.table {
    table-layout: fixed;
}

.table thead th:nth-child(1),
#taskTable tbody td:nth-child(1) {
    width: 120px;
    max-width: 120px;
}

.table thead th:nth-child(2),
#taskTable tbody td:nth-child(2) {
    width: 400px;
    max-width: 400px;
}

.table thead th:nth-child(3),
#taskTable tbody td:nth-child(3) {
    width: 140px;
    max-width: 140px;
}

.table thead th:nth-child(4),
#taskTable tbody td:nth-child(4) {
    width: 140px;
    max-width: 140px;
    text-align: center;
}

.table thead th:nth-child(5),
#taskTable tbody td:nth-child(5) {
    width: 160px;
    max-width: 160px;
    text-align: center;
}

.table thead th:nth-child(6),
#taskTable tbody td:nth-child(6) {
    width: 170px;
    max-width: 170px;
}

.table thead th:nth-child(7),
#taskTable tbody td:nth-child(7) {
    width: 220px;
    max-width: 220px;
}

.inputs-cell {
    min-width: 110px;
    text-align: center;
}

.input-count {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1;
}

.input-groups-line {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
}

.actions-cell {
    min-width: 210px;
}

.actions-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.actions-buttons .btn {
    margin: 0;
    width: 36px;
    height: 36px;
    padding: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actions-approval-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Human Label Select */
.form-select-sm {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.form-select-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Colored Select Dropdowns for Human Label */
.human-label-select.passed,
.form-select.human-label-select.passed,
#statusSelect.passed {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #10b981;
    font-weight: 500;
}

.human-label-select.failed,
.form-select.human-label-select.failed,
#statusSelect.failed {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
    font-weight: 500;
}

.human-label-select.need_human,
.form-select.human-label-select.need_human,
#statusSelect.need_human {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
    font-weight: 500;
}
.human-label-select.skipped,
.form-select.human-label-select.skipped,
#statusSelect.skipped {
    background-color: #f3e8ff;
    color: #6b21a8;
    border-color: #a855f7;
    font-weight: 500;
}

.human-label-select.na,
.form-select.human-label-select.na,
#statusSelect.na {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
    font-weight: 500;
}

/* Focus states for colored selects */
.human-label-select.passed:focus,
.form-select.human-label-select.passed:focus,
#statusSelect.passed:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.human-label-select.failed:focus,
.form-select.human-label-select.failed:focus,
#statusSelect.failed:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.human-label-select.need_human:focus,
.form-select.human-label-select.need_human:focus,
#statusSelect.need_human:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.human-label-select.skipped:focus,
.form-select.human-label-select.skipped:focus,
#statusSelect.skipped:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.human-label-select.na:focus,
.form-select.human-label-select.na:focus,
#statusSelect.na:focus {
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.1);
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    justify-content: center;
}

.page-item .page-link {
    border-radius: 6px;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    color: #475569;
    padding: 0.5rem 0.75rem;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item:hover .page-link {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Modal Improvements */
.modal-content {
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, #e0f0e6 0%, #d4e6dc 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-hover);
}

.modal-body {
    padding: 1.5rem;
    background: rgba(245, 247, 246, 0.6);
}

.modal-footer {
    background: rgba(232, 237, 234, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0 0 12px 12px;
}

/* Form Improvements */
.form-label {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 168, 63, 0.12);
    background: rgba(245, 247, 246, 0.95);
}

/* Date Inputs */
.date-filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-filter-mode {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.date-filter-mode .form-select {
    width: auto;
    min-width: 220px;
}

.date-range-input {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-filter-group input {
    max-width: 160px;
}

.finished-at-time-input {
    max-width: 120px;
}

.date-filter-group .separator {
    color: var(--text-muted);
    font-weight: 500;
}

.bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: linear-gradient(90deg, #f8fafc 0%, #f0fdf4 100%);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.75rem;
}

.bulk-actions-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0f172a;
}

.bulk-actions-summary i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.bulk-actions-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-actions-controls .btn-link {
    padding: 0;
}

.task-select-checkbox {
    cursor: pointer;
}

.task-id-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-id-wrapper .task-id-text {
    display: inline-block;
}

.task-id-meta {
    margin-top: 0.35rem;
}

.task-type-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #0f172a;
    background: #e2e8f0;
}

.task-type-suggest {
    background: #ecfccb;
    color: #365314;
}

.task-type-workflow {
    background: #dbeafe;
    color: #1d4ed8;
}

.task-type-schedule {
    background: #fef9c3;
    color: #854d0e;
}

.task-type-normal {
    background: #f1f5f9;
    color: #0f172a;
}

.task-type-default {
    background: #e2e8f0;
    color: #475569;
}

.task-row-selected {
    background-color: rgba(7, 168, 63, 0.08);
}

.task-row-selected:hover {
    background-color: rgba(7, 168, 63, 0.15);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Card Styles in Modals */
.card {
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Tab Improvements */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--border-color);
    color: #1e293b;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* List Group Improvements */
.list-group-item {
    background: rgba(245, 247, 246, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    border-color: var(--primary-color);
    background: #d4e6dc;
    transform: translateX(4px);
}

/* Toast Container */
#toast-container {
    z-index: 9999;
}

.toast {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

/* Spinner Color */
/* Spinning animation for processing status */
.bi-arrow-repeat {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner-border.text-primary {
    color: var(--primary-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }

    .dashboard-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-header-filters {
        padding: 0.75rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        width: 100%;
    }

    .filter-item .form-control,
    .filter-item .form-select {
        width: 100% !important;
    }

    .filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .date-filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .date-range-input {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.25rem;
    }

    .date-filter-mode {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .date-filter-mode .form-select {
        width: 100%;
        min-width: 0;
    }

    .date-filter-group input {
        max-width: 100%;
    }

    .finished-at-time-input {
        max-width: 100%;
    }

    .bulk-actions-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .bulk-actions-controls {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }

    .table-container {
        overflow-x: hidden;
    }

    .user-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .user-section .welcome-text {
        text-align: center;
    }
}

/* Thumbnail Styles */
.thumbnail-container {
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.thumbnail-small {
    z-index: 1;
    object-fit: cover;
}

/* Qualified Status Badge */
.qualified-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.qualified-badge i {
    font-size: 14px;
}

.qualified-badge.qualified-tick i {
    color: #28a745;
}

.qualified-badge.qualified-cross i {
    color: #dc3545;
}

/* Subtask Badges */
.completeness-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
}

.feedback-badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
    display: block;
    max-width: 100%;
    line-height: 1.4;
}

.feedback-badge strong {
    display: inline-block;
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Video wrapper div inside thumbnail container */
.thumbnail-container > div.position-relative {
    transition: transform 0.2s ease;
}

/* Thumbnail Popup */
.thumbnail-popup {
    position: fixed;
    z-index: 1000;
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 8px;
    pointer-events: none;
    max-width: 400px;
    max-height: 400px;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.thumbnail-popup-image {
    max-width: 100%;
    max-height: 384px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

/* Worker Status Bot Icon */
.worker-status-bot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.worker-status-bot-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.worker-status-bot-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 12px 20px -5px rgba(7, 168, 63, 0.4);
}

.worker-status-bot-btn:active {
    transform: scale(0.95);
}

.worker-status-dropdown {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: none;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.worker-status-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.worker-status-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.worker-status-item {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    transition: all 0.2s ease;
}

.worker-status-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.worker-status-item:last-child {
    margin-bottom: 0;
}

.worker-status-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.worker-status-item-id {
    font-weight: 600;
    color: #1e293b;
    font-family: monospace;
    font-size: 0.85rem;
}

.worker-status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.worker-status-badge.available {
    background: #d1fae5;
    color: #065f46;
}

.worker-status-badge.busy {
    background: #fee2e2;
    color: #991b1b;
}

.worker-status-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.worker-status-detail strong {
    color: #1e293b;
}

.worker-status-task-id {
    font-family: monospace;
    color: var(--primary-color);
    word-break: break-all;
    font-size: 0.75rem;
}

.worker-status-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
}

.worker-status-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Worker Log Tooltip Styles */
.worker-log-tooltip {
    position: fixed;
    z-index: 10000;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(2, 8, 20, 0.12);
    min-width: 240px;
    max-width: 280px;
    display: flex;
    align-items: stretch;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
}

.worker-log-tooltip-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    width: 100%;
    color: #0f172a;
}

.worker-log-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.worker-log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.worker-log-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.worker-log-pill.error .worker-log-dot {
    background: #dc2626;
}

.worker-log-pill.warning .worker-log-dot {
    background: #d97706;
}

.worker-log-pill.info .worker-log-dot {
    background: var(--primary-color);
}

.worker-log-empty {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
}

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.6;
    color: #1e293b;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.375rem;
}

.markdown-content h3 {
    font-size: 1.5rem;
}

.markdown-content h4 {
    font-size: 1.25rem;
}

.markdown-content h5 {
    font-size: 1.1rem;
}

.markdown-content h6 {
    font-size: 1rem;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content code {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.markdown-content pre {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #1e293b;
    font-size: 0.875rem;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.markdown-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.markdown-content table th {
    background: var(--bg-light);
    font-weight: 600;
}

.markdown-content table tr:nth-child(even) {
    background: rgba(232, 237, 234, 0.5);
}

.markdown-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 1.5rem 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.markdown-content strong {
    font-weight: 600;
    color: #1e293b;
}

.markdown-content em {
    font-style: italic;
}

/* Subtask Carousel Styles */
.subtask-carousel-container {
    position: relative;
    width: 100%;
    margin: 1rem 0;
}

.subtask-carousel-wrapper {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.subtask-carousel-content {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 300px;
    cursor: pointer;
}

.subtask-nav-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10%;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtask-nav-zone-left {
    left: 0;
    border-radius: 12px 0 0 12px;
}

.subtask-nav-zone-right {
    right: 0;
    border-radius: 0 12px 12px 0;
}

.subtask-nav-icon {
    background: transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.subtask-nav-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.subtask-nav-zone:hover:not(.disabled) .subtask-nav-icon {
    transform: scale(1.1);
}

.subtask-nav-zone.disabled {
    cursor: default;
    opacity: 0.3;
}

.subtask-nav-zone.disabled .subtask-nav-icon {
    transform: none;
}

.subtask-page {
    display: none;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7f6 100%);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    min-height: 280px;
    animation: fadeInSubtask 0.3s ease;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.subtask-page.active {
    display: block;
}

.subtask-page-body {
    pointer-events: auto;
}

@keyframes fadeInSubtask {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.subtask-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.subtask-counter {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-lighter);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.subtask-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color-light);
}

.subtask-page-body {
    color: #1e293b;
}

.subtask-page-body strong {
    color: #1e293b;
    font-weight: 600;
}

.subtask-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color-light);
}

.subtask-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.subtask-indicator:hover {
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.subtask-indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    width: 12px;
    height: 12px;
}

/* Approval Counts Display */
.approval-counts-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.approval-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.approval-count-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.approval-count-badge i {
    font-size: 0.875rem;
}

.approval-count-badge span {
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .approval-counts-display {
        flex-wrap: wrap;
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
    
    .worker-status-dropdown {
        width: calc(100vw - 40px);
        max-width: 280px;
    }
    
    .worker-status-bot {
        top: 10px;
        left: 10px;
    }
    
    .worker-status-bot-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .subtask-page {
        padding: 1rem;
        min-height: auto;
    }
}

/* Approval Buttons Styling */
.approval-button,
.btn[class*="btn-outline-success"],
.btn[class*="btn-outline-danger"],
.btn-success,
.btn-danger {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Like/Approve Button Styling */
.btn-success,
.btn[class*="btn-outline-success"] {
    border: 2px solid var(--success-color);
}

/* Thumb-up button border styling */
button.approval-button.btn-success,
button.approval-button.btn-outline-success,
button.approval-button[class*="btn-outline-success"] {
    border: 2px solid var(--success-color) !important;
}

button.approval-button.btn-success {
    border-color: #10b981 !important;
}

button.approval-button.btn-outline-success {
    border-color: var(--success-color) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.btn-outline-success {
    background: transparent;
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Dislike/Disapprove Button Styling */
.btn-danger,
.btn[class*="btn-outline-danger"] {
    border: 2px solid var(--danger-color);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Icon animations for approval buttons */
.btn-success i,
.btn-outline-success i,
.btn-danger i,
.btn-outline-danger i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-success:hover i,
.btn-outline-success:hover i {
    transform: scale(1.2) rotate(5deg);
}

.btn-danger:hover i,
.btn-outline-danger:hover i {
    transform: scale(1.2) rotate(-5deg);
}

.btn-success:active i,
.btn-outline-success:active i {
    transform: scale(0.9) rotate(10deg);
}

.btn-danger:active i,
.btn-outline-danger:active i {
    transform: scale(0.9) rotate(-10deg);
}

/* Active state for approval buttons */
.btn-success:active,
.btn-outline-success:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-danger:active,
.btn-outline-danger:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Approval buttons container in actions column */
.d-inline-flex.gap-1 {
    gap: 0.5rem !important;
}

/* Approval buttons in header */
#approvalButtonsHeader {
    gap: 0.5rem;
}

#approvalButtonsHeader .btn {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
}

#approvalButtonsHeader .btn i {
    font-size: 1rem;
}

/* Ripple effect on click */
.btn-success::before,
.btn-outline-success::before,
.btn-danger::before,
.btn-outline-danger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-success:active::before,
.btn-outline-success:active::before,
.btn-danger:active::before,
.btn-outline-danger:active::before {
    width: 300px;
    height: 300px;
}

/* Focus states for accessibility */
.btn-success:focus,
.btn-outline-success:focus,
.btn-danger:focus,
.btn-outline-danger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.btn-danger:focus,
.btn-outline-danger:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

/* Disabled state */
.btn-success:disabled,
.btn-outline-success:disabled,
.btn-danger:disabled,
.btn-outline-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-success:disabled:hover,
.btn-outline-success:disabled:hover,
.btn-danger:disabled:hover,
.btn-outline-danger:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

