/* ============================================
   Cue - My Tasks CSS
   ============================================ */

.mytasks-main {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.mytasks-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.mytasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.mytasks-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.mytasks-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--text-tertiary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Stats */
.mytasks-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.stat-icon.review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.earnings {
    background: rgba(139, 92, 246, 0.1);
    color: var(--mission);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Task List */
.mytasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.task-card:hover {
    box-shadow: var(--shadow-md);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.task-type-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-type-badge.task {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.task-type-badge.mission {
    background: rgba(139, 92, 246, 0.1);
    color: var(--mission);
}

.task-type-badge.debug {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.task-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.task-status.in_progress {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.task-status.review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.task-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.task-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.task-card-client {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.task-card-progress {
    margin-bottom: 16px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-tertiary);
}

.task-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.task-reward {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.task-deadline {
    font-size: 13px;
    color: var(--text-secondary);
}

.task-deadline i {
    margin-right: 4px;
}

.task-card-actions {
    display: flex;
    gap: 8px;
}

.task-card-actions .btn {
    flex: 1;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-tertiary);
}

.empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-tertiary);
}

.loading-state i {
    font-size: 32px;
    margin-bottom: 16px;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-btn:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-btn i {
    font-size: 10px;
    color: var(--text-tertiary);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.user-dropdown hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .mytasks-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mytasks-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mytasks-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .mytasks-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mytasks-stats {
        grid-template-columns: 1fr;
    }

    .mytasks-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .filter-btn {
        white-space: nowrap;
    }
}
