/* ============================================================================
   SMARTCRM 360 - MODERN TASKS SYSTEM V20.0.0
   Modern, clean design matching the overall system aesthetic
   ============================================================================ */

/* Page Container */
.modern-page-container {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

/* Modern Header */
.modern-page-header {
    background: white;
    padding: 32px 40px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-page-header .header-left {
    flex: 1;
}

.modern-page-header .page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-page-header .page-title i {
    color: #667eea;
}

.modern-page-header .page-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.modern-page-header .header-right {
    display: flex;
    gap: 12px;
}

/* Modern Toolbar */
.modern-toolbar {
    background: white;
    padding: 16px 40px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.modern-toolbar .toolbar-left {
    flex: 1;
}

.modern-toolbar .toolbar-right {
    flex-shrink: 0;
}

/* View Tabs */
.view-tabs {
    display: flex;
    gap: 8px;
}

.view-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-tab:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.view-tab.active {
    background: #667eea;
    color: white;
}

.view-tab.special {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.view-tab.special:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.view-tab .badge-new {
    background: white;
    color: #667eea;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

/* Toolbar Actions */
.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: #1e293b;
}

.filter-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Content Grid */
.modern-content-grid {
    flex: 1;
    overflow-y: auto;
    padding: 24px 40px;
}

/* Tasks List Container */
.tasks-list-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Task Group */
.task-group {
    margin-bottom: 32px;
}

.task-group-header {
    margin-bottom: 16px;
}

.task-group-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-group-title.danger {
    color: #ef4444;
}

.task-group-title.warning {
    color: #f59e0b;
}

.task-group-title.primary {
    color: #667eea;
}

.task-group-title.success {
    color: #10b981;
}

.task-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.task-group-content {
    display: grid;
    gap: 12px;
}

/* Task Card */
.task-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.task-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.task-card.completed {
    opacity: 0.6;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.task-checkbox:hover {
    color: #667eea;
    transform: scale(1.1);
}

.task-card.completed .task-checkbox {
    color: #10b981;
}

.task-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.important-star {
    color: #f59e0b;
    font-size: 14px;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.task-action-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.task-action-btn.danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Task Meta */
.task-card-meta {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-left: 36px;
}

.task-meta-item {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-meta-item i {
    font-size: 12px;
    color: #94a3b8;
}

.task-meta-item.priority-high {
    color: #ef4444;
}

.task-meta-item.priority-high i {
    color: #ef4444;
}

.task-meta-item.priority-medium {
    color: #f59e0b;
}

.task-meta-item.priority-medium i {
    color: #f59e0b;
}

.task-meta-item.priority-low {
    color: #10b981;
}

.task-meta-item.priority-low i {
    color: #10b981;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.empty-state-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 32px 0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-page-header {
        padding: 24px 24px;
    }
    
    .modern-toolbar {
        padding: 12px 24px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-actions {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .modern-content-grid {
        padding: 16px 24px;
    }
}

@media (max-width: 768px) {
    .view-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .view-tab {
        flex-shrink: 0;
    }
    
    .task-actions {
        opacity: 1;
    }
    
    .modern-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .modern-page-header .header-right {
        width: 100%;
    }
    
    .modern-page-header .header-right .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert i {
    font-size: 18px;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
