/* ============================================
   AVAILABLE TASKS - STYLES
   ============================================ */

/* Container */
.tasks-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.tasks-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.tasks-header .task-count {
    background: #f1f5f9;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* Search & Filter Section */
.filter-section {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #e8edf5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-row .filter-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 16px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.filter-row .filter-input:focus {
    border-color: #1449fb;
    outline: none;
    box-shadow: 0 0 0 4px rgba(20, 73, 251, 0.08);
    background: white;
}

.filter-row .filter-select {
    min-width: 140px;
    padding: 10px 16px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-row .filter-select:focus {
    border-color: #1449fb;
    outline: none;
    box-shadow: 0 0 0 4px rgba(20, 73, 251, 0.08);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-buttons .btn-filter {
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter-primary {
    background: linear-gradient(135deg, #1449fb, #7c3aed);
    color: white;
}

.btn-filter-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(20, 73, 251, 0.25);
}

.btn-filter-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-filter-secondary:hover {
    background: #e2e8f0;
}

/* Quick Filters (Chips) */
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.quick-filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-filter-chip:hover {
    background: #e2e8f0;
    border-color: #1449fb30;
}

.quick-filter-chip.active {
    background: #1449fb;
    color: white;
    border-color: #1449fb;
}

/* Task Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Task Card */
.task-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e8edf5;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    border-color: #1449fb30;
}

.task-card .task-card-body {
    padding: 20px;
}

.task-card .task-badge-new {
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 12px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-card .task-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0 4px 0;
}

.task-card .task-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card .task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.task-card .task-meta i {
    margin-right: 4px;
    color: #94a3b8;
}

.task-card .task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}

.task-card .task-price {
    font-size: 20px;
    font-weight: 800;
    color: #1449fb;
}

.task-card .task-price-type {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

.task-card .btn-take-task {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #10b981;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card .btn-take-task:hover {
    background: #059669;
    transform: scale(1.02);
}

.task-card .task-type-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.task-type-badge.local {
    background: #dbeafe;
    color: #1e40af;
}

.task-type-badge.remote {
    background: #d1fae5;
    color: #065f46;
}

/* Task Details Modal */
.task-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.task-details-modal.active {
    display: flex;
}

.task-details-modal .modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.task-details-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    position: absolute;
    top: 16px;
    right: 16px;
    transition: all 0.3s ease;
}

.task-details-modal .modal-close:hover {
    color: #0f172a;
    transform: rotate(90deg);
}

.task-details-modal .modal-header {
    position: relative;
    margin-bottom: 20px;
    padding-right: 40px;
}

.task-details-modal .modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.task-details-modal .modal-header .badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.task-details-modal .detail-row {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.task-details-modal .detail-row:last-child {
    border-bottom: none;
}

.task-details-modal .detail-label {
    min-width: 100px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.task-details-modal .detail-value {
    color: #0f172a;
    font-size: 14px;
    flex: 1;
}

.task-details-modal .detail-value .price {
    font-size: 28px;
    font-weight: 800;
    color: #1449fb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 64px;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.empty-state p {
    color: #94a3b8;
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.pagination-container button {
    padding: 8px 16px;
    border: 1px solid #e8edf5;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.pagination-container button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-container button.active {
    background: linear-gradient(135deg, #1449fb, #7c3aed);
    color: white;
    border-color: transparent;
}

.pagination-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast */
.task-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    background: #0f172a;
    color: white;
    font-weight: 600;
    font-size: 14px;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    animation: slideUp 0.3s ease;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-toast.success { background: #10b981; }
.task-toast.error { background: #ef4444; }
.task-toast.info { background: #1449fb; }
.task-toast.warning { background: #f59e0b; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* Responsive */
@media (max-width: 768px) {
    .tasks-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row .filter-input,
    .filter-row .filter-select {
        width: 100%;
        min-width: unset;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .filter-buttons .btn-filter {
        flex: 1;
        text-align: center;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .task-details-modal .modal-content {
        padding: 20px;
        margin: 16px;
    }
    
    .task-details-modal .detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .task-details-modal .detail-label {
        min-width: unset;
    }
}