/* My Tasks Page Styles */

/* Container */
.my-tasks-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Header */
.my-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.my-tasks-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

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

.header-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Summary bar */
.summary-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--fg-color, #fff);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color, #333);
}

.summary-item-warning .summary-value {
    color: var(--red-500, #e53e3e);
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filters */
.filters-bar {
    margin-bottom: 1rem;
}

.filter-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-select {
    min-width: 140px;
    max-width: 200px;
}

/* Active filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.active-filters-label {
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--blue-50, #eff6ff);
    color: var(--blue-700, #1d4ed8);
    border-radius: 4px;
    font-size: 0.75rem;
}

.filter-remove {
    color: var(--blue-500, #3b82f6);
    text-decoration: none;
    font-weight: bold;
    padding: 0 0.25rem;
}

.filter-remove:hover {
    color: var(--blue-700, #1d4ed8);
}

.clear-filters {
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
}

/* Task sections */
.task-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.section-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted, #6c757d);
}

.section-count {
    color: var(--text-muted, #6c757d);
    font-weight: 400;
}

/* Task list */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Task card */
.task-card {
    background: var(--fg-color, #fff);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.task-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color, #2490ef);
}

.task-card.task-overdue {
    border-left: 3px solid var(--red-500, #e53e3e);
}

.task-card.task-due-soon {
    border-left: 3px solid var(--yellow-500, #f59e0b);
}

/* Task card header */
.task-card-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.task-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.task-icon-approval {
    background: var(--green-100, #dcfce7);
    color: var(--green-600, #16a34a);
}

.task-icon-escalation {
    background: var(--red-100, #fee2e2);
    color: var(--red-600, #dc2626);
}

.task-icon-task {
    background: var(--blue-100, #dbeafe);
    color: var(--blue-600, #2563eb);
}

.task-title-area {
    flex: 1;
    min-width: 0;
}

.task-title {
    display: block;
    font-weight: 600;
    color: var(--text-color, #333);
    text-decoration: none;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-title:hover {
    color: var(--primary-color, #2490ef);
}

/* Badges */
.task-badges {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-priority {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-700, #374151);
}

.badge-priority-urgent {
    background: var(--red-100, #fee2e2);
    color: var(--red-700, #b91c1c);
}

.badge-priority-high {
    background: var(--orange-100, #ffedd5);
    color: var(--orange-700, #c2410c);
}

.badge-priority-low {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-500, #6b7280);
}

.badge-app {
    background: var(--purple-100, #f3e8ff);
    color: var(--purple-700, #7c3aed);
}

/* Status badges */
.badge-status {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.badge-status-queued {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #4b5563);
}

.badge-status-pending {
    background: var(--yellow-100, #fef3c7);
    color: var(--yellow-700, #a16207);
}

.badge-status-in-progress {
    background: var(--blue-100, #dbeafe);
    color: var(--blue-700, #1d4ed8);
}

.badge-status-completed {
    background: var(--green-100, #dcfce7);
    color: var(--green-700, #15803d);
}

.badge-status-cancelled {
    background: var(--gray-200, #e5e7eb);
    color: var(--gray-500, #6b7280);
}

/* Task instructions */
.task-instructions {
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Task card footer */
.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e5e5e5);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.task-due {
    color: var(--text-muted, #6c757d);
}

.task-due.text-danger {
    color: var(--red-600, #dc2626);
    font-weight: 500;
}

.task-due.text-warning {
    color: var(--yellow-600, #ca8a04);
    font-weight: 500;
}

/* Claim button */
.btn-claim {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #6c757d);
}

.empty-state-icon {
    margin-bottom: 1rem;
    color: var(--green-500, #22c55e);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color, #333);
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .my-tasks-container {
        padding: 1rem 0.75rem;
    }

    .my-tasks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .my-tasks-header h1 {
        font-size: 1.5rem;
    }

    .summary-bar {
        flex-wrap: wrap;
    }

    .summary-item {
        min-width: calc(50% - 0.5rem);
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-select {
        max-width: none;
        width: 100%;
    }

    .task-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .task-icon {
        width: 28px;
        height: 28px;
    }

    .task-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .btn-claim {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .my-tasks-container {
        --fg-color: #1f2937;
        --border-color: #374151;
        --text-color: #f9fafb;
        --text-muted: #9ca3af;
    }
}
